Hi there,
after I get yesterday great help from here (see: http://www.qtcentre.org/threads/6346...lass-is-needed). I've applied my new knowledge. First. it was all Ok. My MainWindow send and receive Signals from his childs.
but I have follow constellation:
A (MainWindow) has a StackedWidget B (Start) which calls a modal QDialog C (konfig). I need to deliver a Signal from C to A. A knows B, and B knows C, so I thought it would be the best if I connect the Signal from C to B and call a function which emit a Signal which is connected in A to a A-function.
But, B should get the Signal but don't jump in the function. I hope anybody can help. Here are some of my Code:
emit in C:
emit CallKonfig0SetName();
emit CallKonfig0SetName();
To copy to clipboard, switch view to plain text mode
connection in B:
connect(konfig, SIGNAL(CallKonfig0SetName()), this, SLOT(FctProxy0SetName()));
connect(konfig, SIGNAL(CallKonfig0SetName()), this, SLOT(FctProxy0SetName()));
To copy to clipboard, switch view to plain text mode
emit in B:
void Start::FctProxy0SetName()
{
btn_as1->setText("DEBUG");
emit CallStart0SetName();
}
void Start::FctProxy0SetName()
{
btn_as1->setText("DEBUG");
emit CallStart0SetName();
}
To copy to clipboard, switch view to plain text mode
connection in A:
connect(start, SIGNAL(CallStart0SetName()), this, SLOT(Fct0SetName()));
connect(start, SIGNAL(CallStart0SetName()), this, SLOT(Fct0SetName()));
To copy to clipboard, switch view to plain text mode
I got no error or warning. And in this way it does the trick in my other function. So, is there something I haven't followed?
-casisto
Bookmarks