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. QOpenGLWidget force initialisation
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget force initialisation

Scheduled Pinned Locked Moved Unsolved General and Desktop
qopenglwidgetqtabwidget
2 Posts 2 Posters 1.1k 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.
  • sparisS Offline
    sparisS Offline
    sparis
    wrote on last edited by
    #1

    Hi there,
    I am trying to setup 2 QOpenGLWidget as tabs in a QTabWidget.
    I need to perform initialisation in the GL widgets requiring the context at some point (shaders init).
    The problem is that the OpenGLWidget that is located in the visible tab is well initialised, but the other one not (certainly because it is not visible).
    What is the correct way to force the initialisation of this second GLWidget programmatically ?
    Thanks.

    1 Reply Last reply
    0
    • Fidchells_EyeF Offline
      Fidchells_EyeF Offline
      Fidchells_Eye
      wrote on last edited by
      #2

      You'll need to change the context to the second GL widgets before using it.
      As each time you render or do anything with OpenGL setup/parameters that you have the right context selected first for each widget.

      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