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. Is creating QGLWidget with a non-visible parent resulting failed window creation a bug or a feature?

Is creating QGLWidget with a non-visible parent resulting failed window creation a bug or a feature?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.0k Views
  • 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.
  • F Offline
    F Offline
    fred741
    wrote on last edited by
    #1

    Hi all!

    I found a tricky bug. Or maybe i create widget in a wrong way, i don't know.
    When I try to create an QGLWidget with a parent which is yet not visible, i get the "Cannot create a top-level child window" error. It is originated from the CreateWindowEx function, because the parent widget has no window handle yet, therefor it seems that QGLContext is invalid and can't compile shaders at that time.

    Is it a bug and should i report it or i am using something in the wrong order? Any suggestion?

    Ps. I am using Qt 5.1.1 and MS Studio 2012. It worked fine with Qt 4.8

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

      Hi,

      I think you should bring this question to the interest mailing list, you'll find Qt's developer/maintainers there (this forum is more user oriented)

      Maybe also check the "bug report system":http://bugreports.qt-project.org to see whether there's something about it in there

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fred741
        wrote on last edited by
        #3

        I'll try, thank you.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fred741
          wrote on last edited by
          #4

          If someone has a similiar problem, it's a bug.
          Related to these reported bugs:
          https://bugreports.qt-project.org/browse/QTBUG-31451
          https://bugreports.qt-project.org/browse/QTBUG-35342

          There is a workaround on windows: creating the QGLWindow with NULL parent is somewhat solves the shader compilation.

          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