Xtresis
29th September 2010, 08:13
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)
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:
dbase::dbase(QWidget *parent) :
QDialog(parent),
ui(new Ui::dbase)
{
ui->setupUi(this);
}
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)
Thank's in advance for you help.
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)
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:
dbase::dbase(QWidget *parent) :
QDialog(parent),
ui(new Ui::dbase)
{
ui->setupUi(this);
}
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)
Thank's in advance for you help.