[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] How to read the current value of a QML radio button group
From:       Glenn Ramsey <gr () componic ! co ! nz>
Date:       2013-12-16 2:09:18
Message-ID: 52AE60CE.1050100 () componic ! co ! nz
[Download RAW message or body]

Hi,

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 
wrapped.

Apart from iterating through them by name, how can I determine which RadioButton 
is currently selected?

Glenn


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic