Dynamic RadioButton creation with Python + Qt

Wagner Garcia Campagner wcampagner at hotmail.com
Mon Aug 21 10:56:15 EDT 2006


Thanks Fredrik,

Your suggestion solved my problems!!!!!!!!!

Thanks,
Wagner.


>From: Fredrik Lundh <fredrik at pythonware.com>
>To: python-list at python.org
>Subject: Re: Dynamic RadioButton creation with Python + Qt
>Date: Mon, 21 Aug 2006 16:20:09 +0200
>
>Wagner Garcia Campagner wrote:
>
> > I'm trying to create dynamic RadioButton as follows:
> >
> > for i in out.keys():
> >     msg = "radioButton_" + str(i)
> >     msg2 = 20 * x
> >     msg = QRadioButton(self.buttonGroup_interfaces, msg)
> >     msg.setGeometry(QRect(30,msg2,121,23))
> >     msg.setTect(i)
> >     x += 1
> >
> > The problem is that Python is creating all RadioButton as "msg" and not 
>the
> > value of "msg" so i can't access the RadioButton after the creation.
> >
> > Is there a way i can create the RadioButton with diferent names??
>
>if you want to keep track of a list of things, store them in a list.
>
></F>
>
>--
>http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list