Results 1 to 6 of 6

Thread: minimize child widget

  1. #1
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default minimize child widget

    hi,
    I have a child widget for QTextEdit. I set the window flag setWindowFlags(Qt::ToolTip);

    If i minimize the parent widget the child widget is not minimized, and stays on the screen at same position.

    Please reply me how to minimize the child widget on minimizing the parent widget.

    regards,
    sree

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

    Default Re: minimize child widget

    If you have set the Qt::ToolTip flag, then these widgets are not child widgets, but separate windows --- you must minimize them by hand.

  3. #3
    Join Date
    May 2006
    Location
    Australia
    Posts
    53
    Thanks
    11
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: minimize child widget

    can't you connect a signal to the child's QWidget::showMinimized() slot? have the parent emit some signal when it minimizes so that the child widget (even if it is a separate window) knows when to minimize....

  4. The following user says thank you to georgie for this useful post:

    Prashant Kumar (21st August 2019)

  5. #4
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: minimize child widget

    hi,
    Thanks a lot for the reply.

    To place a widget on top of another widget, i set the setWindowFlags(Qt::ToolTip);

    If this is not the way how can i place a widget on top of anpther so that the top window is a child of below window and the child window should be frame less (with no minimize, maximize etc buttons).

    Please post any code if possible.

    Thank you

    regards,
    sreed

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

    Default Re: minimize child widget

    Quote Originally Posted by sreedhar
    If this is not the way how can i place a widget on top of anpther so that the top window is a child of below window and the child window should be frame less (with no minimize, maximize etc buttons).
    So you want two separate windows one over another or two widgets in a single window?

  7. #6
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: minimize child widget

    thanks a lot,
    if we set the setWindowFlags(Qt::SubWindow); for the child widget its working as expected

    regards,
    sreedhar

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. let parent widget grow with child widget?
    By BeS in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2009, 11:17
  3. removing child widget
    By db in forum Newbie
    Replies: 1
    Last Post: 16th August 2007, 12:19
  4. Move child widget along with the parent widget
    By sreedhar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:00
  5. Referencing Parent Widget from Child
    By taylor34 in forum Qt Programming
    Replies: 8
    Last Post: 11th April 2006, 15:13

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.