I am trying to connect external widgets(slider, combobox, lineedit, etc) to specific QTableWidgetItem.
The widgets are not embed into the QTableWidget.
All the widgets have their own Signals, which is really fantastic,
BUT the QTableWidgetItem have no SLOTS!
How can i set the values of the QTableWidgetItems using other widgets outside the QTableWidget?
I tried something like the code below but it simply does not work
//setting up the table
dataSheet->setRowCount(3);
dataSheet->setColumnCount(7);
//initializing the QTableWidgetItem
int row = 0, col = 0;
dataSheet->setItem(row, col, newItem);
//creating external widget
//trying to connect?!
connect(action,
SIGNAL( textChanged
( const QString & ) ), newItem,
SLOT( setText
( const QString & ) ));
//setting up the table
QTableWidget *dataSheet = new QTableWidget;
dataSheet->setRowCount(3);
dataSheet->setColumnCount(7);
//initializing the QTableWidgetItem
int row = 0, col = 0;
QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(343.3432));
dataSheet->setItem(row, col, newItem);
//creating external widget
QLineEdit *action = new QLineEdit;
//trying to connect?!
connect(action, SIGNAL( textChanged ( const QString & ) ), newItem, SLOT( setText ( const QString & ) ));
To copy to clipboard, switch view to plain text mode
any suggestions?!
Bookmarks