Results 1 to 4 of 4

Thread: QSizeGrip dissappears

  1. #1
    Join Date
    May 2019
    Posts
    11
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question QSizeGrip dissappears

    I am using QSizeGrips on two internal frames. They work fine until I maximize the main window; Then the grips disappear. In the documentation (https://doc.qt.io/qt-5/qsizegrip.html) it states "On some platforms the size grip automatically hides itself when the window is shown full screen or maximised." I guess I am using a platform that hides the grips - I'm using Qt 5.9.1 in a Linux environment. Is there anyway to force the grips to appear even when the main window is maximized? I was going to use QPushButtons as an alternative, but I like the grips much better.
    Thanks for your help!

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSizeGrip dissappears

    Hi, I think this is the behaviour of pretty much any platform I've used.
    A window can be either maximized or exist as window that can be resized freely. So a maximized window is not the same as a window that has been resized to fill all space (for example on Windows 7 maximizing subtly changes the title bar).

    Ginsengelf

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSizeGrip dissappears

    QSizeGrip does this "autohide" in its event filter, see https://code.woboq.org/qt5/qtbase/sr...ObjectP6QEvent

    If you install your own event filter on the size grips that filters out the WindowStateChange signal, over derive from QSizeGrip and reimplement eventFilter() such that it does nothing, then they should always remain visible.

    Cheers,
    _

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

    Debra (22nd July 2019)

  5. #4
    Join Date
    May 2019
    Posts
    11
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QSizeGrip dissappears

    Dear anda_skoa, Thanks!!! That is exactly what I was looking for.


    Added after 8 minutes:


    Dear Ginsengelf, That is true. I would try to implement a "fill all space" version, if there were not other possibilities. Thank you for responding to my question.
    Last edited by Debra; 22nd July 2019 at 21:39.

Similar Threads

  1. Replies: 0
    Last Post: 30th January 2014, 14:35
  2. Resize with QSizeGrip
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 30th November 2009, 21:41
  3. QGraphicsItem with QSizeGrip
    By elsheikhmh in forum Newbie
    Replies: 7
    Last Post: 19th November 2009, 19:53
  4. Replies: 7
    Last Post: 24th May 2009, 14:58
  5. Adding a QSizeGrip to a QMainWindow
    By forrestfsu in forum Qt Programming
    Replies: 6
    Last Post: 9th April 2007, 16:45

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.