Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt app crashes on Win 7 unless AA_UseDesktopOpenGL is set explicitly
Forum Updated to NodeBB v4.3 + New Features

Qt app crashes on Win 7 unless AA_UseDesktopOpenGL is set explicitly

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 977 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.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by MartinD
    #1

    I have a computer with Windows 7 where my QtQuick 2 Qt 5.7.0 app crashes. I have to explicitly set app.setAttribute(AA_UseDesktopOpenGL), then my application on this particular computer works.

    Is there a way to automatically handle this situation? I don't know how safe it is to hard set app.setAttribute(AA_UseDesktopOpenGL). I would rather detect whether the app will run on the PC and if not then set app.setAttribute(AA_UseDesktopOpenGL). Is there a way to accomplish this automatically without user seeing anything (mainly app crash popup)?

    kshegunovK 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      Did you check where it crash ?
      You might be able to detect that init did not work and then switch to
      .setAttribute(AA_UseDesktopOpenGL)

      https://forum.qt.io/topic/51574/opengl-dynamic-selected-driver/5

      1 Reply Last reply
      0
      • M MartinD

        I have a computer with Windows 7 where my QtQuick 2 Qt 5.7.0 app crashes. I have to explicitly set app.setAttribute(AA_UseDesktopOpenGL), then my application on this particular computer works.

        Is there a way to automatically handle this situation? I don't know how safe it is to hard set app.setAttribute(AA_UseDesktopOpenGL). I would rather detect whether the app will run on the PC and if not then set app.setAttribute(AA_UseDesktopOpenGL). Is there a way to accomplish this automatically without user seeing anything (mainly app crash popup)?

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #3

        @MartinD
        Also as Chris mentioned here this attribute should be set before you have the application object. As a rule of thumb, don't call static functions like methods, it only creates confusion.

        Read and abide by the Qt Code of Conduct

        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