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. How the close button in titlebar don't show
Forum Updated to NodeBB v4.3 + New Features

How the close button in titlebar don't show

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
9 Posts 2 Posters 1.6k 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
    soledadchao
    wrote on last edited by
    #1

    in Qt 5.7.0, I use the example "window.qml".
    In this example, I only want the min and max button, and don't show the close button. So I use "Qt.CustomizeWindowHint | Qt.WindowMinMaxButtonsHint" to set the window's flags. But it seems doesn't work.What can I do for it?
    alt text
    alt text

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @soledadchao Add Qt.WindowTitleHint to it.

      157

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

        it seems doesn't work

        1 Reply Last reply
        0
        • p3c0P p3c0

          @soledadchao Add Qt.WindowTitleHint to it.

          S Offline
          S Offline
          soledadchao
          wrote on last edited by
          #4

          @p3c0 it seems doesn't work

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #5

            @soledadchao Did you use all 3 flags ?

            157

            S 1 Reply Last reply
            0
            • p3c0P p3c0

              @soledadchao Did you use all 3 flags ?

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

              @p3c0 yes

              1 Reply Last reply
              0
              • p3c0P Offline
                p3c0P Offline
                p3c0
                Moderators
                wrote on last edited by
                #7

                @soledadchao Try one of these:

                flags: Qt.WindowMinMaxButtonsHint
                flags: Qt.Window | Qt.WindowMinMaxButtonsHint
                flags: Qt.WindowTitleHint | Qt.CustomizeWindowHint | Qt.WindowMinMaxButtonsHint
                

                All of these work on Ubuntu system. I dont have a Windows machine at hand to test it out.

                157

                S 1 Reply Last reply
                0
                • p3c0P p3c0

                  @soledadchao Try one of these:

                  flags: Qt.WindowMinMaxButtonsHint
                  flags: Qt.Window | Qt.WindowMinMaxButtonsHint
                  flags: Qt.WindowTitleHint | Qt.CustomizeWindowHint | Qt.WindowMinMaxButtonsHint
                  

                  All of these work on Ubuntu system. I dont have a Windows machine at hand to test it out.

                  S Offline
                  S Offline
                  soledadchao
                  wrote on last edited by
                  #8

                  @p3c0 I have try all of the three flags, but it doesn't work....
                  I use the "qt-opensource-windows-x86-mingw530-5.7.0".

                  1 Reply Last reply
                  0
                  • p3c0P Offline
                    p3c0P Offline
                    p3c0
                    Moderators
                    wrote on last edited by
                    #9

                    @soledadchao Can you try the same for Qt Widgets for eg. QDialog ?

                    157

                    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