The workaround to this stupidity is:
On the top:
#define protected public
#include <QTableWidget>
#define protected public
#include <QTableWidget>
To copy to clipboard, switch view to plain text mode
then:
void DBs
::on_table_doubleClicked(const QModelIndex &index
) {
on_table_itemDoubleClicked(ui->table->itemFromIndex(index));
}
void DBs::on_table_doubleClicked(const QModelIndex &index)
{
on_table_itemDoubleClicked(ui->table->itemFromIndex(index));
}
To copy to clipboard, switch view to plain text mode
VOILA! Doing this in production code, by the way! ;] And I really HATE doing this, but....
And by the way,
on_table_itemDoubleClicked(ui->table->item(index.row(),index.column()));
on_table_itemDoubleClicked(ui->table->item(index.row(),index.column()));
To copy to clipboard, switch view to plain text mode
is also an option, but in my case with a huge database the protected hack did 10 seconds time price from performance point of view (dataset with milliards of records).
Bookmarks