Results 1 to 5 of 5

Thread: How to access objects of parent Dialog from Child Dialog .

  1. #1
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default How to access objects of parent Dialog from Child Dialog .

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to access objects of parent Dialog from Child Dialog .

    Quote Originally Posted by ranjit.kadam View Post
    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...

  3. #3
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: How to access objects of parent Dialog from Child Dialog .

    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..

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to access objects of parent Dialog from Child Dialog .

    Make a third slot which gets the click signal. Use a static int for counting the clicks and decide there which function to call.

  5. #5
    Join Date
    Nov 2010
    Posts
    30
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: How to access objects of parent Dialog from Child Dialog .

    hey lykurg,I am not getting you,i am not getting you,can u explain with a code snippet,

    thanks
    Last edited by ranjit.kadam; 18th April 2011 at 09:28.

Similar Threads

  1. Access parent's function from child widget
    By el33t in forum Qt Programming
    Replies: 4
    Last Post: 16th March 2011, 15:20
  2. closing child dialog closes parent dialog
    By sparticus_37 in forum Newbie
    Replies: 2
    Last Post: 28th May 2010, 20:46
  3. Find non child dialog
    By moh.gup@gmail.com in forum Qt Programming
    Replies: 6
    Last Post: 5th April 2010, 07:48
  4. How to blur parent dialog when child dialog is displayed
    By abhilashajha in forum Qt Programming
    Replies: 4
    Last Post: 10th June 2009, 14:01
  5. I need to send a message to parent dialog
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2008, 12:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.