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. QGLWidget::setFormat not working as expected.
Forum Updated to NodeBB v4.3 + New Features

QGLWidget::setFormat not working as expected.

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

    I need t to be able to change prefs of format for a QGLWidget dynamically without loosing the context. For example, I should be able to enable or disable vsync at runtime and enable this per widget. I tried with getting the format, setting the vsync option and setting the format back to the widget, however nothing seems to happen.
    In case of vsync, its always turned on irrespective of what I have set the value to be.

    Thanks,
    Rv.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rcari
      wrote on last edited by
      #2

      I am pretty sure you can not do that. However, you could try creating a root/hidden QGLWidget (and associated context) and have your QGLWidget(s) share context with that root widget.
      Then when you need to change the format of one widget, delete that widget and replace it with a new one using the proper format and sharing context with the hidden QGLWidget.

      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