Noob question on PyQt and Qt

dusty noone at nowhere.com
Sun Aug 1 22:32:08 CEST 2004


On Sun, 1 Aug 2004 19:32:10 +0100, Phil Thompson
<phil at 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.




More information about the Python-list mailing list