Results 1 to 2 of 2

Thread: Change a flag from QTreeWidgetItem?

  1. #1
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Change a flag from QTreeWidgetItem?

    Hi,

    How can I set Qt::ItemIsSelectable flag = false to a QTreeWidgetItem?

    Thanks,
    Carlos

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Change a flag from QTreeWidgetItem?

    Qt Code:
    1. item->setFlags(item->flags() & ~Qt::ItemIsEditable);
    To copy to clipboard, switch view to plain text mode 
    Last edited by Santosh Reddy; 26th May 2011 at 10:33.

  3. The following user says thank you to Santosh Reddy for this useful post:

    qlands (26th May 2011)

Similar Threads

  1. add a compiler flag
    By GrahamLabdon in forum Newbie
    Replies: 2
    Last Post: 18th April 2011, 14:47
  2. Replies: 5
    Last Post: 23rd September 2010, 13:58
  3. How can we add -O2 flag into .pro file?
    By learning_qt in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2009, 08:15
  4. Flag storing
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2009, 05:26
  5. using Q::desktop flag
    By nupul in forum Newbie
    Replies: 1
    Last Post: 30th April 2006, 14:58

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
  •  
Qt is a trademark of The Qt Company.