Doc: Make widgets snippets a subdirs/lib project
Task-number: QTBUG-86497
Change-Id: Ia43f9eb3bf8a3d2f6e76a1932179aaa94266540b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f4ee89363e
)
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
63ec6263a5
commit
84cfb1aaa6
@ -50,7 +50,7 @@
|
||||
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "./customstyle/customstyle.h"
|
||||
#include "../customstyle/customstyle.h"
|
||||
|
||||
void CustomStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget) const
|
||||
|
10
src/widgets/doc/snippets/customviewstyle/customviewstyle.pro
Normal file
10
src/widgets/doc/snippets/customviewstyle/customviewstyle.pro
Normal file
@ -0,0 +1,10 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = widgets_customviewstyle_snippets
|
||||
QT = core widgets
|
||||
|
||||
HEADERS = \
|
||||
../customstyle/customstyle.h
|
||||
|
||||
SOURCES = \
|
||||
customviewstyle.cpp
|
||||
../customstyle/customstyle.cpp
|
@ -0,0 +1,6 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = widgets_filedialogurls_snippets
|
||||
QT = core widgets
|
||||
|
||||
SOURCES = \
|
||||
filedialogurls.cpp
|
@ -0,0 +1,6 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = widgets_graphicssceneadditem_snippets
|
||||
QT = core widgets
|
||||
|
||||
SOURCES = \
|
||||
graphicssceneadditemsnippet.cpp
|
@ -47,14 +47,15 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include <QDrag>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QMimeData>
|
||||
#include <QOpenGLWidget>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrinter>
|
||||
#include <QStandardItem>
|
||||
#include <QtCore/qmimedata.h>
|
||||
#include <QtGui/qdrag.h>
|
||||
#include <QtOpenGLWidgets/qopenglwidget.h>
|
||||
#include <QtPrintSupport/qprintdialog.h>
|
||||
#include <QtPrintSupport/qprinter.h>
|
||||
#include <QtWidgets/QGraphicsSceneMouseEvent>
|
||||
#include <QtWidgets/qdialog.h>
|
||||
#include <QtWidgets/qgraphicsview.h>
|
||||
|
||||
void graphicsview_snippet_main()
|
||||
{
|
||||
|
6
src/widgets/doc/snippets/graphicsview/graphicsview.pro
Normal file
6
src/widgets/doc/snippets/graphicsview/graphicsview.pro
Normal file
@ -0,0 +1,6 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = widgets_graphicsview_snippets
|
||||
QT = core widgets printsupport openglwidgets
|
||||
|
||||
SOURCES = \
|
||||
graphicsview.cpp
|
7
src/widgets/doc/snippets/mdiarea/mdiarea.pro
Normal file
7
src/widgets/doc/snippets/mdiarea/mdiarea.pro
Normal file
@ -0,0 +1,7 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = mdiarea_snippets
|
||||
QT += printsupport opengl openglwidgets
|
||||
|
||||
SOURCES = \
|
||||
mdiareasnippets.cpp
|
||||
|
@ -84,25 +84,3 @@ void addingSubWindowsExample()
|
||||
|
||||
mdiArea.show();
|
||||
}
|
||||
|
||||
/*
|
||||
int main(int argv, char **args)
|
||||
{
|
||||
QApplication app(argv, args);
|
||||
|
||||
mainWindowExample();
|
||||
//addingSubWindowsExample();
|
||||
|
||||
QAction *act = new QAction(qApp);
|
||||
act->setShortcut(Qt::ALT + Qt::Key_S);
|
||||
act->setShortcutContext( Qt::ApplicationShortcut );
|
||||
QObject::connect(act, &QAction::triggered, qApp, &QApplication::aboutQt);
|
||||
|
||||
QWidget widget5;
|
||||
widget5.show();
|
||||
widget5.addAction(act);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
*/
|
||||
|
||||
|
7
src/widgets/doc/snippets/myscrollarea/myscrollarea.pro
Normal file
7
src/widgets/doc/snippets/myscrollarea/myscrollarea.pro
Normal file
@ -0,0 +1,7 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = myscrollarea_snippets
|
||||
QT += widgets
|
||||
|
||||
SOURCES = \
|
||||
myscrollarea.cpp
|
||||
|
@ -1,14 +1,18 @@
|
||||
TEMPLATE = lib
|
||||
|
||||
TEMPLATE = subdirs
|
||||
TARGET = widgets_snippets
|
||||
SUBDIRS =
|
||||
|
||||
QT += widgets printsupport
|
||||
#! [qmake_use]
|
||||
QT += widgets
|
||||
#! [qmake_use]
|
||||
|
||||
SOURCES += customviewstyle/customviewstyle.cpp \
|
||||
filedialogurls/filedialogurls.cpp \
|
||||
graphicssceneadditem/graphicssceneadditemsnippet.cpp \
|
||||
graphicsview/graphicsview.cpp \
|
||||
mdiarea/mdiareasnippets.cpp \
|
||||
myscrollarea/myscrollarea.cpp
|
||||
contains(QT_BUILD_PARTS, tests) {
|
||||
SUBDIRS += \
|
||||
customviewstyle \
|
||||
filedialogurls \
|
||||
graphicssceneadditem \
|
||||
graphicsview \
|
||||
mdiarea \
|
||||
myscrollarea
|
||||
}
|
||||
|
||||
load(qt_common)
|
||||
|
Loading…
Reference in New Issue
Block a user