[PyQt] How to read the current value of a QML radio button group
gr at componic.co.nz
Mon Dec 16 02:09:18 GMT 2013
I have some QML code that contains some RadioButtons and I want to find out from
code which button is selected.
The RadioButtons are contained by an ExclusiveGroup. The docs show that
ExclusiveGroup has a "current" property and that is what I think I need to read.
However I can't figure out how to access that property.
To get a reference to a QML Item I use:
QQuickView.rootObject().findChild(QQuickItem, <objectName>, <field>)
but this doesn't work for ExclusiveGroup because QQuickExclusiveGroup is not
Apart from iterating through them by name, how can I determine which RadioButton
is currently selected?
More information about the PyQt