Results 1 to 1 of 1

Thread: setindexwidget and not selectable widget

  1. #1
    Join Date
    Jul 2007
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default setindexwidget and not selectable widget

    Hi all,
    I am using QAbstractItemView class and setIndexWidget method in QStyledItemDelegate paint method. I set movie to view cell.

    this is code snipped from my program.
    Qt Code:
    1. QLabel * pLabel= new QLabel();
    2. pLabel->setPixmap(iconPath);
    3. pLabel->setScaledContents(true);
    4. pLabel->setFixedSize(PROCESS_MODEL_DEFAULT_ICON_WIDHT,PROCESS_MODEL_DEFAULT_ICON_HEIGHT);
    5.  
    6. QWidget * pWidget = new QWidget;
    7. QHBoxLayout *layout = new QHBoxLayout;
    8. layout->addWidget(pLabel);
    9. QLabel * pTextLabel = new QLabel(durumText);
    10. layout->addWidget(pTextLabel);
    11. layout->setContentsMargins(0,0,0,0);
    12. pWidget->setLayout(layout);
    13. mView.setIndexWidget(index, pWidget );
    To copy to clipboard, switch view to plain text mode 

    But column which i set with setIndexWidget is not selectable. So when i select row in view the movie column is not selected.

    There is screenshot example.

    How can i set widget selected when row selected?

    Thanks in advance

    Ramazan Girgin
    Attached Images Attached Images

Similar Threads

  1. QListView::setIndexWidget custom sorting
    By drus in forum Qt Programming
    Replies: 2
    Last Post: 10th December 2010, 08:52
  2. About setIndexWidget
    By aekilic in forum Qt Programming
    Replies: 20
    Last Post: 15th December 2009, 16:08
  3. having problem with setIndexWidget
    By hamid ghous in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2009, 05:01
  4. Model View - Delegate - setIndexWidget
    By starcontrol in forum Qt Programming
    Replies: 16
    Last Post: 2nd April 2008, 14:30
  5. setIndexWidget and proxy interaction
    By Derf in forum Qt Programming
    Replies: 3
    Last Post: 25th March 2006, 18:15

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.