Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] showing the dialog in a different way
I am trying to load up the dialog in a different way so that the mainwindow does not continue to read the next line in code until the dialog is closed. is this possible? below is the code that i think will work but i am getting an error... expected primary-expression before '*' token
the loginBox is the name to my dialog.
Eddy last edited by
Can you show us the code line where that error refers to? And also the ones just before it.
A modal dialog via
is probably what you want
here are the two lines. the last line gives the error.
no i don't want login->exec because i can't see the mainwindow
So, it's not really a dialog... Are you sure your error "expected primary-expression before ‘*’ token" is on that line?
yes. the loginBox is the name of the dialog. expected primary-expression before ')' token. my first post did not save the error correctly.
You'll have to show us the rest of the code (particularly where you are declaring you loginBox).
i am not declaring the loginbox in the header. only at the mainwindow.cpp file.
@MainWindow::MainWindow(QWidget *parent) :
login = new loginBox(this);
According to this code, you're not declaring it in the .cpp file either.
To declare the variable, you need to add (to your mainwindow.h file)
loginBox * login;