Pergunta

In my application i have two buttons and one function and when i click certain button function takes certain parameter and executing with its value, when i click another button it function takes another parameter and executing, how to do that? All of this things is done dynamically. Function and buttons are in different classes.

connect(AddButtonSimpleWindow,SIGNAL(clicked(MyWindowSettings)),area,SLOT(AddSubWindow(MyWindowSettings)));
connect(AddButtonParameterWindow,SIGNAL(clicked(MyWindowSettings)),area,SLOT(AddSubWindow(MyWindowSettings)));

Where i should emit signal? And how to override it?

Foi útil?

Solução

Where i should emit signal? And how to override it?

This part of your code looks correct if the sender and receiver objects are pointers. Please make sure they are.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top