Noob question on PyQt and Qt

Discussion in 'Python' started by dusty, Aug 1, 2004.

  1. dusty

    dusty Guest

    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?
    dusty, Aug 1, 2004
    #1
    1. Advertising

  2. 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
    Phil Thompson, Aug 1, 2004
    #2
    1. Advertising

  3. dusty

    dusty Guest

    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.
    dusty, Aug 1, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    5
    Views:
    372
    Patrick Steele [MVP]
    Jun 18, 2004
  2. drgonzo120
    Replies:
    9
    Views:
    570
    Owen Jacobson
    Oct 7, 2005
  3. ulysses
    Replies:
    4
    Views:
    757
    Werner Schiendl
    Oct 22, 2003
  4. Volker Lenhardt
    Replies:
    5
    Views:
    3,348
    Volker Lenhardt
    Nov 19, 2005
  5. zefciu
    Replies:
    8
    Views:
    282
    Petr Prikryl
    Jul 4, 2006
Loading...

Share This Page