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:
g_paScheduleTableModel = new AScheduleTableModel(m_paSchedule);
ui.m_pqScheduleTableView->setModel( g_paScheduleTableModel );
g_paScheduleTableModel = new AScheduleTableModel(m_paSchedule);
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:
connect(ui.m_pqScheduleTableView, SIGNAL(clicked(const QModelIndex&)), this,
SLOT(cellClicked(QModelIndex& )));
connect(ui.m_pqScheduleTableView, SIGNAL(doubleClicked( const QModelIndex&)), this, SLOT(cellDoubleClicked(const QModelIndex&)));
ui.m_pqScheduleTableView->setEditTriggers(QAbstractItemView::AllEditTriggers);
connect(ui.m_pqScheduleTableView, SIGNAL(clicked(const QModelIndex&)), this,
SLOT(cellClicked(QModelIndex& )));
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?
Bookmarks