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. Resizing QML QuickWindow black sides?!
Forum Updated to NodeBB v4.3 + New Features

Resizing QML QuickWindow black sides?!

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlqtquickwindow size
12 Posts 3 Posters 1.1k Views 2 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.
  • SGaistS SGaist

    Hi,

    You should add which version of Qt you are using.
    From time to time, it can also come from the graphics driver. What kind of hardware do you have ?

    S Offline
    S Offline
    StudentScripter
    wrote on last edited by
    #3

    @SGaist Im using the newest QT Version 6.4 i guess. I have an NVDIA Graphicscard GTX 1050 Ti. Windows 10 64 bit. AMD Ryzen 5 3600X.

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

      Qt is at 6.7 can you try this one ?

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

      S 2 Replies Last reply
      0
      • SGaistS SGaist

        Qt is at 6.7 can you try this one ?

        S Offline
        S Offline
        StudentScripter
        wrote on last edited by
        #5

        @SGaist I am now on 6.7 but the issue still persits. 658c9c47-6712-4db9-a9d4-647d2aeb2975-image.png

        I tried both now commented out methods, none did really fix it.

        Have a nice weekend.

         #include <QGuiApplication>
        #include <QQmlApplicationEngine>
        #include <QSurfaceFormat>
        #include <QQuickWindow>
         
        int main(int argc, char *argv[])
        {
            //Both do nothing for me oc i removed the comments when testing :)
            //QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
            //QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
         
            //This makes it better, but still not gone
            //qputenv("QSG_INFO", "1" );
            //qputenv("QSG_RHI_BACKEND", "opengl");
         
            QGuiApplication app(argc, argv);
         
         
            
            QQmlApplicationEngine engine;
            const QUrl url(QStringLiteral("qrc:/QMLCourseLesson1/Main.qml"));
            QObject::connect(
                &engine,
                &QQmlApplicationEngine::objectCreationFailed,
                &app,
                []() { QCoreApplication::exit(-1); },
                Qt::QueuedConnection);
            engine.load(url);
            
            
         
         
            return app.exec();
        }
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Where's you QML file coming from ?

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

          S 1 Reply Last reply
          0
          • SGaistS SGaist

            Where's you QML file coming from ?

            S Offline
            S Offline
            StudentScripter
            wrote on last edited by
            #7

            @SGaist The qml file is the standard one created when opening a new project out of the box. I also opened a view qml examples all have the same issue.

            import QtQuick
            import QtQuick.Window
            
            Window {
                width: 640
                height: 480
                visible: true
                title: qsTr("Hello World")
                color: "white"
                id: root
            
            
            
                Image {
                    id: myImage
                    source: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRILAm29uLbvMPEEGffMvYiAdZvPFkYa-49nA&s"
                    anchors.centerIn: parent
                    width: 150
                    height: 100
            
                    Rectangle{
                        color: "red"
                        width: parent.width
                        height: parent.height
                        opacity: 0.5
                    }
                }
            }
            
            

            d1fa2164-851b-4906-96a7-2ef5862f2b28-image.png

            1 Reply Last reply
            0
            • SGaistS SGaist

              Qt is at 6.7 can you try this one ?

              S Offline
              S Offline
              StudentScripter
              wrote on last edited by
              #8

              @SGaist Even downloaded the new qt 6.8beta to test, the issue still persists.

              As a debug i get:

              qt.scenegraph.general: threaded render loop
              qt.scenegraph.general: Using sg animation driver
              qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
              qt.scenegraph.general: Using sg animation driver
              qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
              qt.scenegraph.general: Creating QRhi with backend OpenGL for window 0x19899a060e0 (wflags 0x1)
                Graphics API debug/validation layers: 0
                Debug markers: 0
                Timestamps: 0
                Prefer software device: 0
                Shader/pipeline cache collection: 1
              qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(QColorSpace::SRgb, QColorSpace::Primaries::SRgb, QColorSpace::TransferFunction::SRgb, gamma=2.31), profile  QSurfaceFormat::CompatibilityProfile)
              qt.rhi.general: OpenGL VENDOR: NVIDIA Corporation RENDERER: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 VERSION: 4.6.0 NVIDIA 536.23
              qt.scenegraph.general: Created QRhi 0x198a23f4420 for window 0x19899a060e0
              qt.scenegraph.general: Attempting to seed pipeline cache for QRhi 0x198a23f4420 from 'C:/Users/Musik/AppData/Local/appQMLCourseLesson1/cache/qtpipelinecache-x86_64-little_endian-llp64/qqpc_opengl'
              qt.rhi.general: Seeded pipeline cache with 2 program binaries
              qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
              qt.scenegraph.general: rhi texture atlas dimensions: 1024x512
              qt.scenegraph.general: Total time spent on pipeline creation during the lifetime of the QRhi 0x198a23f4420 was 5 ms
              qt.scenegraph.general: Writing pipeline cache contents (18022 bytes) for QRhi 0x198a23f4420 to 'C:/Users/Musik/AppData/Local/appQMLCourseLesson1/cache/qtpipelinecache-x86_64-little_endian-llp64/qqpc_opengl'
              

              This is my main code:

              #include <QGuiApplication>
              #include <QQmlApplicationEngine>
              #include <QSurfaceFormat>
              #include <QQuickWindow>
              
              int main(int argc, char *argv[])
              {
              
                  //QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
                  //QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
              
                  qputenv("QSG_INFO", "2" );
                  qputenv("QSG_RHI_BACKEND", "opengl");
              
                  QGuiApplication app(argc, argv);
              
              
                  // Set the surface format with desired attributes
                  QSurfaceFormat format;
                  format.setDepthBufferSize(24);
                  format.setStencilBufferSize(8);
                  format.setVersion(4, 6);
                  format.setProfile(QSurfaceFormat::CompatibilityProfile);
                  QSurfaceFormat::setDefaultFormat(format);
              
                  QQmlApplicationEngine engine;
                  const QUrl url(QStringLiteral("qrc:/QMLCourseLesson1/Main.qml"));
                  QObject::connect(
                      &engine,
                      &QQmlApplicationEngine::objectCreationFailed,
                      &app,
                      []() { QCoreApplication::exit(-1); },
                      Qt::QueuedConnection);
                  engine.load(url);
              
              
              
              
              
              
                  return app.exec();
              }
              
              
              1 Reply Last reply
              0
              • S Offline
                S Offline
                StudentScripter
                wrote on last edited by
                #9

                bumping this up

                1 Reply Last reply
                0
                • J.HilkJ Online
                  J.HilkJ Online
                  J.Hilk
                  Moderators
                  wrote on last edited by
                  #10

                  Have you checked, if the GUI is updated at all, with a button or timer that changes some colours?

                  I have the case, default apps don't update on dvi connected displays until I do some specific loops. It's supposed to be a grafiks driver issue of my adapter/docking station


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  S 1 Reply Last reply
                  0
                  • J.HilkJ J.Hilk

                    Have you checked, if the GUI is updated at all, with a button or timer that changes some colours?

                    I have the case, default apps don't update on dvi connected displays until I do some specific loops. It's supposed to be a grafiks driver issue of my adapter/docking station

                    S Offline
                    S Offline
                    StudentScripter
                    wrote on last edited by
                    #11

                    @J-Hilk Yep checked it, it's updated but the resizing issue does still occure. It also only occures with various apps made with qml. Programms coded with qt or any other framework do work just fine... thats really a pitty.

                    How do you exactly fix this problem?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      StudentScripter
                      wrote on last edited by
                      #12

                      Would i be viable to use qt widgets and just use qtquick for all the other widgets embedded into the qt widgets mainwindow or is this a bad idea?

                      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