Results 1 to 3 of 3

Thread: enabling a QTreeWidgetItem as false

  1. #1
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy enabling a QTreeWidgetItem as false

    Hi,

    I have created QTreeWidgetItem. Now i want to set the items in the tree as false initially and on passing of some info they will be set to true.
    false means they will not respond to any click event.
    true means they will respond to the click event.

    I tried using the setEnabled function but it seems that there is not setEnabled function for QTreeWidgetItem.

    Please tell me how to set the tree item as false so that am able to initialize them as false and then later as true.

    Thanking you,

    Kapil

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: enabling a QTreeWidgetItem as false

    QTreeWidgetItem::flags

    The default value for flags is Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled. If the item was constructed with a parent, flags will in addition contain Qt::ItemIsDropEnabled.
    Remove default flag Qt::ItemIsEnabled by using:
    QTreeWidgetItem::setFlags()

  3. #3
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: enabling a QTreeWidgetItem as false

    Thanks a lot.

    Its resolved

Similar Threads

  1. Problem with connect()
    By mrnor3 in forum Qt Programming
    Replies: 3
    Last Post: 23rd July 2008, 14:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.