QWidget casts with PyQt?
mpyle at legato.com
Fri Feb 20 19:05:36 CET 2004
Just use the reference you get back as a QButtonGroup object.
The following code works fine for me:
from qt import *
app = QApplication()
box = QToolBox()
grp = QButtonGroup()
box.addItem( grp, 'button group' )
item = box.item( 0 )
<__main__.qt.QButtonGroup object at 0x00804360>
From: Ewald R. de Wit [mailto:erdewit at d-e-l-e-t-e.zonnet.nl]
Sent: Friday, February 20, 2004 2:42 AM
To: python-list at python.org
Subject: Re: QWidget casts with PyQt?
Stefan Quandt wrote:
> I want to access widgets from a Qt container widget e.g.
> item = ToolBox.item( 0 )
> I know that the item is a QButtonGroup.
> The Qt-Library returns a QWidget pointer.
> So what I get is a Python QWidget wrapper object.
This is quite a general problem for which I would like to know a solution
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list