Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QComboBox::currentText()

$
0
0
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(); }

Viewing all articles
Browse latest Browse all 18427

Trending Articles