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:
Paul Wicking 2020-09-22 07:45:05 +02:00
parent 63ec6263a5
commit 84cfb1aaa6
10 changed files with 65 additions and 40 deletions

View File

@ -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

View File

@ -0,0 +1,10 @@
TEMPLATE = lib
TARGET = widgets_customviewstyle_snippets
QT = core widgets
HEADERS = \
../customstyle/customstyle.h
SOURCES = \
customviewstyle.cpp
../customstyle/customstyle.cpp

View File

@ -0,0 +1,6 @@
TEMPLATE = lib
TARGET = widgets_filedialogurls_snippets
QT = core widgets
SOURCES = \
filedialogurls.cpp

View File

@ -0,0 +1,6 @@
TEMPLATE = lib
TARGET = widgets_graphicssceneadditem_snippets
QT = core widgets
SOURCES = \
graphicssceneadditemsnippet.cpp

View File

@ -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()
{

View File

@ -0,0 +1,6 @@
TEMPLATE = lib
TARGET = widgets_graphicsview_snippets
QT = core widgets printsupport openglwidgets
SOURCES = \
graphicsview.cpp

View File

@ -0,0 +1,7 @@
TEMPLATE = lib
TARGET = mdiarea_snippets
QT += printsupport opengl openglwidgets
SOURCES = \
mdiareasnippets.cpp

View File

@ -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();
}
*/

View File

@ -0,0 +1,7 @@
TEMPLATE = lib
TARGET = myscrollarea_snippets
QT += widgets
SOURCES = \
myscrollarea.cpp

View File

@ -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)