Hello,
I want to get the text of a cell of a tablewidget on my form.
I have already filled the tablewidget with new tablewidgetitems using setItem(), and all text is showing fine in my first test program.
Now i try to write a 'getter' function using the QTablewidget text() function like this :
QString CMainDialog
::getTableText( int nRow,
int nCol
) {
if( pCell!=NULL )
sResult = pCell->text();
return sResult;
}
QString CMainDialog::getTableText( int nRow, int nCol )
{
QString sResult="-";
QTableWidgetItem *pCell = ui->tblPorts->item( nRow, nCol );
if( pCell!=NULL )
sResult = pCell->text();
return sResult;
}
To copy to clipboard, switch view to plain text mode
Compiling goes fine, but then I get a linker error saying
mainDialog.obj:: error: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QTableWidgetItem::text(void)const " (__imp_?text@QTableWidgetItem@@QBE?AVQString@@XZ)
I am working with QtCreator and have Qt 4.6.3 statically linked with the MS VC compiler.
Has anyone already encountered this ? Or better yet, has a solution for this ?
Best regards,
Marc
Bookmarks