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 in a plugin
QtWS25 Last Chance

QGLWidget in a plugin

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.7k 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.
  • Z Offline
    Z Offline
    zzz9
    wrote on last edited by
    #1

    My application uses plugins which have forms for options, etc. When I use simple forms with simple widgets like push buttons and labels everything works ok, form appears in main application but when I use QGLWidget I receive the following message: "QApplication must be created before QPainterDevice", then main application crashes. How to embed QGLWidget in a plugin in a proper way?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      May be silly to ask, but are you creating a QGLWidget before your QApplication (that is, are you instantiating the QApplication first-hand before you load plugins, etc.?

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zzz9
        wrote on last edited by
        #3

        I load plugin by clicking the button in the main window thus QApplication was already created by this moment. Just tell me if you have successfull practice in using QGLWidget in a plugin. I don't know if it is bug in my application or QGLWidget cannot really be used in a plugin.

        EDIT: Really, I use the class that has QGLWidget as a subclass. Tried to use QGLWidget instead. Everything ok. So the problem is in plugin.

        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