here is my codes:
Qt Code:
#include <QtGui> int main(int argc, char **argv) { view->setModel(model); combo->setView(view); combo->setModel(model); combo->show(); combo->setRootModelIndex((static_cast<QDirModel*>(combo->model()))->index(root)); app.exec(); }To copy to clipboard, switch view to plain text mode
the ComboBox always show the root as "C:",how can I set it to the "D:"?
I'm using Qt 4.4.0.If you use the old version such as 4.3.1,there will be a few other bugs.
thanks a lot.
Bookmarks