hi,
I am in a big confussion now.
My application
main.cpp is calling a class
View defined in the file
View.cpp. Later in progress of the program, It calls another class
PB in the file
PB.cpp. But i don't know how to exit from the previous class and proceed to the new class.
I tried it as
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "screen.h" /* #in# Variables*/
#include "PB.h"
#include "View.h"
#include <qapplication.h>
int main( int argc, char **argv )
{
QApplication app( argc, argv );
while(true) {
if(inView == true)
{
View window;
window.setCaption( "View" );
app.setMainWidget( &window );
window.show();
return app.exec();
inView = false;
}
else if(inPB == true)
{
PB window;
window.setCaption( "PB" );
app.setMainWidget( &window );
window.show();
return app.exec();
inPB = false;
}
}
|
But I cant able to return from the View Class.
delete this; in
View class creates Segmentation Fault.
Plz help
mahe2310