my problem still non solved:
i start a program and change item manually (from 1 to 2), so in my opinion currentText() is “2” now, but QLabel always show me “abc1”, why? i change it!
{
QApplication a(argc, argv);
QWidget w;
QComboBox* cmb = new QComboBox;
QLabel* lbl = new QLabel();
cmb->addItem("1");
cmb->addItem("2");
lbl->setText("abc"+cmb->currentText());
cmb->show();
lbl->show();
return a.exec();
}
↧