Results 1 to 2 of 2

Thread: QCombox in qtableview to make whole row selected in single click

  1. #1
    Join Date
    Feb 2014
    Posts
    60
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default QCombox in qtableview to make whole row selected in single click

    hi,
    I am working on QTableView which has number of QComboBox and QLineEdit.I have QStyledItemDelegate where i set Data accordingly.Everything is working fine but now the problem is combo box is created when i single click on a cell .But this should not happen i want the behavior to be like on single click it should select the entire row and on double click it should create combo box for me.
    thanks,

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,590
    Thanks
    13
    Thanked 1,586 Times in 1,515 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QCombox in qtableview to make whole row selected in single click

    Set the edit triggers on the table view so that a single click does not enter edit mode:
    QAbstractItemView::setEditTriggers()

Similar Threads

  1. Replies: 0
    Last Post: 21st October 2013, 10:16
  2. Telling apart single click and double click in QTableView
    By jgirlich in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2013, 15:27
  3. Replies: 2
    Last Post: 16th July 2012, 13:40
  4. QTableView item's Highlight in QCombox
    By litterflybug in forum Qt Programming
    Replies: 1
    Last Post: 26th August 2009, 15:06
  5. Replies: 6
    Last Post: 5th June 2009, 10:38

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.