lalesculiviu
11th December 2009, 17:31
This is a problem for Qt 4.6.0. For 4.5.3 I think it did not exist.
I have a minor problem with QComboBox: I insert items, and make current index -1, so that no item is selected. But when I press the down arrow and go with the mouse over the first entry, it is not highlighted. Only if I go to the second entry and then back to the first entry, the first entry is highlighted.
I attach a small code:
#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QDialog dialog;
dialog.resize(300,200);
QComboBox* combo=new QComboBox(&dialog);
combo->addItem("first");
combo->addItem("second");
combo->addItem("third");
combo->addItem("fourth");
combo->setCurrentIndex(-1);
dialog.show();
return app.exec();
return 0;
}
I have a minor problem with QComboBox: I insert items, and make current index -1, so that no item is selected. But when I press the down arrow and go with the mouse over the first entry, it is not highlighted. Only if I go to the second entry and then back to the first entry, the first entry is highlighted.
I attach a small code:
#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QDialog dialog;
dialog.resize(300,200);
QComboBox* combo=new QComboBox(&dialog);
combo->addItem("first");
combo->addItem("second");
combo->addItem("third");
combo->addItem("fourth");
combo->setCurrentIndex(-1);
dialog.show();
return app.exec();
return 0;
}