Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Noob question on PyQt and Qt

Reply
Thread Tools

Noob question on PyQt and Qt

 
 
dusty
Guest
Posts: n/a
 
      08-01-2004
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?
 
Reply With Quote
 
 
 
 
Phil Thompson
Guest
Posts: n/a
 
      08-01-2004
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
 
Reply With Quote
 
 
 
 
dusty
Guest
Posts: n/a
 
      08-01-2004
On Sun, 1 Aug 2004 19:32:10 +0100, Phil Thompson
<> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Here a noob, there a noob.... JimDoire MCSE 0 04-10-2008 07:23 PM
PyQt layout question: QScrollView and QGridLayout? Volker Lenhardt Python 5 11-19-2005 03:04 PM
JNI noob question, and the whole thing too drgonzo120 Java 9 10-07-2005 02:33 PM
simple question about a textbox and today's date ..noob TN Bella ASP .Net 5 06-18-2004 04:31 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57