QOpenGLWidget: Cannot make uninitialized widget current
Unsolved
General and Desktop
-
I tried embedding a qwt3d object into the UI of my project. The embedding seems fine after making attempts but there is still problem to deal with.
Debug mode gives output like this QOpenGLWidget: Cannot make uninitialized widget current
, and UI does not show labels of axes as given by the image attached.
TestGui::TestGui(QWidget *parent) : QMainWindow(parent),
ui(new Ui::TestGui)
{
ui->setupUi(this);QGridLayout *grid = new QGridLayout(ui->frame); oPlot = new DifPlot(ui->frame); grid->addWidget( oPlot, 0, 0 ); // Setting labels and so on.
}
DifPlot is inheritted from Qwt3D::GridPlot and explicity calls constructor of its parent class.