Results 1 to 5 of 5

Thread: How to make checked and disabled a QTreeWidgetItem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default How to make checked and disabled a QTreeWidgetItem

    Hi,
    I want to set checked AND disabled an QTreeWidgetItem on QTreeWidget but :

    If I use :
    QTreeWidgetItem *item = new QTreeWidgetItem(itemParent, "myText");
    item->setCheckState(0, Qt::Checked );
    item->setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsEnabled );
    Item is checked but not disabled

    and if I use :
    QTreeWidgetItem *item = new QTreeWidgetItem(itemParent, "myText");
    item->setCheckState(0, Qt::Checked );
    item->setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsSelectable );
    Item is disabled but not checked

    Thanks
    Last edited by jlbrd; 4th August 2006 at 10:50.
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

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.