{
}
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *)
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
{
}
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *)
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
emit keyPressed(Qt::Key(e->key()));
}
-void GraphicsView::resizeEvent(QResizeEvent *event)
+void GraphicsView::resizeEvent(QResizeEvent *)
{
fitInView(scene()->sceneRect());
}
}
-void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *event)
+void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *)
{
emit clicked();
}
}
-void RectButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void RectButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /* option */, QWidget * /* widget */)
{
painter->setBrush(Qt::gray);
painter->drawRoundedRect(boundingRect(), 5, 5);
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "licensewizard.h"
INSTALLS += target sources
symbian: CONFIG += qt_example
-QT += widgets
+QT += widgets printsupport
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
maemo5: warning(This example might not fully work on Maemo platform)
SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
-contains(QT_CONFIG, opengl):QT += opengl widgets
+QT += widgets printsupport
+contains(QT_CONFIG, opengl):QT += opengl
build_all:!build_pass {
CONFIG -= build_all
#include "view.h"
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
#endif
}
protected:
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *)
{
#if defined(Q_OS_SYMBIAN)
fitInView(sceneRect(), Qt::KeepAspectRatio);
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "imagemodel.h"
#include "mainwindow.h"
INSTALLS += target sources
symbian: CONFIG += qt_example
-QT += widgets
+QT += widgets printsupport
maemo5: CONFIG += qt_example
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPrintPreviewDialog>
+
#include "spreadsheet.h"
#include "spreadsheetdelegate.h"
#include "spreadsheetitem.h"
INSTALLS += target sources
symbian: CONFIG += qt_example
-QT += widgets
+QT += widgets printsupport
maemo5: CONFIG += qt_example
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPrintPreviewDialog>
#include "mainwindow.h"
#include "ui_mainwindowbase.h"
QT_BEGIN_NAMESPACE
+class QPrinter;
class QTextEdit;
class QTreeWidget;
class QTreeWidgetItem;
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "detailsdialog.h"
#include "mainwindow.h"
INSTALLS += target sources
symbian: CONFIG += qt_example
-QT += widgets
+QT += widgets printsupport
maemo5: CONFIG += qt_example
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fingerpaint.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
INSTALLS += target sources
-QT += widgets
+QT += widgets printsupport
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "scribblearea.h"
/*
* QThread derived class with additional capability to move a QObject to the
* new thread, to stop the thread and move the QObject back to the thread where
- *it came from.
+ *it came from.
*/
Thread::Thread( QObject *parent)
{
worker = worker;
start();
- int i=0;
worker->moveToThread(this);
shutDownHelper->moveToThread(this);
connect(shutDownHelper, SIGNAL(mapped(int) ), this, SLOT(stopExecutor()), Qt::DirectConnection );
****************************************************************************/
#include <QtWidgets>
+#include <QPrintDialog>
#include "imageviewer.h"
wince*: {
DEPLOYMENT_PLUGIN += qjpeg qmng qgif
}
-QT += widgets
+QT += widgets printsupport
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
INSTALLS += target sources
symbian: CONFIG += qt_example
-QT += widgets
+QT += widgets printsupport
maemo5: CONFIG += qt_example
****************************************************************************/
#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "scribblearea.h"