QDirModel *model = new QDirModel; QTreeView *tree = new QTreeView; tree->setModel(model); tree->setMinimumHeight(TREE_VIEW_HEIGHT); QComboBox cb; cb.setView(tree); cb.setModel(model); cb.show();