int main( int argc, char **argv )
{
// create child dialog
ProfileParms profParms;
profParms.setModal(FALSE);
profParms.show();
// hide dialog until needed
profParms.hide();
// create main window
lprofMain w;
w.show();
// Setup signals and slots connections so that
// main window and child dialog can interact as needed
QObject::connect(&profParms,
SIGNAL(signalPickRGB
()),
&w,
SLOT(slotPickRGBPatch
()));
QObject::connect(&profParms,
SIGNAL(profileParmsOK
()),
&w,
SLOT(slotUpdateProfileParmsText
()));
QObject::connect(&w,
SIGNAL(showProfileParms
()),
&profParms,
SLOT(slotShow
()));
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
// Start everything running
return a.exec();
}
int main( int argc, char **argv )
{
QApplication a( argc, argv );
// create child dialog
ProfileParms profParms;
profParms.setModal(FALSE);
profParms.show();
// hide dialog until needed
profParms.hide();
// create main window
lprofMain w;
w.show();
// Setup signals and slots connections so that
// main window and child dialog can interact as needed
QObject::connect(&profParms, SIGNAL(signalPickRGB()), &w, SLOT(slotPickRGBPatch()));
QObject::connect(&profParms, SIGNAL(profileParmsOK()), &w, SLOT(slotUpdateProfileParmsText()));
QObject::connect(&w, SIGNAL(showProfileParms()), &profParms, SLOT(slotShow()));
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
// Start everything running
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks