Dear all,
Currently i'm trying to export data (which is in stored in a QTableWidget) to a MySQL database. No problem so far with the database. The following is driving me mad though...
The QTableWidget is placed in MainWidow.ui where data simply can be extracted with the following code.
ui->tablewidget->item(column, row)
ui->tablewidget->item(column, row)
To copy to clipboard, switch view to plain text mode
When I would like to export the items in the tablewidget, I push a button where a new QDialog pops up. In this dialog, I need to fill some value's in a few LineEdit's and comboBoxes.These values also will be exported to the MySQL database. Because it's a new QDialog, a new ui has been set up by the code:
ui(new Ui::dbase)
{
ui->setupUi(this);
}
dbase::dbase(QWidget *parent) :
QDialog(parent),
ui(new Ui::dbase)
{
ui->setupUi(this);
}
To copy to clipboard, switch view to plain text mode
The question now is, how to get the data from the QWidgetTable which is in MainWindow.ui without closing the QDialog window? The following doenst work, because the new QDialog hasn't a QTableWidget
ui->tablewidget->item(column, row)
ui->tablewidget->item(column, row)
To copy to clipboard, switch view to plain text mode
Thank's in advance for you help.
Bookmarks