Rev 91 | Rev 93 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 91 | Rev 92 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | 11 | ||
12 | //QString model_str;
|
12 | //QString model_str;
|
13 | MainWindow::creatModelString(); |
13 | MainWindow::creatModelString(); |
14 | int i; |
14 | int i; |
15 | i++; |
15 | i++; |
- | 16 | QFile file_tmp("temp.txt"); |
|
- | 17 | bool ok; |
|
- | 18 | ok = file_tmp.open(QIODevice::ReadWrite | QIODevice::Text); |
|
- | 19 | QTextStream out(&file_tmp); |
|
- | 20 | out << MainWindow::modelString; |
|
- | 21 | file_tmp.close(); |
|
16 | 22 | ||
17 | }
|
23 | }
|
18 | 24 | ||
19 | MainWindow::~MainWindow() |
25 | MainWindow::~MainWindow() |
20 | {
|
26 | {
|
Line 36... | Line 42... | ||
36 | 42 | ||
37 | bool MainWindow::readModel(){ |
43 | bool MainWindow::readModel(){ |
38 | bool result; |
44 | bool result; |
39 | QString model_str;
|
45 | QString model_str;
|
40 | QFile file(":/model.txt"); |
46 | QFile file(":/model.txt"); |
- | 47 | ||
41 | rootItem1 = new QTreeWidgetItem(ui->treeWidget); |
48 | rootItem1 = new QTreeWidgetItem(ui->treeWidget); |
42 | rootItem1->setText(0, tr("Óðîâåíü 1")); |
49 | rootItem1->setText(0, tr("Óðîâåíü 1")); |
43 | // rootItem2 = new QTreeWidgetItem(rootItem1);
|
50 | // rootItem2 = new QTreeWidgetItem(rootItem1);
|
44 | // rootItem2->setText(0, tr("óðîâåíü 2"));
|
51 | // rootItem2->setText(0, tr("óðîâåíü 2"));
|
45 | rootItem1->setCheckState(0,Qt::Checked); |
52 | rootItem1->setCheckState(0,Qt::Checked); |