JazzKatua
3rd January 2014, 22:23
Hi Every-1!
In my DVDCollection-Application I'm trying to pass a DVD-object made in a QDialog onto the main-application.
void WdgDvdsCollection::on_btnInputNewDvd_clicked()
{
DlgNewDvd dialog(this);
if (dialog.exec() == QDialog::Accepted)
{
Dvd d = dialog.tempDvd;
InsertNewDvd(d);
UpdateUi();
}
}
void WdgDvdsCollection::InsertNewDvd(Dvd d)
{
QSqlQuery query;
query.prepare("insert into tblDvds (title, publisher, nrOfDvds, genre) values (:title, :publisher, :nrOfDvds, :genre");
// rest of code in method
}
When I debug the application with F10, it enters the if-structure (so it executes dialog.exec() and 'accepts' the QDialog.
The Dvd-object d in the if-structure gets the values from the DVD in QDialog; so the DVD-object is also made.
But when I try to execute the next line (i.e. InsertNewDvd(d); ) with F10, the debugger steps over the line and the method doesn't get executed...
Any idea?
Grtz,
JazzKatua
In my DVDCollection-Application I'm trying to pass a DVD-object made in a QDialog onto the main-application.
void WdgDvdsCollection::on_btnInputNewDvd_clicked()
{
DlgNewDvd dialog(this);
if (dialog.exec() == QDialog::Accepted)
{
Dvd d = dialog.tempDvd;
InsertNewDvd(d);
UpdateUi();
}
}
void WdgDvdsCollection::InsertNewDvd(Dvd d)
{
QSqlQuery query;
query.prepare("insert into tblDvds (title, publisher, nrOfDvds, genre) values (:title, :publisher, :nrOfDvds, :genre");
// rest of code in method
}
When I debug the application with F10, it enters the if-structure (so it executes dialog.exec() and 'accepts' the QDialog.
The Dvd-object d in the if-structure gets the values from the DVD in QDialog; so the DVD-object is also made.
But when I try to execute the next line (i.e. InsertNewDvd(d); ) with F10, the debugger steps over the line and the method doesn't get executed...
Any idea?
Grtz,
JazzKatua