PDA

View Full Version : How to access objects of parent Dialog from Child Dialog .



ranjit.kadam
14th April 2011, 06:41
Hello respected Qt experts and my dear forum friends,
I have a doubt ,Suppose I in my first dialog.ui i have dragged a label through designer and in my second dialog.ui ,I have a radio button called setlabel and a pushbutton called ok,so when i click on radiobutton and click on ok pushbutton,the label should change in my first dialog.ui…so how to do it..using signals and slots..

regards
ranjit

Lykurg
14th April 2011, 07:10
using signals and slots..That's one posibillity. An other is to use a simple pointer or use the search function of this board or have a look at the faq section...

ranjit.kadam
14th April 2011, 12:19
ok thanks,hey i have written two slots and but both i have connected to one signal click.now my problem is that one first click i want to call one slot and on second click i want to call different slot..so how to do it..

Lykurg
14th April 2011, 13:35
Make a third slot which gets the click signal. Use a static int for counting the clicks and decide there which function to call.

ranjit.kadam
18th April 2011, 06:39
hey lykurg,I am not getting you,i am not getting you,can u explain with a code snippet,

thanks