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 to Open New Window in Maximized Mode(Solved)
Forum Updated to NodeBB v4.3 + New Features

How to Open New Window in Maximized Mode(Solved)

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 4 Posters 7.0k 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.
  • H Offline
    H Offline
    haris123
    wrote on last edited by
    #1

    Hi,

    For my application I need to open a new window in Maximized mode,

    From Parent I Opened new window like

    @onDoubleClicked: {
    var component = Qt.createComponent("newWindow.qml")
    var window = component.createObject(root)
    window.show()

                    }@
    

    And I created my new window like below, here I set visibility: "Maximized"

    @ApplicationWindow {

    id: newWindow
    visibility: "Maximized"
    visible: true
    width: 1080
    height: 680
    .....................
    ....................
    }@

    But the new window is not opening in Maximized mode, am I doing anything wrong ?

    Any help will be appreciated......

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fxam
      wrote on last edited by
      #2

      I think it should be
      @
      visibility: Window.Maximized
      @

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

        Hi,

        It is showing it in Maximized mode, but since there is no component in it, it is rendered as transparent
        Add this in the ApplicationWindow and you will notice
        @
        ApplicationWindow {
        id: newWindow
        visibility: "Maximized"
        visible: true
        Rectangle {
        anchors.fill: parent
        color: "red"
        }
        }
        @

        157

        1 Reply Last reply
        1
        • H Offline
          H Offline
          haris123
          wrote on last edited by
          #4

          Hi, thanks for reply....

          Actully there are many components in the window, that's why I put the dotted lines....

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fxam
            wrote on last edited by
            #5

            Try this then:
            @
            window.showMaximized()
            @

            1 Reply Last reply
            0
            • H Offline
              H Offline
              haris123
              wrote on last edited by
              #6

              Hi, thanks for the replay,

              @window.showMaximized()@

              works fine.

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

                This too should work,
                @
                onDoubleClicked: {
                var component = Qt.createComponent("AppWin.qml")
                var window = component.createObject(root)
                window.show()
                }
                @

                @
                ApplicationWindow {
                id: newWindow
                visibility: "Maximized"
                visible: true
                Rectangle {
                anchors.fill: parent
                color: "red"
                }
                }
                @

                here no dimensions specified, just the visibility property set to Maximized.

                157

                I 1 Reply Last reply
                1
                • p3c0P p3c0

                  This too should work,
                  @
                  onDoubleClicked: {
                  var component = Qt.createComponent("AppWin.qml")
                  var window = component.createObject(root)
                  window.show()
                  }
                  @

                  @
                  ApplicationWindow {
                  id: newWindow
                  visibility: "Maximized"
                  visible: true
                  Rectangle {
                  anchors.fill: parent
                  color: "red"
                  }
                  }
                  @

                  here no dimensions specified, just the visibility property set to Maximized.

                  I Offline
                  I Offline
                  Induwara.super
                  wrote on last edited by
                  #8

                  @p3c0 It worked!!

                  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