Results 1 to 7 of 7

Thread: QTableView doubleclicked event not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableView doubleclicked event not working

    I wonder if anybody can help me. I'm having a similar problem with not being able to get "doubleClicked" to work on a QTableView. I'm using Qt 4.5.0 (commercial) on Windows XP.

    I have a simple form with a QTableView. I create and set my model as follows:

    Qt Code:
    1. g_paScheduleTableModel = new AScheduleTableModel(m_paSchedule);
    2. ui.m_pqScheduleTableView->setModel( g_paScheduleTableModel );
    To copy to clipboard, switch view to plain text mode 
    I make sure the edit triggers are set and may my connections:

    Qt Code:
    1. ui.m_pqScheduleTableView->setEditTriggers(QAbstractItemView::AllEditTriggers);
    2. connect(ui.m_pqScheduleTableView, SIGNAL(clicked(const QModelIndex&)), this,
    3. SLOT(cellClicked(QModelIndex& )));
    4. connect(ui.m_pqScheduleTableView, SIGNAL(doubleClicked( const QModelIndex&)), this, SLOT(cellDoubleClicked(const QModelIndex&)));
    To copy to clipboard, switch view to plain text mode 
    I receive the signals for "clicked" but I do not receive the signals "doubleClicked".

    Any suggestions?
    Last edited by jpn; 15th March 2009 at 10:39. Reason: missing [code] tags

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
  •  
Qt is a trademark of The Qt Company.