PDA

View Full Version : QcomboBox update QTreeView



josiah47
5th March 2009, 03:12
Hello,
I have a QComboBox with a selection of Music Genres, i have a QTreeView using QSqlQueryModel which build a list of albums from a Sqlite DB, When Selecting a Genre in the QComboBox i would like it to update the QTreeView with only albums with the Genre Set. What would be the best way to implement this.

jpn
5th March 2009, 07:28
How about QAbstractItemView::setRootIndex()?

josiah47
6th March 2009, 00:32
Have an example?