summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview/flowlayout
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/graphicsview/flowlayout')
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.cpp6
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.h2
-rw-r--r--examples/widgets/graphicsview/flowlayout/main.cpp7
-rw-r--r--examples/widgets/graphicsview/flowlayout/window.cpp7
-rw-r--r--examples/widgets/graphicsview/flowlayout/window.h6
5 files changed, 18 insertions, 10 deletions
diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.cpp b/examples/widgets/graphicsview/flowlayout/flowlayout.cpp
index d43719005f..f994b780b8 100644
--- a/examples/widgets/graphicsview/flowlayout/flowlayout.cpp
+++ b/examples/widgets/graphicsview/flowlayout/flowlayout.cpp
@@ -39,8 +39,10 @@
****************************************************************************/
#include "flowlayout.h"
-#include <QtWidgets/qwidget.h>
-#include <QtCore/qmath.h>
+
+#include <qmath.h>
+
+#include <QWidget>
FlowLayout::FlowLayout()
{
diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.h b/examples/widgets/graphicsview/flowlayout/flowlayout.h
index 01a3474257..344f5b4db8 100644
--- a/examples/widgets/graphicsview/flowlayout/flowlayout.h
+++ b/examples/widgets/graphicsview/flowlayout/flowlayout.h
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtWidgets/qgraphicslayout.h>
+#include <QGraphicsLayout>
class FlowLayout : public QGraphicsLayout
{
diff --git a/examples/widgets/graphicsview/flowlayout/main.cpp b/examples/widgets/graphicsview/flowlayout/main.cpp
index 22d0d0c1da..378cb39bc5 100644
--- a/examples/widgets/graphicsview/flowlayout/main.cpp
+++ b/examples/widgets/graphicsview/flowlayout/main.cpp
@@ -38,10 +38,13 @@
**
****************************************************************************/
-#include <QtWidgets>
#include "window.h"
-int main(int argc, char **argv)
+#include <QApplication>
+#include <QGraphicsView>
+
+
+int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/examples/widgets/graphicsview/flowlayout/window.cpp b/examples/widgets/graphicsview/flowlayout/window.cpp
index c22c2a067b..ec3edfd830 100644
--- a/examples/widgets/graphicsview/flowlayout/window.cpp
+++ b/examples/widgets/graphicsview/flowlayout/window.cpp
@@ -38,17 +38,18 @@
**
****************************************************************************/
-#include <QtWidgets/qgraphicsproxywidget.h>
-#include <QtWidgets/qlabel.h>
#include "flowlayout.h"
#include "window.h"
+#include <QGraphicsProxyWidget>
+#include <QLabel>
+
Window::Window()
: QGraphicsWidget(0, Qt::Window)
{
FlowLayout *lay = new FlowLayout;
QLatin1String wiseWords("I am not bothered by the fact that I am unknown."
- " I am bothered when I do not know others. (Confucius)");
+ " I am bothered when I do not know others. (Confucius)");
QString sentence(wiseWords);
QStringList words = sentence.split(QLatin1Char(' '), QString::SkipEmptyParts);
for (int i = 0; i < words.count(); ++i) {
diff --git a/examples/widgets/graphicsview/flowlayout/window.h b/examples/widgets/graphicsview/flowlayout/window.h
index 0792e866ad..734aac92ce 100644
--- a/examples/widgets/graphicsview/flowlayout/window.h
+++ b/examples/widgets/graphicsview/flowlayout/window.h
@@ -38,10 +38,12 @@
**
****************************************************************************/
-#include <QtWidgets/qgraphicswidget.h>
+#include <QGraphicsWidget>
-class Window : public QGraphicsWidget {
+class Window : public QGraphicsWidget
+{
Q_OBJECT
+
public:
Window();
};