Important: Please read the Qt Code of Conduct -

QGLWidget tutorial, problem with frame

  • Hello; I am a hobbyist programmer and have been attempting to create an OpenGL program which uses QT for menus and interface. In the process I discovered how incredibly awesome QT is! ~but I am having trouble getting the end goal ready to go.

    I am following "this tutorial": and everything was working up until I tried to promote the frame to the GLWidget class created; which inherits the QGLWidget class. The following two lines from the ui header file
    @ GLframe->setFrameShape(QFrame::StyledPanel);

    both give an error, "is not a member of 'GLWidget.'" I made sure that OpenGL was included in the pro file and that the header files were also included in the pro file [which are the two common fixes I found online] and I also ran one of the sample OpenGL programs --with the same kit I was using-- that come with qt to make sure OpenGL was fine. I did see that
    @ setFrameShape@

    @ setFrameShadow@

    are indeed not members of QGLWidget and think perhaps my tutorial is outdated? It is from 2011. If that is the case, I would love to be directed to new content; If instead I am just making an egregious mistake your help is greatly appreciated.

Log in to reply