swamyonline
30th June 2008, 19:48
hi ppl,
this issue might be addressed before, but i did not find right solution. in my application i am using one file(ex..mainwindow.cpp) for gui drawing and some other files for accessing and controlling gui. if the signals r generated in mainwindow.cpp (gui file) they should be accessed in the control files and vice versa.. how can i do that. guys, pls help in this regard. iam giving the outline of my application.
// 1. main.cpp
#include "mainwindow.h"
main
{
create mainwindow object and show. // its the gui window
}
// 2. mainwindow.cpp
#include "mainwindow.h"
{
create gui window and display.
setup signals for window widgets and their corresponding slots.
}
// 3. controller1.cpp
{
catch signals from mainwindow.cpp and do some controller activities.
emit signals for mainwindow.cpp and to be used to perform gui activities.
}
i might not explain the outline properly, but the idea is to access signals and slots of one file(rather class) from other file(class) and vice versa..
pls put some light on to this topic and suggest me solutions..thank u.
this issue might be addressed before, but i did not find right solution. in my application i am using one file(ex..mainwindow.cpp) for gui drawing and some other files for accessing and controlling gui. if the signals r generated in mainwindow.cpp (gui file) they should be accessed in the control files and vice versa.. how can i do that. guys, pls help in this regard. iam giving the outline of my application.
// 1. main.cpp
#include "mainwindow.h"
main
{
create mainwindow object and show. // its the gui window
}
// 2. mainwindow.cpp
#include "mainwindow.h"
{
create gui window and display.
setup signals for window widgets and their corresponding slots.
}
// 3. controller1.cpp
{
catch signals from mainwindow.cpp and do some controller activities.
emit signals for mainwindow.cpp and to be used to perform gui activities.
}
i might not explain the outline properly, but the idea is to access signals and slots of one file(rather class) from other file(class) and vice versa..
pls put some light on to this topic and suggest me solutions..thank u.