Results 1 to 10 of 10

Thread: How get a pointer to the parent widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How get a pointer to the parent widget

    Hi to all,
    in my application I have this widget structure:

    QmainWindow -> CentralWidget -> QWidget

    The QMainWindow contains a central widget, and this one contains 2 QWidget.
    I would call directly a method of QMainWindow from one of the QWidget is possible?
    I saw the QWidget::parentWidget() but I don't think it returns a pointer of the QMainWindow.
    I would know if it's possible or if I need to pass a pointer into the ctor.

    Best Regards,
    Franco
    Last edited by franco.amato; 7th September 2010 at 19:37.
    Franco Amato

Similar Threads

  1. Replies: 7
    Last Post: 14th January 2010, 08:47
  2. Replies: 7
    Last Post: 26th November 2009, 14:29
  3. Replies: 4
    Last Post: 3rd October 2009, 08:19
  4. using the parent-pointer
    By doktorn in forum Newbie
    Replies: 5
    Last Post: 31st August 2007, 18:59
  5. get Parent Pointer
    By raphaelf in forum Qt Programming
    Replies: 8
    Last Post: 3rd March 2006, 13:09

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
  •  
Qt is a trademark of The Qt Company.