Results 1 to 3 of 3

Thread: Double clicking with QTableView

  1. #1
    Join Date
    Jul 2006
    Posts
    33
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default Double clicking with QTableView

    I'm trying to get the doubleClicked signal connected to my slot, but I receive an error.
    The following code produces an error:
    Qt Code:
    1. QObject::connect(m_ui.m_myTable,
    2. SIGNAL(doubleClicked ( const QModelIndex & index )),
    3. this,
    4. SLOT(myDoubleClick ( const QModelIndex & index )),
    5. Qt::QueuedConnection);
    To copy to clipboard, switch view to plain text mode 

    where 'm_ui.m_myTable' is of type, QTableView*.

    Here is the error message:
    QMetaObject::connectSlotsByName(): No matching signal for on_clearLogButton_clicked()
    Object::connect: No such signal QTableView::doubleClicked(QModelIndex&index)
    Object::connect: (sender name: 'm_holdemAllTable')
    Object::connect: (receiver name: 'QTPokerClientClass')


    Does anyone know how to avoid this error?

    I got some iunput from the following thread, but I don't know how the thread ended.
    http://www.qtcentre.org/forum/f-qt-p...cell-1037.html

    Thanks,
    DP
    Last edited by DPinLV; 13th September 2006 at 05:40. Reason: Premature entry.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Double clicking with QTableView

    You may not put parameter names into the connect statement, it should be:
    Qt Code:
    1. QObject::connect(m_ui.m_myTable,
    2. SIGNAL(doubleClicked ( const QModelIndex & )),
    3. this,
    4. SLOT(myDoubleClick ( const QModelIndex & )),
    5. Qt::QueuedConnection);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    DPinLV (13th September 2006)

  4. #3
    Join Date
    Jul 2006
    Posts
    33
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Double clicking with QTableView

    Duh, yes I forgot about that... thanks it works now.

Similar Threads

  1. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 09:24
  2. QTableView - Enable Clicking for some columns only
    By Gabriel in forum Qt Programming
    Replies: 1
    Last Post: 23rd June 2006, 23:42
  3. Replies: 1
    Last Post: 17th May 2006, 01:23
  4. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 14:49
  5. [Qt 4.1] Strange behaviour with QTableView
    By fane in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 07:17

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.