Results 1 to 13 of 13

Thread: How to do auto show/hide a widget in Qt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    254
    Thanks
    92
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to do auto show/hide a widget in Qt

    Now a small hiccup, after adding this auto-hide menu, if there is any widget that's overlapping the menu widget's region, then it's not responding and also the menu widget is shown under it.
    So if there is any other widget, and when the menu widget is shown, it's moving under visible widget.
    Is there anything like bring-to-front, etc, for bringing the menu widget to front. I tried setFocus(); but didn't solve the issue.

    How do I bring the menu widget to top-most visible area and mouse hover on the other widgets in that page should be relative ?

    I tried, but didn't work as expected:
    Qt Code:
    1. menuWidget->setWindowFlags(Qt::WindowStaysOnTopHint); // menu widget is child of mainwidget(central Widget of main window) and is not in layout
    2. menuWidget->raise();
    3. frmWidget->setWindowFlags(Qt::WindowStaysOnBottomHint);
    To copy to clipboard, switch view to plain text mode 

    EDIT: I'm able to bring it on top by adding the menubar at last. But the mouse move on the bottom widget isn't giving response to this to hide the menu widget, when out of the specified region.

    Thank you.
    Last edited by rawfool; 29th May 2013 at 12:40.

Similar Threads

  1. Replies: 10
    Last Post: 20th April 2015, 22:24
  2. Replies: 1
    Last Post: 9th December 2011, 03:42
  3. Replies: 4
    Last Post: 2nd October 2011, 00:20
  4. Replies: 2
    Last Post: 8th February 2011, 18:07
  5. MAC: Getting Dock widget show/hide events
    By jay in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2010, 08:07

Tags for this Thread

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.