hi,
i implemented this treeview in my form among other items:
Tree->setObjectName("DirView");
Tree->setGeometry(20, 90, 435, 120);
dirsList << "/usr" << "/opt" << "/home";
Tree->setModel(&dirs);
for ( int i = 0; i < dirs.rowCount(); ++i )
item->setCheckable( true );
dirs.setItem( i, item );
}
Tree = new QTreeView(MainContainer);
Tree->setObjectName("DirView");
Tree->setGeometry(20, 90, 435, 120);
QStringList dirsList;
dirsList << "/usr" << "/opt" << "/home";
QStandardItemModel dirs( 3, 1 );
Tree->setModel(&dirs);
for ( int i = 0; i < dirs.rowCount(); ++i )
{ QStandardItem *item = new QStandardItem(QString::number(i));
item->setCheckable( true );
dirs.setItem( i, item );
}
To copy to clipboard, switch view to plain text mode
but the treeview now just is empty?
what did i do wrong?
thanks,
toby
Bookmarks