Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85454

QML Window position bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.9
    • GUI: Window management
    • None
    • Windows

    Description

      1. Create an empty Qt Quick Application using Qt Creator.
      2. In main.qml file add a timer which sets y position of the main window to 0.

      Expected: window's title is aligned to screen's top. Instead: window's content part is aligned to screen top, window title is not visible and located outside of the screen (i.e. has a negative y coordinate).

      Initializing y property to 0 at the app start works as expected.

       

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          id: window
          visible: true
          y: 0
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Component.onCompleted: setWindowPosTimer.restart()
      
          Timer
          {
              id: setWindowPosTimer
              interval: 3000
              repeat: false
              onTriggered: setWindowPos()
          }
      
          function setWindowPos()
          {
              window.y = 0;
          }
      }
      
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alervd Alexander Dyagilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes