summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview/chip
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/graphicsview/chip')
-rw-r--r--examples/widgets/graphicsview/chip/chip.pro1
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp21
-rw-r--r--examples/widgets/graphicsview/chip/view.h2
3 files changed, 0 insertions, 24 deletions
diff --git a/examples/widgets/graphicsview/chip/chip.pro b/examples/widgets/graphicsview/chip/chip.pro
index a46f07ce35..508928d026 100644
--- a/examples/widgets/graphicsview/chip/chip.pro
+++ b/examples/widgets/graphicsview/chip/chip.pro
@@ -6,7 +6,6 @@ SOURCES += mainwindow.cpp view.cpp chip.cpp
QT += widgets
qtHaveModule(printsupport): QT += printsupport
-qtHaveModule(opengl): QT += opengl
build_all:!build_pass {
CONFIG -= build_all
diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp
index 21998dc2df..77a6310778 100644
--- a/examples/widgets/graphicsview/chip/view.cpp
+++ b/examples/widgets/graphicsview/chip/view.cpp
@@ -57,11 +57,7 @@
#include <QPrintDialog>
#endif
#endif
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL>
-#else
#include <QtWidgets>
-#endif
#include <QtMath>
#if QT_CONFIG(wheelevent)
@@ -156,14 +152,6 @@ View::View(const QString &name, QWidget *parent)
antialiasButton->setText(tr("Antialiasing"));
antialiasButton->setCheckable(true);
antialiasButton->setChecked(false);
- openGlButton = new QToolButton;
- openGlButton->setText(tr("OpenGL"));
- openGlButton->setCheckable(true);
-#ifndef QT_NO_OPENGL
- openGlButton->setEnabled(QGLFormat::hasOpenGL());
-#else
- openGlButton->setEnabled(false);
-#endif
printButton = new QToolButton;
printButton->setIcon(QIcon(QPixmap(":/fileprint.png")));
@@ -179,7 +167,6 @@ View::View(const QString &name, QWidget *parent)
labelLayout->addWidget(dragModeButton);
labelLayout->addStretch();
labelLayout->addWidget(antialiasButton);
- labelLayout->addWidget(openGlButton);
labelLayout->addWidget(printButton);
QGridLayout *topLayout = new QGridLayout;
@@ -200,7 +187,6 @@ View::View(const QString &name, QWidget *parent)
connect(selectModeButton, &QAbstractButton::toggled, this, &View::togglePointerMode);
connect(dragModeButton, &QAbstractButton::toggled, this, &View::togglePointerMode);
connect(antialiasButton, &QAbstractButton::toggled, this, &View::toggleAntialiasing);
- connect(openGlButton, &QAbstractButton::toggled, this, &View::toggleOpenGL);
connect(rotateLeftIcon, &QAbstractButton::clicked, this, &View::rotateLeft);
connect(rotateRightIcon, &QAbstractButton::clicked, this, &View::rotateRight);
connect(zoomInIcon, &QAbstractButton::clicked, this, &View::zoomIn);
@@ -250,13 +236,6 @@ void View::togglePointerMode()
graphicsView->setInteractive(selectModeButton->isChecked());
}
-void View::toggleOpenGL()
-{
-#ifndef QT_NO_OPENGL
- graphicsView->setViewport(openGlButton->isChecked() ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : new QWidget);
-#endif
-}
-
void View::toggleAntialiasing()
{
graphicsView->setRenderHint(QPainter::Antialiasing, antialiasButton->isChecked());
diff --git a/examples/widgets/graphicsview/chip/view.h b/examples/widgets/graphicsview/chip/view.h
index ea7bd414f5..b780702c34 100644
--- a/examples/widgets/graphicsview/chip/view.h
+++ b/examples/widgets/graphicsview/chip/view.h
@@ -94,7 +94,6 @@ private slots:
void setResetButtonEnabled();
void setupMatrix();
void togglePointerMode();
- void toggleOpenGL();
void toggleAntialiasing();
void print();
void rotateLeft();
@@ -106,7 +105,6 @@ private:
QLabel *label2;
QToolButton *selectModeButton;
QToolButton *dragModeButton;
- QToolButton *openGlButton;
QToolButton *antialiasButton;
QToolButton *printButton;
QToolButton *resetButton;