Questions tagged «qcombobox»

13
如何从QCombobox中获取所选的VALUE?
在Qt,我可以得到selected text的QComboBox使用 combobox->currentText()方法。我如何获得selected value? 我寻求帮助,但是找不到currentData()我希望找到的方法。我只能找到combobox->currentIndex() 除此以外,还有其他更聪明的方法combobox->itemData(combobox->currentIndex())吗? 更新:从Qt 5开始不再需要此currentData()方法。已添加一种方法http://doc.qt.io/qt-5/qcombobox.html#currentData-prop
86 qt  qcombobox 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.