Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to make Fullscreen for QtQuick 2.10 Control Application

How to make Fullscreen for QtQuick 2.10 Control Application

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 1.6k 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.
  • N Offline
    N Offline
    NTMS
    wrote on last edited by
    #1

    Hi,
    I am using import QtQuick 2.10. I need to make fullscreen mode. I try to add
    flags: Qt.Window | Qt.FramelessWindowHint
    and didn't work for me?

    import QtQuick 2.10
    import QtQuick.Controls 2.3
    
    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        //flags: Qt.Window | Qt.FramelessWindowHint  // This didn't work.
    
    
        Text {
            id: mainPage
            text: qsTr("Main Page")
            font.pixelSize: Qt.application.font.pixelSize * 1
        }
    
        SwipeView {
            id: swipeView
            anchors.fill: parent
            currentIndex: 1 //tabBar.currentIndex
    
            Page1Form {
            }
    
            Page2Form {
            }
    
            Page3Form {
    
            }
        }
    
        footer: TabBar {
            id: tabBar
            currentIndex: swipeView.currentIndex
    
            TabButton {
                text: qsTr("Left Page")
                font.pixelSize: Qt.application.font.pixelSize * 0.7
    
                MouseArea {
                    anchors.fill: parent
                    onPressed: {
                        currentIndex: 0
                    }
                }
            }
    
            TabButton {
                text: qsTr("Mid Page")
                font.pixelSize: Qt.application.font.pixelSize * 0.7
    
                MouseArea {
                    anchors.fill: parent
                    onPressed: {
                        currentIndex: 1
                    }
                }
            }
    
            TabButton {
                text: qsTr("Right Page")
                font.pixelSize: Qt.application.font.pixelSize * 0.7
    
                MouseArea {
                    anchors.fill: parent
                    onPressed: {
                        currentIndex: 2
                    }
                }
            }
        }
    }
    
    
    D 1 Reply Last reply
    0
    • N NTMS

      Hi,
      I am using import QtQuick 2.10. I need to make fullscreen mode. I try to add
      flags: Qt.Window | Qt.FramelessWindowHint
      and didn't work for me?

      import QtQuick 2.10
      import QtQuick.Controls 2.3
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
          //flags: Qt.Window | Qt.FramelessWindowHint  // This didn't work.
      
      
          Text {
              id: mainPage
              text: qsTr("Main Page")
              font.pixelSize: Qt.application.font.pixelSize * 1
          }
      
          SwipeView {
              id: swipeView
              anchors.fill: parent
              currentIndex: 1 //tabBar.currentIndex
      
              Page1Form {
              }
      
              Page2Form {
              }
      
              Page3Form {
      
              }
          }
      
          footer: TabBar {
              id: tabBar
              currentIndex: swipeView.currentIndex
      
              TabButton {
                  text: qsTr("Left Page")
                  font.pixelSize: Qt.application.font.pixelSize * 0.7
      
                  MouseArea {
                      anchors.fill: parent
                      onPressed: {
                          currentIndex: 0
                      }
                  }
              }
      
              TabButton {
                  text: qsTr("Mid Page")
                  font.pixelSize: Qt.application.font.pixelSize * 0.7
      
                  MouseArea {
                      anchors.fill: parent
                      onPressed: {
                          currentIndex: 1
                      }
                  }
              }
      
              TabButton {
                  text: qsTr("Right Page")
                  font.pixelSize: Qt.application.font.pixelSize * 0.7
      
                  MouseArea {
                      anchors.fill: parent
                      onPressed: {
                          currentIndex: 2
                      }
                  }
              }
          }
      }
      
      
      D Offline
      D Offline
      Devopia53
      wrote on last edited by
      #2

      @NTMS

      Here's a document of how to make a full screen mode: https://doc.qt.io/qt-5.10/qml-qtquick-window-window.html#visibility-prop

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NTMS
        wrote on last edited by
        #3

        @Devopia53 thank you very much. I forgot to import QtQuick.Window 2.3. Its working now.

        Here is the code:

        import QtQuick 2.10
        import QtQuick.Controls 2.3
        import QtQuick.Window 2.3

        ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        flags: Qt.Window | Qt.FramelessWindowHint
        visibility: Window.FullScreen

        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