Hi..
I have a QComboBox, in that i add few items. (eg. item 1, item 2, combo box item 3, combo box item number 4, combo box item number is 5). Now i want to change the width size of the drop down list of the combo box that fits for the largest item string without changing the actual size of the QComboBox. How can i change the width size of the drop down list without changing the actual size of the QComboBox. Please give your suggestions…..
#include <QtGui>
#include <QApplication>
#include <QComboBox>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QComboBox cb;
cb.addItem("item 1");
cb.addItem("item 2");
cb.addItem("combo box item 3");
cb.addItem("combo box item number 4");
cb.addItem("combo box item number is 5");
cb.show();
return app.exec();
}
Thanks & Regards
↧