I have a groupbox with some radiobuttons. How do I get to know which one which is checked.
相关问题
- QTextEdit.find() doesn't work in Python
- Pyside, PyQt4: How to set a validator when editing
- Pillow (PIL) to QImage conversion -> python.exe ha
- QTableView: sort by header index -1
- QVariant in QComboBox (Python 2 vs Python 3)
相关文章
- Getting all items of QComboBox - PyQt4 (Python)
- How to update a realtime plot and use buttons to i
- mouseDoubleClickEvent with QLineEdit
- Emitting signals from a QRunnable
- How do I make pyinstaller include my database?
- findChild on object created within pyqt designer
- How to choose value from an option list using PyQt
- Increase Height of QPushButton in PyQT
you will need to iterate through all the radio buttons in the groupbox and check for the property
isChecked()
of each radiobox.eg:
for reference, check http://pyqt.sourceforge.net/Docs/PyQt4/qradiobutton.html
Another way is to use button groups. For example:
I found more information at:
http://codeprogress.com/python/libraries/pyqt/showPyQTExample.php?index=387&key=QButtonGroupClick
http://www.pythonschool.net/pyqt/radio-button-widget/
I managed to work around this problem by using a combination of index and loop.