Results 1 to 2 of 2

Thread: QItemSelectionModel and selectionChanged / currentChanged.

  1. #1
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QItemSelectionModel and selectionChanged / currentChanged.

    Hello guys

    i have a QTableView driven by a QSqlTableModel. i have connected my table view selection model via currentChanged signal (Also tried selectionChanged), so i have "contextual" buttons which are available or not wether a selection is made in the table.

    However, here is the behavior i have:
    - If i click an item, the slot get called.
    - If i use Ctrl + click to deselect this very same item, the slot is not called.
    - If i use Ctrl + A to select all, the slot is never called neither.

    How can i get notified of any kind of "item highlight" event via slots / signals?

    i'm using Qt 4.7.2 OpenSource.
    Tanks a lot,
    Pierre.

  2. #2
    Join Date
    Dec 2006
    Posts
    160
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QItemSelectionModel and selectionChanged / currentChanged.

    Bump. Anyone please?

Similar Threads

  1. Replies: 6
    Last Post: 20th April 2011, 11:26
  2. QItemSelectionModel and QTreeView
    By rrafluap in forum Qt Programming
    Replies: 0
    Last Post: 13th December 2010, 19:49
  3. Replies: 2
    Last Post: 18th November 2009, 23:14
  4. Problem connecting selectionChanged
    By jano_alex_es in forum Newbie
    Replies: 2
    Last Post: 1st June 2009, 15:57
  5. QItemSelectionModel::currentChanged and revert change
    By Lykurg in forum Qt Programming
    Replies: 5
    Last Post: 25th March 2009, 07:48

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.