Anothere (complete!) noob here...I'm not really getting this.
...
qDebug() << "Opening window...";
DodajanjeRacuna x;
if (x.
exec() == QDialog::Accepted ) { qDebug() << "You pressed OK!";
}
...
...
qDebug() << "Opening window...";
DodajanjeRacuna x;
if (x.exec() == QDialog::Accepted ) {
qDebug() << "You pressed OK!";
}
...
To copy to clipboard, switch view to plain text mode
The dialog opens and works OK. When I press "OK", I get "you pressed OK") but there is no such thing as x.getValues() available 
Am I missing something in my dialog? I have few text inputs and that's it... there re the constructor and destructor:
#include "dodajanjeracuna.h"
#include "ui_dodajanjeracuna.h"
#include <QtDebug>
DodajanjeRacuna
::DodajanjeRacuna(QWidget *parent
) : m_ui(new Ui::DodajanjeRacuna)
{
m_ui->setupUi(this);
this->Rolete(); // fill dropdowns
}
DodajanjeRacuna::~DodajanjeRacuna()
{
delete m_ui;
}
#include "dodajanjeracuna.h"
#include "ui_dodajanjeracuna.h"
#include <QtDebug>
DodajanjeRacuna::DodajanjeRacuna(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::DodajanjeRacuna)
{
m_ui->setupUi(this);
this->Rolete(); // fill dropdowns
}
DodajanjeRacuna::~DodajanjeRacuna()
{
delete m_ui;
}
To copy to clipboard, switch view to plain text mode
Could I use *parent from constructor to pass data to opener; would that be the right way?
Bookmarks