Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    How to bail on the creation and display of 5.1 OpenGL QGLWidget window

    General and Desktop
    1
    1
    526
    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.
    • P
      pmaynard last edited by

      You have to new the QGLWidget and call the .show() to get the initializeGL, resizeGL, and paintGL methods to fire. What if you run into a problem on the initializeGL method, and want to bail? How can I stop the window from being displayed? I've tried deleting "this", and bad things happened. Is there a clean way to unwind the stack and prevent the resizeGL and paintGL calls from being made?

      I suppose I could make the window invisible, set a timer, and delete it after it is fully initialized. But there must be a better way ...

      1 Reply Last reply Reply Quote 0
      • First post
        Last post