diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-22 13:47:08 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-24 13:17:33 +0100 |
commit | 502d3d6744913899da87acfda5ebdab42c40329e (patch) | |
tree | 16658a328503bfd5a62b4fd5d69ffb66e9854b18 /examples/widgets/graphicsview/chip | |
parent | d1be8b9ceb2c7b20bbe53a07154c79699540ea3d (diff) | |
parent | 06bb315beb6c2c398223cfe52cbc7f66e14a8557 (diff) |
Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
Diffstat (limited to 'examples/widgets/graphicsview/chip')
-rw-r--r-- | examples/widgets/graphicsview/chip/chip.pro | 1 | ||||
-rw-r--r-- | examples/widgets/graphicsview/chip/view.cpp | 21 | ||||
-rw-r--r-- | examples/widgets/graphicsview/chip/view.h | 2 |
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; |