Results 1 to 3 of 3

Thread: QTableView activated signal not called

  1. #1
    Join Date
    Apr 2009
    Posts
    32
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTableView activated signal not called

    Hi,

    I have a QTableView. If I connect to the signal 'void activated(const QModelIndex & index)', the method I connect to is not called, when I double-click, single-click, enter by tab, enter by space-press etc.

    However, if I connect to the signal 'void doubleClicked(const QModelIndex & index)', my method does get called when I double-click a table cell.

    Am I misunderstanding the meaning of the 'activated' signal or doing something else wrong.

    Best regards

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView activated signal not called

    This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.
    Select an item and press enter to activate it.
    If you disable editing ( table->setEditTriggers( QAbstractItemView::NoEditTriggers ); ) then double-click also activates the item.

  3. #3
    Join Date
    Jun 2011
    Posts
    69
    Thanks
    13
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QTableView activated signal not called

    Signals names on the QTable{Widget,View} always make me confuse, everytime it force me to assistant[ROCKS] !
    ...یه مرد هیچوقت زمین نمیخوره

Similar Threads

  1. Replies: 7
    Last Post: 12th October 2016, 08:48
  2. Replies: 11
    Last Post: 15th October 2011, 22:51
  3. QComboBox activated signal: bad int value?
    By rfdutt in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2008, 23:29
  4. emit the activated signal on a combobox
    By Equilibrium in forum Qt Programming
    Replies: 4
    Last Post: 8th November 2007, 12:33
  5. Hasn't QTableWidget an "activated" signal?
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2007, 01:53

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.