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. Cannot start QML apps from Remote desktop connection
Forum Updated to NodeBB v4.3 + New Features

Cannot start QML apps from Remote desktop connection

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 3 Posters 1.5k 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.
  • U Offline
    U Offline
    Uday More
    wrote on last edited by Uday More
    #1

    Hello Team,
    I am running QT creator from a remote machine where I am working on a QML application. When I launch the application, I get a blank screen as shown below.
    But it runs when I run it locally.
    Any issues with rendering ? Please help.

    Both machines local and remote are Windows 10 machine.
    Qt 5.7 & QT Creator 4.0.2

    import QtQuick 2.0
    import QtQuick.Controls 1.4
    import QtQuick.Layouts 1.1
    import QtQuick.Controls.Styles 1.4

    6b670c96-9932-49e3-b1d6-3fe0f23028b1-image.png

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MEMekaniske
      wrote on last edited by
      #2

      Hello,

      This could be because of the software you are using to work remotely.

      Are you using microsofts own remote access, or are you using VNC etc?

      1 Reply Last reply
      0
      • U Offline
        U Offline
        Uday More
        wrote on last edited by Uday More
        #3

        Microsoft's remote desktop Connection.
        Isn't there a solution for this. Because I'll have to work only remotely using the remote desktop cnnection.

        KroMignonK 1 Reply Last reply
        0
        • U Uday More

          Microsoft's remote desktop Connection.
          Isn't there a solution for this. Because I'll have to work only remotely using the remote desktop cnnection.

          KroMignonK Offline
          KroMignonK Offline
          KroMignon
          wrote on last edited by KroMignon
          #4

          @Uday-More Hello, I think the problem is that OpenGL is not well supported by MicroSoft RemoteDesktop.
          Which Qt Kit are you using?
          If you are using Qt 5.14.x or higher, you can force Qt to use Direct3D 11 backend. I think this is better supported by MicroSoft RemoteDesktop. Take a look at:

          • https://www.qt.io/blog/qt-quick-on-vulkan-metal-direct3d
          • https://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph-renderer.html#rendering-via-the-qt-rendering-hardware-interface

          Or disable OpenGL and use Raster/Software Backend with QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL );

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          1 Reply Last reply
          1
          • U Offline
            U Offline
            Uday More
            wrote on last edited by
            #5

            I am using QT 5.7

            Where exactly to use this statement "QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL );" ?

            I have just used it after main() starts.
            I didn't find any change in the behaviour.

            KroMignonK 1 Reply Last reply
            0
            • U Uday More

              I am using QT 5.7

              Where exactly to use this statement "QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL );" ?

              I have just used it after main() starts.
              I didn't find any change in the behaviour.

              KroMignonK Offline
              KroMignonK Offline
              KroMignon
              wrote on last edited by
              #6

              @Uday-More said in Cannot start QML apps from Remote desktop connection:

              Where exactly to use this statement "QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL );" ?

              Like written in Qt documentation

              Forces the usage of a software based OpenGL implementation on platforms that use dynamic loading of the OpenGL implementation. This will typically be a patched build of Mesa llvmpipe, providing OpenGL 2.1. The value may have no effect if no such OpenGL implementation is available. The default name of this library is opengl32sw.dll and can be overridden by setting the environment variable QT_OPENGL_DLL. See the platform-specific pages, for instance Qt for Windows, for more information. This attribute must be set before QGuiApplication is constructed. This value was added in Qt 5.4.

              This has to be called be QGuiApplication is created.

              int main(int argc, char *argv[])
              {
                  QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
                  QGuiApplication app(argc, argv);
              
              ...
              }
              

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              1 Reply Last reply
              1
              • U Offline
                U Offline
                Uday More
                wrote on last edited by Uday More
                #7

                @KroMignon said in Cannot start QML apps from Remote desktop connection:

                Qt

                I've kept this flag exactly where you've mentioned. But didn't work.
                Anyways it is said "The value may have no effect if no such OpenGL implementation is available."

                For this :
                "The default name of this library is opengl32sw.dll and can be overridden by setting the environment variable QT_OPENGL_DLL".

                Where should this dll and environment be set ? In the remote machine or the local machine.

                KroMignonK 1 Reply Last reply
                0
                • U Uday More

                  @KroMignon said in Cannot start QML apps from Remote desktop connection:

                  Qt

                  I've kept this flag exactly where you've mentioned. But didn't work.
                  Anyways it is said "The value may have no effect if no such OpenGL implementation is available."

                  For this :
                  "The default name of this library is opengl32sw.dll and can be overridden by setting the environment variable QT_OPENGL_DLL".

                  Where should this dll and environment be set ? In the remote machine or the local machine.

                  KroMignonK Offline
                  KroMignonK Offline
                  KroMignon
                  wrote on last edited by
                  #8

                  @Uday-More said in Cannot start QML apps from Remote desktop connection:

                  Where should this dll and environment be set ? In the remote machine or the local machine.

                  This DLL must be on the machine which runs the application ==> so the remote one.
                  And you should find the DLL in the Qt Kit bin directory ==> C:\Qt\5.7.xx\msvcXXX\bin\

                  But I would suggest you to switch you application to Qt 5.14 (if you can), so you could use Direct3D11 as backend, which, I think, will better supported by MS RemoteDesktop.

                  It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                  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