Results 1 to 2 of 2

Thread: Call on Parent Object

  1. #1
    Join Date
    Jan 2006
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Call on Parent Object

    Hi!

    I have the Following problem.

    I Created a Dialog, which has a MainWidget, which has a VBox, which has a Custom QWidget.

    I want to call from this Custom QWidget a Funktion on the Dialog. Dialog::foo() is not usable because i need initializing things.

    How can i get a Pointer on the Dialog-Object to call my funktion?


    Thanks for the Help

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Call on Parent Object

    The easiest way is to use signals & slots mechanism, unless you need a return value.

Similar Threads

  1. Replies: 1
    Last Post: 28th July 2006, 15:10
  2. why cant i call setGeometry
    By freegnu in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2006, 05:59
  3. Move child widget along with the parent widget
    By sreedhar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 13:00
  4. Referencing Parent Widget from Child
    By taylor34 in forum Qt Programming
    Replies: 8
    Last Post: 11th April 2006, 16:13
  5. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 01:32

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.