Results 1 to 3 of 3

Thread: Disable QTreeWidgetItem and not allowing to expand

  1. #1
    Join Date
    Jun 2018
    Location
    India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Question Disable QTreeWidgetItem and not allowing to expand

    Hi,

    I am using a QTreeWidget in which I want to disable/ don't allow the user to expand the TreewidgetItem on certain cases. How can i achieve this?
    item->SetDisabled(false) is not working anyhow.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Disable QTreeWidgetItem and not allowing to expand

    QTreeWidgetItem::setDisabled() should have the value "true" if you do not want the user to be able to interact with it.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jun 2018
    Location
    India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Disable QTreeWidgetItem and not allowing to expand

    Sorry. I was setting the Value to "true" only, but even then i could able to expand the TreeItem.

Similar Threads

  1. Disable QTreeWidgetItem drag and drop reorder
    By Alundra in forum Qt Programming
    Replies: 0
    Last Post: 6th January 2016, 17:05
  2. disable QTreeWidgetItem
    By minamz in forum Qt Programming
    Replies: 0
    Last Post: 16th June 2013, 09:04
  3. Disable Single Checkbox in QTreeWidgetItem
    By deepal_de in forum Qt Programming
    Replies: 8
    Last Post: 25th May 2011, 09:27
  4. Question about QTreeWidgetItem expand
    By santosh.kumar in forum Qt Programming
    Replies: 0
    Last Post: 30th April 2008, 05:32
  5. How to set visible the QTreeWidgetItem expand '+' mark
    By mcostalba in forum Qt Programming
    Replies: 3
    Last Post: 14th January 2007, 03:21

Tags for this Thread

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.