Move QOpenGLWidget from QtWidgets to QtOpenGL
Task-number: QTBUG-74409 Change-Id: I98a4f8a9e1d439bfdc24eb2910385273cedecd29 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
026a8ec802
commit
d107706ab9
@ -1,4 +1,4 @@
|
|||||||
QT += widgets
|
QT += widgets opengl
|
||||||
|
|
||||||
HEADERS = glwidget.h \
|
HEADERS = glwidget.h \
|
||||||
helper.h \
|
helper.h \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QT += core gui widgets
|
QT += core gui widgets opengl
|
||||||
|
|
||||||
TARGET = cube
|
TARGET = cube
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
@ -8,7 +8,7 @@ SOURCES = glwidget.cpp \
|
|||||||
mainwindow.cpp \
|
mainwindow.cpp \
|
||||||
logo.cpp
|
logo.cpp
|
||||||
|
|
||||||
QT += widgets
|
QT += widgets opengl
|
||||||
|
|
||||||
# install
|
# install
|
||||||
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl2
|
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl2
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QT += widgets
|
QT += widgets opengl
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
glwidget.cpp \
|
glwidget.cpp \
|
||||||
|
@ -6,7 +6,7 @@ SOURCES = glwidget.cpp \
|
|||||||
|
|
||||||
RESOURCES = textures.qrc
|
RESOURCES = textures.qrc
|
||||||
|
|
||||||
QT += widgets
|
QT += widgets opengl
|
||||||
|
|
||||||
# install
|
# install
|
||||||
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures
|
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QT += widgets
|
QT += widgets opengl
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
glwidget.cpp \
|
glwidget.cpp \
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
TARGET = QtOpenGL
|
TARGET = QtOpenGL
|
||||||
QT = core-private gui-private
|
QT = core-private gui-private
|
||||||
|
qtConfig(widgets): QT += widgets widgets-private
|
||||||
|
|
||||||
DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
|
DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
|
||||||
|
|
||||||
@ -23,4 +24,9 @@ SOURCES += \
|
|||||||
SOURCES += qopengltimerquery.cpp
|
SOURCES += qopengltimerquery.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qtConfig(widgets) {
|
||||||
|
HEADERS += qopenglwidget.h
|
||||||
|
SOURCES += qopenglwidget.cpp
|
||||||
|
}
|
||||||
|
|
||||||
load(qt_module)
|
load(qt_module)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtWidgets module of the Qt Toolkit.
|
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||||
**
|
**
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
** $QT_BEGIN_LICENSE:LGPL$
|
||||||
** Commercial License Usage
|
** Commercial License Usage
|
||||||
@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QOpenGLWidget
|
\class QOpenGLWidget
|
||||||
\inmodule QtWidgets
|
\inmodule QtOpenGL
|
||||||
\since 5.4
|
\since 5.4
|
||||||
|
|
||||||
\brief The QOpenGLWidget class is a widget for rendering OpenGL graphics.
|
\brief The QOpenGLWidget class is a widget for rendering OpenGL graphics.
|
@ -3,7 +3,7 @@
|
|||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtWidgets module of the Qt Toolkit.
|
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||||
**
|
**
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
** $QT_BEGIN_LICENSE:LGPL$
|
||||||
** Commercial License Usage
|
** Commercial License Usage
|
||||||
@ -40,7 +40,7 @@
|
|||||||
#ifndef QOPENGLWIDGET_H
|
#ifndef QOPENGLWIDGET_H
|
||||||
#define QOPENGLWIDGET_H
|
#define QOPENGLWIDGET_H
|
||||||
|
|
||||||
#include <QtWidgets/qtwidgetsglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class QOpenGLWidgetPrivate;
|
class QOpenGLWidgetPrivate;
|
||||||
|
|
||||||
class Q_WIDGETS_EXPORT QOpenGLWidget : public QWidget
|
class Q_OPENGL_EXPORT QOpenGLWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DECLARE_PRIVATE(QOpenGLWidget)
|
Q_DECLARE_PRIVATE(QOpenGLWidget)
|
@ -68,11 +68,6 @@ qtConfig(action) {
|
|||||||
kernel/qwidgetaction.cpp
|
kernel/qwidgetaction.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
qtConfig(opengl) {
|
|
||||||
HEADERS += kernel/qopenglwidget.h
|
|
||||||
SOURCES += kernel/qopenglwidget.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
qtConfig(formlayout) {
|
qtConfig(formlayout) {
|
||||||
HEADERS += kernel/qformlayout.h
|
HEADERS += kernel/qformlayout.h
|
||||||
SOURCES += kernel/qformlayout.cpp
|
SOURCES += kernel/qformlayout.cpp
|
||||||
|
@ -4,6 +4,7 @@ TARGET = tst_qgraphicsview
|
|||||||
|
|
||||||
QT += widgets widgets-private testlib
|
QT += widgets widgets-private testlib
|
||||||
QT += core-private gui-private testlib-private
|
QT += core-private gui-private testlib-private
|
||||||
|
qtConfig(opengl): QT += opengl
|
||||||
|
|
||||||
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
|
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
|
||||||
HEADERS += tst_qgraphicsview.h
|
HEADERS += tst_qgraphicsview.h
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
#include <QtWidgets/QBoxLayout>
|
#include <QtWidgets/QBoxLayout>
|
||||||
#include <QtWidgets/QStyle>
|
#include <QtWidgets/QStyle>
|
||||||
#include <QtWidgets/QPushButton>
|
#include <QtWidgets/QPushButton>
|
||||||
#ifndef QT_NO_OPENGL
|
#if QT_CONFIG(opengl)
|
||||||
#include <QtWidgets/QOpenGLWidget>
|
#include <QtOpenGL/QOpenGLWidget>
|
||||||
#endif
|
#endif
|
||||||
#include <private/qgraphicsscene_p.h>
|
#include <private/qgraphicsscene_p.h>
|
||||||
#include <private/qgraphicsview_p.h>
|
#include <private/qgraphicsview_p.h>
|
||||||
@ -154,7 +154,7 @@ private slots:
|
|||||||
void sceneRect_growing();
|
void sceneRect_growing();
|
||||||
void setSceneRect();
|
void setSceneRect();
|
||||||
void viewport();
|
void viewport();
|
||||||
#ifndef QT_NO_OPENGL
|
#if QT_CONFIG(opengl)
|
||||||
void openGLViewport();
|
void openGLViewport();
|
||||||
#endif
|
#endif
|
||||||
void dragMode_scrollHand();
|
void dragMode_scrollHand();
|
||||||
@ -659,7 +659,7 @@ void tst_QGraphicsView::viewport()
|
|||||||
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_OPENGL
|
#if QT_CONFIG(opengl)
|
||||||
void tst_QGraphicsView::openGLViewport()
|
void tst_QGraphicsView::openGLViewport()
|
||||||
{
|
{
|
||||||
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
|
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CONFIG += testcase
|
CONFIG += testcase
|
||||||
TARGET = tst_qopenglwidget
|
TARGET = tst_qopenglwidget
|
||||||
QT += gui-private core-private testlib widgets
|
QT += opengl gui-private core-private testlib widgets
|
||||||
|
|
||||||
SOURCES += tst_qopenglwidget.cpp
|
SOURCES += tst_qopenglwidget.cpp
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QtWidgets/QOpenGLWidget>
|
#include <QtOpenGL/QOpenGLWidget>
|
||||||
#include <QtGui/QOpenGLFunctions>
|
#include <QtGui/QOpenGLFunctions>
|
||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user