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. QOpenGLPaintDevice is undefined for Qt 5.9 on MSVC 2015

QOpenGLPaintDevice is undefined for Qt 5.9 on MSVC 2015

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 629 Views 2 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.
  • A Offline
    A Offline
    ajaxcrypto
    wrote on last edited by
    #1

    I am trying to enable OpenGL-based painting in QCustomPlot. My class derives from QCustomPlot and then adds the data to draw line graphs. This works fine when creating a DLL after:

    1. Defining the QCUSTOMPLOT_USE_OPENGL pre-processor symbol.
    2. Un-defining QT_NO_OPENGL pre-processor symbol.
    3. Adding opengl32.lib to the linker line.

    However, the headers of the above project are included in another project (same solution) and the DLL is added to the project reference, but compiler says
    error C2065: 'QOpenGLPaintDevice': undeclared identifier
    when compiling the second project.

    From what I can understand is that the class is not available if QT_NO_OPENGL is defined. My question is where is the definition being included from? Even after adding #undef QT_NO_OPENGL to all the projects, I still have the error in the second project.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you trying to build your project with a version of Qt that has been build with OpenGL disabled ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ajaxcrypto
        wrote on last edited by
        #3

        I solved the issue, cleaning everything up and rebuilding the solution did it. I now have a new problem with OpenGL enabled. Shall post a new question. Thank you!

        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