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
#include "screen.h" /* #in# Variables*/
#include "PB.h"
#include "View.h"
#include <qapplication.h>
int main( int argc, char **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;
}
}
#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;
}
}
To copy to clipboard, switch view to plain text mode
But I cant able to return from the View Class.
delete this; in View class creates Segmentation Fault.
Plz help
mahe2310
Bookmarks