Results 1 to 1 of 1

Thread: How to make QtreeWidget's custom check, uncheck and Scrollbar

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default How to make QtreeWidget's custom check, uncheck and Scrollbar

    Hi

    I m developing application that need custom QTreeWidget.
    I have used setStyleSheet for QTreeWidget so that its look like Custom QTreeWidget.
    But its Check, Uncheck and Scrollbar doen't make custom .It looks like Standard.
    Kindly check attatchment. In the attatchment I have make three seperate custom QCheckBox. I m showing icon on check, uncheck of QCheckBox.
    But for QTreeWidget, How we can use this custom QCheckBox or there is other way to show it.
    for e.g.

    QTreeWidgeItem *p = new QTreeWidgetItem(treeWidget);
    p->setCheckState(0,Qt::Checked);

    for e.g.
    QString str = "QTreeView { alternate-background-color: red;}"
    "QTreeView { show-decoration-selected: 1;}"
    "QTreeView::item {border: 1px solid #d9d9d9;border-top-color: transparent; border-bottom-color: transparent;}"
    "QTreeView::item:hover {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);border: 1px solid #bfcde4;}"
    "QTreeView::item:selected {border: 1px solid #567dbc;}"

    ((QTreeView*)treeWidget)->setStyleSheet(str);


    But How we can make QTreeWidget's checkbox custom so that we can our icon
    and also custom scrollbar for QTreeWidget so that our scroll's Image will show.

    Thanks
    Santosh
    Attached Images Attached Images

Similar Threads

  1. Replies: 5
    Last Post: 7th July 2010, 04:58
  2. Checkboxes: check and uncheck
    By 3nc31 in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2008, 21:26
  3. QTreeWidget (Row Check, Custom Sort)
    By AaronMK in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2008, 15:55
  4. Check and Uncheck on a Dir Tree?
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 3rd July 2007, 11:55
  5. QListWidgetItem check/uncheck
    By Arthur in forum Qt Programming
    Replies: 6
    Last Post: 12th May 2006, 10:19

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.