-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
61 lines (43 loc) · 1.54 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <QApplication>
#include "treeview/treeview.h"
#include "treeview/treeviewitem.h"
using namespace HeaderIncludeGraph::Internal;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
TreeView *view = new TreeView;
TreeViewItem *item1 = new TreeViewItem;
TreeViewItem *item2 = new TreeViewItem;
TreeViewItem *item3 = new TreeViewItem;
TreeViewItem *item4 = new TreeViewItem;
TreeViewItem *item5 = new TreeViewItem;
TreeViewItem *item6 = new TreeViewItem;
TreeViewItem *item7 = new TreeViewItem;
TreeViewItem *item8 = new TreeViewItem;
item1->setDisplayText("fdsfsdfsdfsdfs");
item1->setToolTip("rade car");
item2->setDisplayText("wqeqeq");
item2->setToolTip(item2->displayText());
item3->setDisplayText("tererter");
item3->setToolTip(item3->displayText());
item4->setDisplayText("uyutut");
item4->setToolTip(item4->displayText());
item5->setDisplayText("uiiyuouioui");
item5->setToolTip(item5->displayText());
item6->setDisplayText("sdasdasd");
item6->setToolTip(item6->displayText());
item7->setDisplayText("cxvxvcx");
item7->setToolTip(item7->displayText());
item8->setDisplayText("jhjghjgjg");
item8->setToolTip(item8->displayText());
item4->addChildItem(item6);
item4->addChildItem(item7);
item4->addChildItem(item8);
item2->addChildItem(item4);
item2->addChildItem(item5);
item1->addChildItem(item2);
item1->addChildItem(item3);
view->setRootItem(item1);
view->showView(true);
return a.exec();
}