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. QQuickView in fullscreen
QtWS25 Last Chance

QQuickView in fullscreen

Scheduled Pinned Locked Moved QML and Qt Quick
9 Posts 4 Posters 4.1k Views
  • 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.
  • M Offline
    M Offline
    MaxL
    wrote on last edited by
    #1

    Hi everyone,

    I was looking for a way to implement fullscreen support such as the fullscreen button on OSX as well as on Windows but I didn't find any good answer so I was wondering if anyone knows a way to simply add the fullscreen button in a QQuickView ?

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agocs
      wrote on last edited by
      #2

      Set Qt::WindowFullscreenButtonHint on the window (the QQuickView).

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MaxL
        wrote on last edited by
        #3

        As a flag ?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MaxL
          wrote on last edited by
          #4

          Tried it and it works, thanks :)
          However, how can I make my root qml resize so it takes the whole screen ? right now it keeps the same size as before going to fullscreen.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            agocs
            wrote on last edited by
            #5

            Try changing to SizeRootObjectToView: http://qt-project.org/doc/qt-5.0/qtquick/qquickview.html#resizeMode-prop

            1 Reply Last reply
            0
            • O Offline
              O Offline
              onek24
              wrote on last edited by
              #6

              -Since i remember SizeRootObjectToView will still not be fullscreen except you set the width and height of the top-level object to your full-screen resolution.-

              Nevermind, found out that it'll resize the top-level object.

              bq. If this property is set to SizeRootObjectToView, the view will automatically resize the root item to the size of the view.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MaxL
                wrote on last edited by
                #7

                It is set to this property but does not seems to work , i'll try to look harder into that , it might be because I have a minimum size

                1 Reply Last reply
                0
                • O Offline
                  O Offline
                  onek24
                  wrote on last edited by
                  #8

                  Just set your qml-resoultion to your screen-resolution and set the flag for your viewer to Qt::FramelessWindowHint.

                  1 Reply Last reply
                  0
                  • GianlucaG Offline
                    GianlucaG Offline
                    Gianluca
                    wrote on last edited by
                    #9

                    In Qt 5.3 the QQuickView has a showFullScreen method that to what the name suggest without setting any special flag.
                    Of course, you still need to resize your root object correctly or let the QQuickView resize it for you specifying SizeRootObjectToView
                    It works on Windows and Mac.

                    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