Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    General and Desktop
    2
    4
    1760
    Loading More Posts
    • 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
      fred741 last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • F
          fred741 last edited by

          I'll try, thank you.

          1 Reply Last reply Reply Quote 0
          • F
            fred741 last edited by

            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 Reply Quote 0
            • First post
              Last post