Results 1 to 3 of 3

Thread: User row selection in QTableView

  1. #1
    Join Date
    Jan 2008
    Posts
    39
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default User row selection in QTableView

    Hello
    I have a QTableView where the user clicks on rows to display a row of data in a DataWidgetMapper. They then edit it

    My problem is that I need to distinguish between rows that are selected by the user and those that are selected programmatically. If the row is selected by the user, I need to ask for save confirmation. If the row is selected programiticaly - first row in list after a search for example, then the save confirmation is not called. At the moment I am using currentRowChanged, but that is picking up row selections by both the user and the application

  2. #2
    Join Date
    Jan 2008
    Posts
    39
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: User row selection in QTableView

    I have tried activated for user selections and that seems to be working but how do I detect row changes only made programatically

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: User row selection in QTableView

    ( Total rows selected - no of user rows selected )

    by the way if u want to save changed data, u can have a look at QAbstractItemView::commitData. I dont see the need for monitoring which rows have changed programitcally and which have been changed by the user...

Similar Threads

  1. cell selection in QTableView
    By user in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2008, 01:01
  2. QTableView Row Selection
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 12th December 2007, 21:27
  3. QTableView row selection
    By davemar in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2007, 14:39
  4. CheckBox and selection in QTableView
    By Mike Krus in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2006, 20:31
  5. User Interface with QTableView
    By Brandybuck in forum Qt Programming
    Replies: 1
    Last Post: 22nd March 2006, 23:24

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.