469,579 Members | 1,239 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Noob question on PyQt and Qt

I am learning Python and Qt designer (using eric3). I'm writing an app
using QCheckList and have succeeded in loading parent and children,
with checkboxes, with data from a file. I want to programmatically
check some boxes depending on the string from the list.

This is the code that I use to create the checkbox's:
~~~
d = QCheckListItem(it, lstI[g:], QCheckListItem.CheckBox)
self.childlist1.append(d)
~~~
The first char in each line in 'lstI' determines if the checkbox
should be checked or not.
How do I change the checkbox to 'On' (checked) in Python code when the
checkbox is created?
Jul 18 '05 #1
2 1798
On Sunday 01 August 2004 6:42 pm, dusty wrote:
I am learning Python and Qt designer (using eric3). I'm writing an app
using QCheckList and have succeeded in loading parent and children,
with checkboxes, with data from a file. I want to programmatically
check some boxes depending on the string from the list.

This is the code that I use to create the checkbox's:
~~~
d = QCheckListItem(it, lstI[g:], QCheckListItem.CheckBox)
self.childlist1.append(d)
~~~
The first char in each line in 'lstI' determines if the checkbox
should be checked or not.
How do I change the checkbox to 'On' (checked) in Python code when the
checkbox is created?


Use the setOn() method.

Phil
Jul 18 '05 #2
On Sun, 1 Aug 2004 19:32:10 +0100, Phil Thompson
<ph**@riverbankcomputing.co.uk> wrote:
On Sunday 01 August 2004 6:42 pm, dusty wrote:
I am learning Python and Qt designer (using eric3). I'm writing an app
using QCheckList and have succeeded in loading parent and children,
with checkboxes, with data from a file. I want to programmatically
check some boxes depending on the string from the list.

This is the code that I use to create the checkbox's:
~~~
d = QCheckListItem(it, lstI[g:], QCheckListItem.CheckBox)
self.childlist1.append(d)
~~~
The first char in each line in 'lstI' determines if the checkbox
should be checked or not.
How do I change the checkbox to 'On' (checked) in Python code when the
checkbox is created?


Use the setOn() method.

Phil


Thanks Phil.

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Ilya Knizhnik | last post: by
2 posts views Thread by Dennis Sylvester | last post: by
35 posts views Thread by Vamsi Mudrageda | last post: by
8 posts views Thread by simo | last post: by
10 posts views Thread by svenn.are | last post: by
3 posts views Thread by Fabio | last post: by
10 posts views Thread by Simon John | last post: by
4 posts views Thread by Phil Thompson | last post: by
17 posts views Thread by eholbroo | last post: by
3 posts views Thread by Phil Thompson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.