code as one base class having
two forms as two separate dialogs ..
show form1 first using form1->show();
http://doc.trolltech.com/4.0/qwidget.html#show
and use
QDialog::rejected().
if it returns true then show form2 using form2->show();
code as one base class having
two forms as two separate dialogs ..
show form1 first using form1->show();
http://doc.trolltech.com/4.0/qwidget.html#show
and use
QDialog::rejected().
if it returns true then show form2 using form2->show();
"Behind every great fortune lies a crime" - Balzac
I have a base class as desktop and 2 forms as coreui and newdevice
How should i declare them as 2 seperate forms in the single base class???
create a own custom dialogs for both and include the dialogs in base class
just try to show() them one after other between
QDialog::rejected() in the baseClass
rejected() will return if one dialog is closed ... show the next one ... simple
"Behind every great fortune lies a crime" - Balzac
I have declared it like this
Qt Code:
namespace Ui { class DialogClass; class newdevice; } private: Ui::DialogClass *ui; Ui::newdevice *newui;To copy to clipboard, switch view to plain text mode
ui is form 2. newui is form 1.
but i am not able to declare newui->show();
I am getting this error.
What am i doing wrong?error: invalid use of undefined type `struct Ui::newdevice'
error: forward declaration of `struct Ui::newdevice'
i think you need to #include the header where Ui::newdevice was defined.
right the problem is on the .h file inclusion
or check in Ui::newdevice that u named both designer and here a same name ..
also include ui_newdevice.h and
check whether it is available after qmake in your folder
"Behind every great fortune lies a crime" - Balzac
I have included the file
#include "ui_coreui.h"
#include "ui_newdevice.h"
I am still facing the same problems.
Fixed it. Some small mistake while declaring the class
Now
Qt Code:
To copy to clipboard, switch view to plain text mode
this is my base class. it has form 2 associated with it.
this is the code where i want form 1 to run
Qt Code:
int desktop::serialnumberacceptance() { newui->setupUi(dlg); dlg->exec(); dlg->deleteLater(); }To copy to clipboard, switch view to plain text mode
I am getting weird error now.
A message box pops up saysing
Runtime Error!
Program: ..... /../../.. app.exe
This application has requested the runtime to terminate it in a unusual way. Please contact the application support team for more information.
It also says QList: Out of memory in the application output screen.
How can i solve this?
Bookmarks