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

QGLWidget problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 525 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.
  • C Offline
    C Offline
    catalin1122
    wrote on last edited by
    #1

    Hello guys,

    I am developing an OpenGL application using Qt. Until yesterday I was subclassing QOpenGLWidget to create my custom widget but after adding It to the main application which is a QMainWindow with a few buttons and three QGraphicsView it runs really slow. I have tried using QGLWidget and the application runs the same as without the OpenGL widget.

    The problem I have is that the widget that I've made subclassing QGLWidget does not resize properly (or at least the OpenGL rendering area doesn't).

    I will give you an example using hellogl2 example from Qt 5.5.

    Using QOpenGLWidget I get:
    alt text

    Using QGLWidget I get:
    alt text

    I just changed the parent class from QOpenGLWidget to QGLWidget the rest of the code is the same. The same thing happens in my aplication.

    I have tried to find a solution but I could not. May someone tell me why is this happening and how to solve it?

    Thank you,
    Catalin

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JunLi
      wrote on last edited by
      #2

      I had a similar problem with QOpenglWidget,
      When I shaded my application main widget, paintGL function was triggered by the wheelEvent signal, but my opengl window didn't refresh, it was refreshed by any other signal, so I had to drop the shadow

      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