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. Error finding a member function in QOpenGLWidget
Forum Updated to NodeBB v4.3 + New Features

Error finding a member function in QOpenGLWidget

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 279 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.
  • V Offline
    V Offline
    viniltc
    wrote on last edited by
    #1

    Hi All,

    I trying to build a program to display Quaternion rotation. I have an QOpenGLWidget. There is a class glwidget.cpp which I included in the project. There is a member function called updateOrientation().

    I do this in order to update orientation of a 3d object using Quaternion.

      ui->glWidget->updateOrientation(quat[0],quat[1],quat[2],quat[3]);
    

    but I get an error:

    settings.cpp:223:18: error: no member named 'updateOrientation' in 'QOpenGLWidget'
    

    I dont know why this is happening , I included the class glwidget.cpp , also I make sure opengl is included in the .pro file as well.

    What might be the issue here?

    Thanks a lot

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

      Hi
      so glWidget is a QOpenGLWidget child that lives in glwidget.cpp
      and you added a new method for it and it can't see it ?

      can you show glwidget.h ?

      Im not sure are using the custom widget on as the error is
      'updateOrientation' in 'QOpenGLWidget' << but if you have a subclass then it
      should say some other name in my book.

      So i think you have a plain QOpenGLWidget in your form and
      you really wanted some custom one ?

      Like forgetting to promote it to the one in glwidget.cpp
      So its just the Qt build in and dont have this function as that is added to the derived class/custom class.

      1 Reply Last reply
      2
      • V Offline
        V Offline
        viniltc
        wrote on last edited by
        #3

        @mrjj Thanks a lot.! It got solved. It was problem due to I forgot to promote it to the glwidget.cpp.

        mrjjM 1 Reply Last reply
        1
        • V viniltc

          @mrjj Thanks a lot.! It got solved. It was problem due to I forgot to promote it to the glwidget.cpp.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @viniltc
          Hehe well +1 for guessing power to me then :)

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved