Qt 6.11 is out! See what's new in the release
blog
Sample Code of SimpleTreeModel
General and Desktop
3
Posts
2
Posters
4.0k
Views
1
Watching
-
I try to use this code in my App.
@QFile file(":/default.txt");
file.open(QIODevice::ReadOnly);
TreeModel model(file.readAll());
file.close();QTreeView view;
view.setModel(&model);
view.setWindowTitle(QObject::tr("Simple Tree Model"));
view.show();@when I paste it in main then code works (I see QTreeView with data), but when paste it in QMainWindow constructor then I see an empty QTreeView window without data.
why?
-
ups!