Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML only display Close Windows hint
Forum Updated to NodeBB v4.3 + New Features

QML only display Close Windows hint

Scheduled Pinned Locked Moved Solved QML and Qt Quick
9 Posts 4 Posters 3.1k 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.
  • S Offline
    S Offline
    Slei
    wrote on last edited by Slei
    #1

    Hey,

    I'm trying to hide the minimize and and maximize buttons from the title bar and came across the window hint flags CustomizeWindowHint , WindowMinMaxButtonsHint and WindowCloseButtonHint
    hiding all of them works fine in qml:

    flags: Qt.WindowTitleHint
    

    but trying to only display the close button doesn't work somehow with the custom flag:

    flags: Qt.CustomizeWindowHint | Qt.WindowCloseButtonHint
    

    can anyone help?

    JonBJ 1 Reply Last reply
    0
    • S Offline
      S Offline
      Slei
      wrote on last edited by
      #9

      ok i've found a solutionj to this. Windows probably requires certain flags to be set, like Dialog:

      flags: Qt.WindowCloseButtonHint | Qt.CustomizeWindowHint | Qt.Dialog | Qt.WindowTitleHint
      

      this works for Closehint only

      1 Reply Last reply
      1
      • S Slei

        Hey,

        I'm trying to hide the minimize and and maximize buttons from the title bar and came across the window hint flags CustomizeWindowHint , WindowMinMaxButtonsHint and WindowCloseButtonHint
        hiding all of them works fine in qml:

        flags: Qt.WindowTitleHint
        

        but trying to only display the close button doesn't work somehow with the custom flag:

        flags: Qt.CustomizeWindowHint | Qt.WindowCloseButtonHint
        

        can anyone help?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #2

        @Slei
        Not all flags work in all situations, window features are still OS-dependent at the fundamental level. It is therefore particularly important you should state your target platform(s) & version(s) for this question.

        1 Reply Last reply
        3
        • S Offline
          S Offline
          Slei
          wrote on last edited by Slei
          #3

          @JonB
          Currently I'm working on windows.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Slei
            wrote on last edited by
            #4

            Has anyone any idea?, I'm sure windows supports "close hint only", but I'm not sure if QT supports it.

            1 Reply Last reply
            0
            • GrecKoG Offline
              GrecKoG Offline
              GrecKo
              Qt Champions 2018
              wrote on last edited by
              #5

              Have you tried this ?

              flags: Qt.CustomizeWindowHint | Qt.WindowTitleHint |  Qt.WindowCloseButtonHint
              

              It works on mac.

              S 1 Reply Last reply
              0
              • GrecKoG GrecKo

                Have you tried this ?

                flags: Qt.CustomizeWindowHint | Qt.WindowTitleHint |  Qt.WindowCloseButtonHint
                

                It works on mac.

                S Offline
                S Offline
                Slei
                wrote on last edited by
                #6

                @GrecKo said in QML only display Close Windows hint:

                Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint

                yeah, it displays only the title bar without any buttons on Win10, so maybe qt doesn't support this for windows, or windows doens't support this in general.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Swapnil_Shelke
                  wrote on last edited by
                  #7
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Slei
                    wrote on last edited by
                    #8

                    I've checked again in some windows forums and windows should be capable of displaying only the close hint in the title bar.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Slei
                      wrote on last edited by
                      #9

                      ok i've found a solutionj to this. Windows probably requires certain flags to be set, like Dialog:

                      flags: Qt.WindowCloseButtonHint | Qt.CustomizeWindowHint | Qt.Dialog | Qt.WindowTitleHint
                      

                      this works for Closehint only

                      1 Reply Last reply
                      1

                      • Login

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