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

QT Quick, content drawn below caption/title bar on windows?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.8.0
    • None
    • Windows 10, msvcs2013/2015, qt 5.8, 32/64 bit

    Description

      As of lately my content of my window is shifted up so that its drawn below my caption bar, I don't know exactly what did change (reinstall) but i can reproduce it with the following:
       
      main.qml

          import QtQuick.Controls 2.1
          import QtQuick.Window 2.2
          import QtQuick.Layouts 1.3
          
          ApplicationWindow {
              visible: true
              width: 640
              height: 480
          
              Rectangle{
                  width: 100
                  x: 0
                  y: 0
                  height: 35
                  color: "#888888"
              }
          }

      main.cpp

          #include <QGuiApplication>
          #include <QQmlApplicationEngine>
          
          int main(int argc, char *argv[])
          {
              QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
              QGuiApplication app(argc, argv);
          
              QQmlApplicationEngine engine;
              engine.load(QUrl(QLatin1String("qrc:/main.qml")));
              if (engine.rootObjects().isEmpty())
                  return -1;
          
              return app.exec();
          }

       
      one would expect a rectangle below the caption bar, but I get a rect which is partly hidden by the caption: https://i.stack.imgur.com/DCbSq.png
       
      ps: see https://stackoverflow.com/questions/45940715/qt-quick-content-drawn-below-caption-title-bar-on-windows

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            rincode first last
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes