Sandbox: [skip ci] fix build failures

This commit is contained in:
wmayer
2023-09-08 11:45:44 +02:00
committed by wwmayer
parent 3645d8be3b
commit 8a56da4ee0
9 changed files with 27 additions and 135 deletions

View File

@@ -37,6 +37,7 @@
#include <QtOpenGL.h>
#include "Workbench.h"
#include <App/Application.h>
#include <Gui/MenuManager.h>
#include <Gui/ToolBarManager.h>
#include <Gui/MainWindow.h>
@@ -61,7 +62,7 @@ Workbench::Workbench()
QGridLayout* pLayout = new QGridLayout(tree);
pLayout->setSpacing(0);
pLayout->setMargin (0);
pLayout->setContentsMargins(0, 0, 0, 0);
pLayout->addWidget(treeWidget, 0, 0);
tree->setObjectName
@@ -159,8 +160,7 @@ void SoWidgetShape::GLRender(SoGLRenderAction * /*action*/)
#if defined(HAVE_QT5_OPENGL)
this->image = QPixmap::grabWidget(w, w->rect()).toImage();
#else
this->image = QPixmap::grabWidget(w, w->rect()).toImage();
this->image = QtGLWidget::convertToGLFormat(this->image);
this->image = w->grab(w->rect()).toImage();
#endif
glRasterPos2d(10,10);
glDrawPixels(this->image.width(),this->image.height(),GL_RGBA,GL_UNSIGNED_BYTE,this->image.bits());
@@ -285,7 +285,6 @@ void SoWidgetShape::setWidget(QWidget* w)
this->image = img.toImage();
#if !defined(HAVE_QT5_OPENGL)
this->image = QPixmap::grabWidget(w, w->rect()).toImage();
this->image = QtGLWidget::convertToGLFormat(this->image);
this->image = w->grab(w->rect()).toImage();
#endif
}