Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Hide WindowMinimizeButton of the WindowTitleBar
Qt 6.11 is out! See what's new in the release blog

Hide WindowMinimizeButton of the WindowTitleBar

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 836 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tailor
    wrote on last edited by
    #1

    Hello,

    I want hide the MinimizeButton (~Qt::WindowMinimizeButtonHint) of the WindowTitle, but it doesn't work and I don't understand why. I already look in the internet, this and several other forums, etc., but I didn't found an answer which works for me!

    I want to realize it by setting the WindowFlags.
    I am using OpenSuse 13.1, Qt4.8 and KDE.
    I am initializing a QMainWindow(QWidget* parent = 0, Qt::WindowFlags fl = Qt::Dialog))
    I also use the setMaximumSize(); function. So the MaximumButton is hidden by default, as I already found out.

    At the end i have the ContextHelpButton, the MinimizeButton and the CloseButton in my WindowTitlebar.

    By using following code, I can hide the Close Button:
    @ setWindowFlags(((this->windowFlags() | Qt::CustomizeWindowHint)
    & ~Qt::WindowCloseButtonHint));@
    This works fine.

    By using following code, I can hide the HelpButton:
    @ setWindowFlags(((this->windowFlags() | Qt::CustomizeWindowHint)
    & ~Qt::WindowContextHelpButtonHint));@
    This works fine, too.

    But the same code for the Minimize Button, doesn't work:
    @ setWindowFlags(((this->windowFlags() | Qt::CustomizeWindowHint)
    & ~Qt::WindowMinimizeButtonHint));@

    And I don't understand why.

    • Is is not possible with KDE or this Linux version?
    • Do I need an other windowManager?
    • Must the parent set per default, also if I don't have a parent?
    • Is it not possible with QMainWindow?

    Any ideas or any other solutions?

    Thanx for all hints in advance.

    Greez,Tailor

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved