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. Creating a window fit for the all space of the screen
Forum Updated to NodeBB v4.3 + New Features

Creating a window fit for the all space of the screen

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 1.3k 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by
    #1

    Hi guys,

    Here is a simple window in QML. It occupies only a space with 800 pixels as the width and 600 as height:

    import QtQuick 2.9
    import QtQuick.Window 2.2
    
    Window {
        visible: true
        width: 800; height: 600
        color: "gray"
     // ...
    }
    

    How to make it fit the whole screen of the target device, please? That is, it occupies the whole display screen.

    joeQJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can set the visibility property:

      visibility: Window.FullScreen
      

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      tomyT 1 Reply Last reply
      2
      • tomyT tomy

        Hi guys,

        Here is a simple window in QML. It occupies only a space with 800 pixels as the width and 600 as height:

        import QtQuick 2.9
        import QtQuick.Window 2.2
        
        Window {
            visible: true
            width: 800; height: 600
            color: "gray"
         // ...
        }
        

        How to make it fit the whole screen of the target device, please? That is, it occupies the whole display screen.

        joeQJ Offline
        joeQJ Offline
        joeQ
        wrote on last edited by joeQ
        #3

        @tomy Hi, friend.

        You can also to use Screen QML Type

        like

        Window{
            width:Screen.width;
            height:Screen.height;
        }
        

        Just do it!

        1 Reply Last reply
        2
        • SGaistS SGaist

          Hi,

          You can set the visibility property:

          visibility: Window.FullScreen
          
          tomyT Offline
          tomyT Offline
          tomy
          wrote on last edited by
          #4

          @SGaist

          visibility: Window.Maximized
          

          was what I was looking for. Thank you.

          1 Reply Last reply
          0
          • Pl45m4P Pl45m4 referenced this topic on

          • Login

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