
Originally Posted by
Arthur
Well, this is exactly nothing more than a simple project containing the widget layout where the problem occurs. If I just put a treeview on a form, it will probably work...
There is no layout there. Try resizing the window. The form (and other widgets too) is completely unnecessary, it would be better if there was only the treewidget there:
#include <QApplication>
#include <QTreeWidget>
#include <QStringList>
int main(int argc, char **argv){
// ... some lines here, like:
tw.insertTopLevelItem(0,
);
tw.show();
return app.exec();
}
#include <QApplication>
#include <QTreeWidget>
#include <QStringList>
int main(int argc, char **argv){
QApplication app(argc, argv);
QTreeWidget tw;
// ... some lines here, like:
tw.insertTopLevelItem(0,
new QTreeWidgetItem( QStringList() << "col1" << "col2" )
);
tw.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
That's a minimal compilable example
Bookmarks