summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-09-13 08:54:45 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-09-13 08:54:45 +0200
commitb62bd0584a7872b6917917009b707785b3abd077 (patch)
tree9981f274712c098cabbff0c4667672a3934e5393 /examples
parent5e10745dca1d10025404a9f268f03ae697fb10cc (diff)
parent97baad65f65783d2b5ff938f6217aec9434f2e5f (diff)
Merge branch 'refactor'
Conflicts: mkspecs/qws/linux-lsb-g++/qmake.conf src/gui/image/qpixmap_mac.cpp src/gui/painting/qpaintengine_x11.cpp src/gui/painting/qtessellator.cpp src/gui/text/qfontengine_qws.cpp src/gui/text/qfontengine_x11.cpp src/gui/widgets/qlinecontrol.cpp src/opengl/qgl.h src/opengl/qgl_x11egl.cpp src/plugins/plugins.pro Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
Diffstat (limited to 'examples')
-rw-r--r--examples/animation/animatedtiles/animatedtiles.pro1
-rw-r--r--examples/animation/animatedtiles/main.cpp2
-rw-r--r--examples/animation/animation.pro1
-rw-r--r--examples/animation/appchooser/appchooser.pro1
-rw-r--r--examples/animation/appchooser/main.cpp4
-rw-r--r--examples/animation/easing/animation.h2
-rw-r--r--examples/animation/easing/easing.pro1
-rw-r--r--examples/animation/easing/main.cpp2
-rw-r--r--examples/animation/easing/window.h3
-rw-r--r--examples/animation/moveblocks/main.cpp2
-rw-r--r--examples/animation/moveblocks/moveblocks.pro1
-rw-r--r--examples/animation/states/main.cpp4
-rw-r--r--examples/animation/states/states.pro1
-rw-r--r--examples/animation/stickman/graphicsview.cpp6
-rw-r--r--examples/animation/stickman/graphicsview.h2
-rw-r--r--examples/animation/stickman/lifecycle.cpp2
-rw-r--r--examples/animation/stickman/main.cpp2
-rw-r--r--examples/animation/stickman/rectbutton.cpp4
-rw-r--r--examples/animation/stickman/stickman.pro1
-rw-r--r--examples/animation/sub-attaq/boat_p.h2
-rw-r--r--examples/animation/sub-attaq/graphicsscene.cpp10
-rw-r--r--examples/animation/sub-attaq/graphicsscene.h2
-rw-r--r--examples/animation/sub-attaq/main.cpp2
-rw-r--r--examples/animation/sub-attaq/mainwindow.h2
-rw-r--r--examples/animation/sub-attaq/pixmapitem.h2
-rw-r--r--examples/animation/sub-attaq/progressitem.h2
-rw-r--r--examples/animation/sub-attaq/states.cpp6
-rw-r--r--examples/animation/sub-attaq/states.h2
-rw-r--r--examples/animation/sub-attaq/sub-attaq.pro2
-rw-r--r--examples/animation/sub-attaq/submarine.h2
-rw-r--r--examples/animation/sub-attaq/submarine_p.h2
-rw-r--r--examples/animation/sub-attaq/textinformationitem.h2
-rw-r--r--examples/dbus/complexpingpong/complexpingpong.pro1
-rw-r--r--examples/dbus/dbus-chat/chat.cpp4
-rw-r--r--examples/dbus/dbus-chat/dbus-chat.pro1
-rw-r--r--examples/dbus/dbus.pro1
-rw-r--r--examples/dbus/pingpong/pingpong.pro1
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.cpp2
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.pro1
-rw-r--r--examples/dbus/remotecontrolledcar/car/main.cpp6
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.cpp2
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.pro1
-rw-r--r--examples/dbus/remotecontrolledcar/controller/main.cpp2
-rw-r--r--examples/dbus/remotecontrolledcar/remotecontrolledcar.pro1
-rw-r--r--examples/desktop/desktop.pro1
-rw-r--r--examples/desktop/screenshot/screenshot.cpp2
-rw-r--r--examples/desktop/screenshot/screenshot.pro1
-rw-r--r--examples/dialogs/classwizard/classwizard.cpp2
-rw-r--r--examples/dialogs/classwizard/classwizard.pro1
-rw-r--r--examples/dialogs/configdialog/configdialog.cpp2
-rw-r--r--examples/dialogs/configdialog/configdialog.pro1
-rw-r--r--examples/dialogs/configdialog/pages.cpp2
-rw-r--r--examples/dialogs/dialogs.pro1
-rw-r--r--examples/dialogs/extension/extension.pro1
-rw-r--r--examples/dialogs/extension/finddialog.cpp2
-rw-r--r--examples/dialogs/findfiles/findfiles.pro1
-rw-r--r--examples/dialogs/findfiles/window.cpp2
-rw-r--r--examples/dialogs/licensewizard/licensewizard.cpp6
-rw-r--r--examples/dialogs/licensewizard/licensewizard.pro1
-rw-r--r--examples/dialogs/sipdialog/dialog.cpp2
-rw-r--r--examples/dialogs/sipdialog/main.cpp2
-rw-r--r--examples/dialogs/sipdialog/sipdialog.pro2
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp2
-rw-r--r--examples/dialogs/standarddialogs/standarddialogs.pro1
-rw-r--r--examples/dialogs/tabdialog/tabdialog.cpp2
-rw-r--r--examples/dialogs/tabdialog/tabdialog.pro1
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.cpp2
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.pro1
-rw-r--r--examples/draganddrop/draganddrop.pro1
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.pro1
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.cpp2
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.pro1
-rw-r--r--examples/draganddrop/draggabletext/draglabel.cpp2
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp2
-rw-r--r--examples/draganddrop/dropsite/droparea.cpp2
-rw-r--r--examples/draganddrop/dropsite/dropsite.pro1
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.cpp2
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.cpp2
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.cpp2
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.pro2
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp2
-rw-r--r--examples/draganddrop/puzzle/pieceslist.cpp2
-rw-r--r--examples/draganddrop/puzzle/puzzle.pro1
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.cpp2
-rw-r--r--examples/effects/blurpicker/blurpicker.cpp2
-rw-r--r--examples/effects/blurpicker/blurpicker.pro1
-rw-r--r--examples/effects/effects.pro1
-rw-r--r--examples/effects/fademessage/fademessage.cpp2
-rw-r--r--examples/effects/fademessage/fademessage.pro1
-rw-r--r--examples/effects/lighting/lighting.cpp2
-rw-r--r--examples/effects/lighting/lighting.pro1
-rw-r--r--examples/embedded/digiflip/digiflip.cpp2
-rw-r--r--examples/embedded/embedded.pro1
-rw-r--r--examples/embedded/flickable/flickable.cpp2
-rw-r--r--examples/embedded/flickable/flickable.pro1
-rw-r--r--examples/embedded/flickable/main.cpp2
-rw-r--r--examples/embedded/flightinfo/flightinfo.cpp2
-rw-r--r--examples/embedded/flightinfo/flightinfo.pro2
-rw-r--r--examples/embedded/lightmaps/lightmaps.cpp2
-rw-r--r--examples/embedded/lightmaps/lightmaps.pro2
-rw-r--r--examples/embedded/lightmaps/mapzoom.cpp2
-rw-r--r--examples/embedded/lightmaps/slippymap.cpp2
-rw-r--r--examples/embedded/raycasting/raycasting.cpp2
-rw-r--r--examples/embedded/raycasting/raycasting.pro1
-rw-r--r--examples/embedded/styleexample/styleexample.pro1
-rw-r--r--examples/examples.pro8
-rw-r--r--examples/gestures/gestures.pro1
-rw-r--r--examples/gestures/imagegestures/imagegestures.pro1
-rw-r--r--examples/gestures/imagegestures/imagewidget.cpp2
-rw-r--r--examples/gestures/imagegestures/imagewidget.h2
-rw-r--r--examples/gestures/imagegestures/main.cpp2
-rw-r--r--examples/graphicsview/anchorlayout/anchorlayout.pro1
-rw-r--r--examples/graphicsview/anchorlayout/main.cpp2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro1
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.h2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/main.cpp2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.h2
-rw-r--r--examples/graphicsview/boxes/boxes.pro2
-rw-r--r--examples/graphicsview/boxes/glbuffers.h2
-rw-r--r--examples/graphicsview/boxes/gltrianglemesh.h2
-rw-r--r--examples/graphicsview/boxes/main.cpp2
-rw-r--r--examples/graphicsview/boxes/qtbox.h2
-rw-r--r--examples/graphicsview/boxes/roundedbox.h2
-rw-r--r--examples/graphicsview/boxes/scene.h2
-rw-r--r--examples/graphicsview/boxes/trackball.h2
-rw-r--r--examples/graphicsview/chip/chip.cpp2
-rw-r--r--examples/graphicsview/chip/chip.h2
-rw-r--r--examples/graphicsview/chip/chip.pro1
-rw-r--r--examples/graphicsview/chip/mainwindow.cpp2
-rw-r--r--examples/graphicsview/chip/mainwindow.h2
-rw-r--r--examples/graphicsview/chip/view.cpp5
-rw-r--r--examples/graphicsview/collidingmice/collidingmice.pro1
-rw-r--r--examples/graphicsview/collidingmice/main.cpp2
-rw-r--r--examples/graphicsview/diagramscene/arrow.cpp2
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.cpp2
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.cpp2
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.pro1
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.cpp2
-rw-r--r--examples/graphicsview/diagramscene/main.cpp2
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp2
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.cpp2
-rw-r--r--examples/graphicsview/dragdroprobot/dragdroprobot.pro1
-rw-r--r--examples/graphicsview/dragdroprobot/main.cpp4
-rw-r--r--examples/graphicsview/dragdroprobot/robot.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/elasticnodes.pro1
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.h2
-rw-r--r--examples/graphicsview/elasticnodes/main.cpp2
-rw-r--r--examples/graphicsview/embeddeddialogs/customproxy.cpp2
-rw-r--r--examples/graphicsview/embeddeddialogs/customproxy.h2
-rw-r--r--examples/graphicsview/embeddeddialogs/embeddeddialog.cpp2
-rw-r--r--examples/graphicsview/embeddeddialogs/embeddeddialog.h2
-rw-r--r--examples/graphicsview/embeddeddialogs/embeddeddialogs.pro1
-rw-r--r--examples/graphicsview/embeddeddialogs/main.cpp2
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.cpp2
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.h2
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.pro1
-rw-r--r--examples/graphicsview/flowlayout/main.cpp2
-rw-r--r--examples/graphicsview/flowlayout/window.cpp4
-rw-r--r--examples/graphicsview/flowlayout/window.h2
-rw-r--r--examples/graphicsview/graphicsview.pro1
-rw-r--r--examples/graphicsview/padnavigator/flippablepad.cpp2
-rw-r--r--examples/graphicsview/padnavigator/main.cpp2
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.cpp2
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.pro2
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.cpp2
-rw-r--r--examples/graphicsview/padnavigator/splashitem.cpp2
-rw-r--r--examples/graphicsview/simpleanchorlayout/main.cpp2
-rw-r--r--examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro1
-rw-r--r--examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro1
-rw-r--r--examples/ipc/ipc.pro1
-rw-r--r--examples/ipc/localfortuneclient/client.cpp2
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.pro2
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.pro2
-rw-r--r--examples/ipc/localfortuneserver/server.cpp2
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.pro1
-rw-r--r--examples/itemviews/addressbook/adddialog.cpp2
-rw-r--r--examples/itemviews/addressbook/addressbook.pro1
-rw-r--r--examples/itemviews/addressbook/addresswidget.cpp2
-rw-r--r--examples/itemviews/addressbook/main.cpp2
-rw-r--r--examples/itemviews/addressbook/mainwindow.cpp2
-rw-r--r--examples/itemviews/addressbook/mainwindow.h2
-rw-r--r--examples/itemviews/addressbook/newaddresstab.cpp2
-rw-r--r--examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro1
-rw-r--r--examples/itemviews/basicsortfiltermodel/main.cpp2
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.cpp2
-rw-r--r--examples/itemviews/chart/chart.pro1
-rw-r--r--examples/itemviews/chart/mainwindow.cpp2
-rw-r--r--examples/itemviews/chart/pieview.cpp2
-rw-r--r--examples/itemviews/coloreditorfactory/coloreditorfactory.pro1
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.cpp2
-rw-r--r--examples/itemviews/coloreditorfactory/main.cpp2
-rw-r--r--examples/itemviews/coloreditorfactory/window.cpp2
-rw-r--r--examples/itemviews/combowidgetmapper/combowidgetmapper.pro1
-rw-r--r--examples/itemviews/combowidgetmapper/window.cpp2
-rw-r--r--examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro1
-rw-r--r--examples/itemviews/customsortfiltermodel/main.cpp2
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp2
-rw-r--r--examples/itemviews/customsortfiltermodel/window.cpp2
-rw-r--r--examples/itemviews/dirview/dirview.pro1
-rw-r--r--examples/itemviews/dirview/main.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.pro1
-rw-r--r--examples/itemviews/editabletreemodel/main.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.cpp2
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.cpp2
-rw-r--r--examples/itemviews/fetchmore/fetchmore.pro1
-rw-r--r--examples/itemviews/fetchmore/window.cpp2
-rw-r--r--examples/itemviews/frozencolumn/freezetablewidget.cpp2
-rw-r--r--examples/itemviews/frozencolumn/frozencolumn.pro1
-rw-r--r--examples/itemviews/interview/interview.pro1
-rw-r--r--examples/itemviews/itemviews.pro1
-rw-r--r--examples/itemviews/pixelator/imagemodel.cpp2
-rw-r--r--examples/itemviews/pixelator/mainwindow.cpp4
-rw-r--r--examples/itemviews/pixelator/pixelator.pro1
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.cpp2
-rw-r--r--examples/itemviews/puzzle/mainwindow.cpp2
-rw-r--r--examples/itemviews/puzzle/piecesmodel.cpp2
-rw-r--r--examples/itemviews/puzzle/puzzle.pro1
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.cpp2
-rw-r--r--examples/itemviews/simpledommodel/dommodel.cpp2
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.cpp2
-rw-r--r--examples/itemviews/simpledommodel/simpledommodel.pro2
-rw-r--r--examples/itemviews/simpletreemodel/main.cpp2
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.pro1
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.cpp2
-rw-r--r--examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro1
-rw-r--r--examples/itemviews/simplewidgetmapper/window.cpp2
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.cpp2
-rw-r--r--examples/itemviews/spinboxdelegate/spinboxdelegate.pro1
-rw-r--r--examples/itemviews/spreadsheet/main.cpp2
-rw-r--r--examples/itemviews/spreadsheet/printview.h1
-rw-r--r--examples/itemviews/spreadsheet/spreadsheet.cpp6
-rw-r--r--examples/itemviews/spreadsheet/spreadsheet.pro3
-rw-r--r--examples/itemviews/spreadsheet/spreadsheetdelegate.cpp2
-rw-r--r--examples/itemviews/spreadsheet/spreadsheetitem.h2
-rw-r--r--examples/itemviews/stardelegate/main.cpp2
-rw-r--r--examples/itemviews/stardelegate/stardelegate.cpp2
-rw-r--r--examples/itemviews/stardelegate/stardelegate.pro1
-rw-r--r--examples/itemviews/stardelegate/stareditor.cpp2
-rw-r--r--examples/itemviews/stardelegate/starrating.cpp2
-rw-r--r--examples/ja_JP/linguist/hellotr/hellotr.pro1
-rw-r--r--examples/layouts/basiclayouts/basiclayouts.pro1
-rw-r--r--examples/layouts/basiclayouts/dialog.cpp2
-rw-r--r--examples/layouts/borderlayout/borderlayout.cpp2
-rw-r--r--examples/layouts/borderlayout/borderlayout.pro1
-rw-r--r--examples/layouts/borderlayout/window.cpp2
-rw-r--r--examples/layouts/dynamiclayouts/dialog.cpp2
-rw-r--r--examples/layouts/dynamiclayouts/dynamiclayouts.pro1
-rw-r--r--examples/layouts/flowlayout/flowlayout.cpp2
-rw-r--r--examples/layouts/flowlayout/flowlayout.pro1
-rw-r--r--examples/layouts/flowlayout/window.cpp2
-rw-r--r--examples/layouts/layouts.pro1
-rw-r--r--examples/linguist/arrowpad/arrowpad.cpp2
-rw-r--r--examples/linguist/arrowpad/arrowpad.pro1
-rw-r--r--examples/linguist/arrowpad/main.cpp2
-rw-r--r--examples/linguist/arrowpad/mainwindow.cpp2
-rw-r--r--examples/linguist/hellotr/hellotr.pro1
-rw-r--r--examples/linguist/linguist.pro1
-rw-r--r--examples/linguist/trollprint/main.cpp2
-rw-r--r--examples/linguist/trollprint/mainwindow.cpp2
-rw-r--r--examples/linguist/trollprint/printpanel.cpp2
-rw-r--r--examples/linguist/trollprint/trollprint.pro1
-rw-r--r--examples/mainwindows/application/application.pro1
-rw-r--r--examples/mainwindows/application/mainwindow.cpp2
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.pro1
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp2
-rw-r--r--examples/mainwindows/macmainwindow/macmainwindow.h2
-rw-r--r--examples/mainwindows/macmainwindow/macmainwindow.pro1
-rw-r--r--examples/mainwindows/macmainwindow/main.cpp2
-rw-r--r--examples/mainwindows/mainwindow/mainwindow.pro1
-rw-r--r--examples/mainwindows/mainwindows.pro1
-rw-r--r--examples/mainwindows/mdi/mainwindow.cpp2
-rw-r--r--examples/mainwindows/mdi/mdi.pro1
-rw-r--r--examples/mainwindows/mdi/mdichild.cpp2
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp2
-rw-r--r--examples/mainwindows/menus/menus.pro1
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.cpp2
-rw-r--r--examples/mainwindows/recentfiles/recentfiles.pro1
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp2
-rw-r--r--examples/mainwindows/sdi/sdi.pro1
-rw-r--r--examples/network/bearermonitor/bearermonitor.pro2
-rw-r--r--examples/network/bearermonitor/main.cpp4
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.cpp2
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.pro2
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.pro2
-rw-r--r--examples/network/broadcastreceiver/receiver.cpp2
-rw-r--r--examples/network/broadcastsender/broadcastsender.pro2
-rw-r--r--examples/network/broadcastsender/sender.cpp2
-rw-r--r--examples/network/fortuneclient/client.cpp2
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro2
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro2
-rw-r--r--examples/network/fortuneserver/server.cpp2
-rw-r--r--examples/network/googlesuggest/googlesuggest.h2
-rw-r--r--examples/network/googlesuggest/googlesuggest.pro2
-rw-r--r--examples/network/http/http.pro2
-rw-r--r--examples/network/http/httpwindow.cpp2
-rw-r--r--examples/network/loopback/dialog.cpp2
-rw-r--r--examples/network/loopback/loopback.pro2
-rw-r--r--examples/network/multicastreceiver/multicastreceiver.pro2
-rw-r--r--examples/network/multicastreceiver/receiver.cpp2
-rw-r--r--examples/network/multicastsender/multicastsender.pro2
-rw-r--r--examples/network/multicastsender/sender.cpp2
-rw-r--r--examples/network/network-chat/chatdialog.cpp2
-rw-r--r--examples/network/network-chat/network-chat.pro2
-rw-r--r--examples/network/network.pro1
-rw-r--r--examples/network/qftp/ftpwindow.cpp2
-rw-r--r--examples/network/qftp/qftp.pro2
-rw-r--r--examples/network/securesocketclient/certificateinfo.h2
-rw-r--r--examples/network/securesocketclient/securesocketclient.pro2
-rw-r--r--examples/network/securesocketclient/sslclient.cpp6
-rw-r--r--examples/network/securesocketclient/sslclient.h2
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp2
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.pro2
-rw-r--r--examples/network/torrent/mainwindow.cpp2
-rw-r--r--examples/network/torrent/torrent.pro2
-rw-r--r--examples/opengl/2dpainting/2dpainting.pro2
-rw-r--r--examples/opengl/2dpainting/glwidget.cpp2
-rw-r--r--examples/opengl/2dpainting/helper.cpp2
-rw-r--r--examples/opengl/2dpainting/widget.cpp2
-rw-r--r--examples/opengl/2dpainting/window.cpp2
-rw-r--r--examples/opengl/cube/cube.pro2
-rw-r--r--examples/opengl/cube/main.cpp2
-rw-r--r--examples/opengl/cube/mainwidget.cpp4
-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.pro2
-rw-r--r--examples/opengl/framebufferobject2/main.cpp4
-rw-r--r--examples/opengl/grabber/glwidget.cpp2
-rw-r--r--examples/opengl/grabber/grabber.pro2
-rw-r--r--examples/opengl/grabber/mainwindow.cpp2
-rw-r--r--examples/opengl/hellogl/glwidget.cpp2
-rw-r--r--examples/opengl/hellogl/hellogl.pro2
-rw-r--r--examples/opengl/hellogl/window.cpp2
-rw-r--r--examples/opengl/hellogl_es/bubble.cpp139
-rw-r--r--examples/opengl/hellogl_es/bubble.h76
-rw-r--r--examples/opengl/hellogl_es/glwidget.cpp455
-rw-r--r--examples/opengl/hellogl_es/glwidget.h85
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.desktop11
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.pro33
-rw-r--r--examples/opengl/hellogl_es/main.cpp52
-rw-r--r--examples/opengl/hellogl_es/mainwindow.cpp107
-rw-r--r--examples/opengl/hellogl_es/mainwindow.h59
-rw-r--r--examples/opengl/hellogl_es/qt.pngbin5174 -> 0 bytes
-rw-r--r--examples/opengl/hellogl_es/texture.qrc5
-rw-r--r--examples/opengl/hellogl_es2/bubble.cpp2
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.pro2
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp276
-rw-r--r--examples/opengl/hellowindow/hellowindow.h65
-rw-r--r--examples/opengl/hellowindow/hellowindow.pro18
-rw-r--r--examples/opengl/hellowindow/main.cpp50
-rw-r--r--examples/opengl/opengl.pro6
-rw-r--r--examples/opengl/overpainting/bubble.cpp2
-rw-r--r--examples/opengl/overpainting/glwidget.cpp2
-rw-r--r--examples/opengl/overpainting/overpainting.pro2
-rw-r--r--examples/opengl/paintedwindow/main.cpp23
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.cpp53
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h26
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.pro18
-rw-r--r--examples/opengl/pbuffers/main.cpp4
-rw-r--r--examples/opengl/pbuffers/pbuffers.pro2
-rw-r--r--examples/opengl/pbuffers2/main.cpp4
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.pro2
-rw-r--r--examples/opengl/samplebuffers/main.cpp4
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.pro2
-rw-r--r--examples/opengl/textures/glwidget.cpp2
-rw-r--r--examples/opengl/textures/glwidget.h2
-rw-r--r--examples/opengl/textures/textures.pro2
-rw-r--r--examples/opengl/textures/window.cpp2
-rw-r--r--examples/openvg/README10
-rw-r--r--examples/openvg/openvg.desktop11
-rw-r--r--examples/openvg/openvg.pro9
-rw-r--r--examples/openvg/star/main.cpp53
-rw-r--r--examples/openvg/star/star.pro7
-rw-r--r--examples/openvg/star/starwidget.cpp115
-rw-r--r--examples/openvg/star/starwidget.h65
-rw-r--r--examples/painting/affine/affine.pro2
-rw-r--r--examples/painting/basicdrawing/basicdrawing.pro1
-rw-r--r--examples/painting/basicdrawing/renderarea.cpp2
-rw-r--r--examples/painting/basicdrawing/window.cpp2
-rw-r--r--examples/painting/composition/composition.pro2
-rw-r--r--examples/painting/composition/main.cpp3
-rw-r--r--examples/painting/concentriccircles/circlewidget.cpp2
-rw-r--r--examples/painting/concentriccircles/concentriccircles.pro1
-rw-r--r--examples/painting/concentriccircles/window.cpp2
-rw-r--r--examples/painting/deform/deform.pro2
-rw-r--r--examples/painting/fontsampler/fontsampler.pro1
-rw-r--r--examples/painting/fontsampler/mainwindow.cpp5
-rw-r--r--examples/painting/fontsampler/mainwindow.h1
-rw-r--r--examples/painting/gradients/gradients.h2
-rw-r--r--examples/painting/gradients/gradients.pro2
-rw-r--r--examples/painting/imagecomposition/imagecomposer.cpp2
-rw-r--r--examples/painting/imagecomposition/imagecomposition.pro1
-rw-r--r--examples/painting/painterpaths/painterpaths.pro1
-rw-r--r--examples/painting/painterpaths/renderarea.cpp2
-rw-r--r--examples/painting/painterpaths/window.cpp2
-rw-r--r--examples/painting/painting.pro1
-rw-r--r--examples/painting/pathstroke/pathstroke.h2
-rw-r--r--examples/painting/pathstroke/pathstroke.pro2
-rw-r--r--examples/painting/shared/arthurwidgets.cpp7
-rw-r--r--examples/painting/shared/hoverpoints.h2
-rw-r--r--examples/painting/shared/shared.pro4
-rw-r--r--examples/painting/transformations/renderarea.cpp2
-rw-r--r--examples/painting/transformations/transformations.pro1
-rw-r--r--examples/painting/transformations/window.cpp2
-rw-r--r--examples/qmake/precompile/precompile.pro1
-rw-r--r--examples/qpa/qpa.pro8
-rw-r--r--examples/qpa/windows/main.cpp31
-rw-r--r--examples/qpa/windows/window.cpp158
-rw-r--r--examples/qpa/windows/window.h33
-rw-r--r--examples/qpa/windows/windows.pro15
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.h2
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.pro1
-rw-r--r--examples/qtconcurrent/imagescaling/main.cpp2
-rw-r--r--examples/qtconcurrent/map/map.pro1
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp2
-rw-r--r--examples/qtconcurrent/progressdialog/progressdialog.pro1
-rw-r--r--examples/qtconcurrent/qtconcurrent.pro1
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.pro1
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.pro1
-rw-r--r--examples/qtestlib/qtestlib.pro1
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.pro1
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.pro1
-rw-r--r--examples/qtestlib/tutorial3/testgui.cpp2
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.pro1
-rw-r--r--examples/qtestlib/tutorial4/testgui.cpp2
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.pro1
-rw-r--r--examples/qtestlib/tutorial5/benchmarking.cpp2
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.pro1
-rw-r--r--examples/qws/dbscreen/dbscreen.pro1
-rw-r--r--examples/qws/framebuffer/framebuffer.pro1
-rw-r--r--examples/qws/mousecalibration/mousecalibration.pro1
-rw-r--r--examples/qws/qws.pro1
-rw-r--r--examples/qws/simpledecoration/analogclock.cpp2
-rw-r--r--examples/qws/simpledecoration/mydecoration.cpp2
-rw-r--r--examples/qws/simpledecoration/simpledecoration.pro1
-rw-r--r--examples/qws/svgalib/svgalib.pro1
-rw-r--r--examples/richtext/calendar/calendar.pro1
-rw-r--r--examples/richtext/calendar/main.cpp2
-rw-r--r--examples/richtext/calendar/mainwindow.cpp2
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp2
-rw-r--r--examples/richtext/orderform/main.cpp2
-rw-r--r--examples/richtext/orderform/mainwindow.cpp4
-rw-r--r--examples/richtext/orderform/orderform.pro1
-rw-r--r--examples/richtext/richtext.pro1
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.cpp2
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.cpp2
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.pro1
-rw-r--r--examples/richtext/textedit/textedit.h1
-rw-r--r--examples/richtext/textedit/textedit.pro1
-rw-r--r--examples/scroller/graphicsview/graphicsview.pro1
-rw-r--r--examples/scroller/graphicsview/main.cpp2
-rw-r--r--examples/scroller/scroller.pro1
-rw-r--r--examples/sql/books/bookdelegate.cpp2
-rw-r--r--examples/sql/books/books.pro2
-rw-r--r--examples/sql/books/bookwindow.h2
-rw-r--r--examples/sql/books/main.cpp2
-rw-r--r--examples/sql/cachedtable/cachedtable.pro2
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp2
-rw-r--r--examples/sql/drilldown/drilldown.pro2
-rw-r--r--examples/sql/drilldown/imageitem.h2
-rw-r--r--examples/sql/drilldown/informationwindow.h2
-rw-r--r--examples/sql/drilldown/main.cpp2
-rw-r--r--examples/sql/drilldown/view.h2
-rw-r--r--examples/sql/masterdetail/dialog.h2
-rw-r--r--examples/sql/masterdetail/main.cpp2
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp2
-rw-r--r--examples/sql/masterdetail/masterdetail.pro4
-rw-r--r--examples/sql/querymodel/customsqlmodel.cpp2
-rw-r--r--examples/sql/querymodel/main.cpp2
-rw-r--r--examples/sql/querymodel/querymodel.pro2
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.cpp2
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.pro2
-rw-r--r--examples/sql/sql.pro1
-rw-r--r--examples/sql/sqlbrowser/browser.cpp2
-rw-r--r--examples/sql/sqlbrowser/connectionwidget.cpp2
-rw-r--r--examples/sql/sqlbrowser/main.cpp2
-rw-r--r--examples/sql/sqlbrowser/sqlbrowser.pro2
-rw-r--r--examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro2
-rw-r--r--examples/sql/sqlwidgetmapper/window.cpp2
-rw-r--r--examples/sql/tablemodel/tablemodel.cpp2
-rw-r--r--examples/sql/tablemodel/tablemodel.pro2
-rw-r--r--examples/statemachine/eventtransitions/eventtransitions.pro1
-rw-r--r--examples/statemachine/eventtransitions/main.cpp2
-rw-r--r--examples/statemachine/rogue/main.cpp2
-rw-r--r--examples/statemachine/rogue/movementtransition.h2
-rw-r--r--examples/statemachine/rogue/rogue.pro1
-rw-r--r--examples/statemachine/rogue/window.cpp2
-rw-r--r--examples/statemachine/statemachine.pro1
-rw-r--r--examples/statemachine/trafficlight/main.cpp2
-rw-r--r--examples/statemachine/trafficlight/trafficlight.pro1
-rw-r--r--examples/statemachine/twowaybutton/main.cpp2
-rw-r--r--examples/statemachine/twowaybutton/twowaybutton.pro1
-rw-r--r--examples/threads/mandelbrot/mandelbrot.pro1
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp2
-rw-r--r--examples/threads/mandelbrot/renderthread.cpp2
-rw-r--r--examples/threads/queuedcustomtype/queuedcustomtype.pro1
-rw-r--r--examples/threads/queuedcustomtype/window.cpp2
-rw-r--r--examples/threads/threads.pro1
-rw-r--r--examples/tools/codecs/codecs.pro1
-rw-r--r--examples/tools/codecs/mainwindow.cpp2
-rw-r--r--examples/tools/codecs/previewform.cpp2
-rw-r--r--examples/tools/completer/completer.pro1
-rw-r--r--examples/tools/completer/mainwindow.cpp2
-rw-r--r--examples/tools/contiguouscache/contiguouscache.pro1
-rw-r--r--examples/tools/customcompleter/customcompleter.pro1
-rw-r--r--examples/tools/customcompleter/mainwindow.cpp2
-rw-r--r--examples/tools/customtype/customtype.pro1
-rw-r--r--examples/tools/customtypesending/customtypesending.pro1
-rw-r--r--examples/tools/customtypesending/window.cpp2
-rw-r--r--examples/tools/echoplugin/echoplugin.pro1
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.cpp2
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.pro1
-rw-r--r--examples/tools/echoplugin/echowindow/main.cpp2
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.cpp2
-rw-r--r--examples/tools/echoplugin/plugin/plugin.pro3
-rw-r--r--examples/tools/i18n/i18n.pro1
-rw-r--r--examples/tools/i18n/languagechooser.cpp2
-rw-r--r--examples/tools/i18n/mainwindow.cpp2
-rw-r--r--examples/tools/inputpanel/inputpanel.pro1
-rw-r--r--examples/tools/inputpanel/main.cpp4
-rw-r--r--examples/tools/inputpanel/myinputpanel.h2
-rw-r--r--examples/tools/inputpanel/myinputpanelcontext.h2
-rw-r--r--examples/tools/plugandpaint/plugandpaint.pro1
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictools.pro1
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp2
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro1
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp2
-rw-r--r--examples/tools/plugandpaintplugins/plugandpaintplugins.pro1
-rw-r--r--examples/tools/regexp/regexp.pro1
-rw-r--r--examples/tools/regexp/regexpdialog.cpp2
-rw-r--r--examples/tools/settingseditor/locationdialog.cpp2
-rw-r--r--examples/tools/settingseditor/mainwindow.cpp2
-rw-r--r--examples/tools/settingseditor/settingseditor.pro1
-rw-r--r--examples/tools/settingseditor/settingstree.cpp2
-rw-r--r--examples/tools/settingseditor/variantdelegate.cpp2
-rw-r--r--examples/tools/styleplugin/plugin/plugin.pro1
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.cpp2
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.cpp2
-rw-r--r--examples/tools/styleplugin/styleplugin.pro1
-rw-r--r--examples/tools/styleplugin/stylewindow/main.cpp2
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.cpp2
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.pro1
-rw-r--r--examples/tools/tools.pro1
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.cpp2
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.pro1
-rw-r--r--examples/tools/undo/undo.pro1
-rw-r--r--examples/tools/undoframework/commands.cpp2
-rw-r--r--examples/tools/undoframework/diagramitem.cpp2
-rw-r--r--examples/tools/undoframework/diagramscene.cpp2
-rw-r--r--examples/tools/undoframework/main.cpp2
-rw-r--r--examples/tools/undoframework/mainwindow.cpp2
-rw-r--r--examples/tools/undoframework/undoframework.pro1
-rw-r--r--examples/touch/dials/dials.pro1
-rw-r--r--examples/touch/fingerpaint/fingerpaint.pro1
-rw-r--r--examples/touch/fingerpaint/mainwindow.cpp2
-rw-r--r--examples/touch/fingerpaint/scribblearea.cpp4
-rw-r--r--examples/touch/knobs/knobs.pro1
-rw-r--r--examples/touch/pinchzoom/main.cpp2
-rw-r--r--examples/touch/pinchzoom/pinchzoom.pro1
-rw-r--r--examples/touch/touch.pro1
-rw-r--r--examples/tutorials/addressbook-fr/addressbook-fr.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part1/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part1/part1.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part2/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part2/part2.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part3/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part3/part3.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part4/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part4/part4.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part5/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part5/part5.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part6/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part6/part6.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part7/main.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part7/part7.pro1
-rw-r--r--examples/tutorials/addressbook/addressbook.pro1
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part1/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part1/part1.pro1
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part2/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part2/part2.pro1
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part3/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part3/part3.pro1
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part4/part4.pro1
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/part5.pro1
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/part6.pro1
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/part7.pro1
-rw-r--r--examples/tutorials/gettingStarted/gettingStarted.pro1
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/gsqt.pro1
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part1/main.cpp2
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part2/main.cpp2
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part3/main.cpp2
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part4/main.cpp2
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part5/main.cpp2
-rwxr-xr-xexamples/tutorials/modelview/1_readonly/1_readonly.pro1
-rwxr-xr-xexamples/tutorials/modelview/1_readonly/main.cpp4
-rwxr-xr-xexamples/tutorials/modelview/2_formatting/2_formatting.pro1
-rwxr-xr-xexamples/tutorials/modelview/2_formatting/main.cpp4
-rwxr-xr-xexamples/tutorials/modelview/3_changingmodel/3_changingmodel.pro1
-rwxr-xr-xexamples/tutorials/modelview/3_changingmodel/main.cpp4
-rwxr-xr-xexamples/tutorials/modelview/4_headers/4_headers.pro1
-rwxr-xr-xexamples/tutorials/modelview/4_headers/main.cpp4
-rwxr-xr-xexamples/tutorials/modelview/5_edit/5_edit.pro1
-rwxr-xr-xexamples/tutorials/modelview/5_edit/main.cpp2
-rwxr-xr-xexamples/tutorials/modelview/5_edit/mainwindow.h2
-rwxr-xr-xexamples/tutorials/modelview/6_treeview/6_treeview.pro1
-rwxr-xr-xexamples/tutorials/modelview/6_treeview/main.cpp2
-rwxr-xr-xexamples/tutorials/modelview/6_treeview/mainwindow.h2
-rwxr-xr-xexamples/tutorials/modelview/7_selections/7_selections.pro1
-rwxr-xr-xexamples/tutorials/modelview/7_selections/main.cpp2
-rwxr-xr-xexamples/tutorials/modelview/7_selections/mainwindow.h2
-rwxr-xr-xexamples/tutorials/modelview/modelview.pro1
-rwxr-xr-xexamples/tutorials/threads/clock/clock.pro1
-rw-r--r--examples/tutorials/threads/clock/clockthread.cpp2
-rwxr-xr-xexamples/tutorials/threads/clock/main.cpp2
-rwxr-xr-xexamples/tutorials/threads/movedobject/movedobject.pro1
-rw-r--r--examples/tutorials/threads/movedobject/thread.cpp3
-rw-r--r--examples/tutorials/threads/threads.pro1
-rw-r--r--examples/tutorials/tutorials.pro1
-rw-r--r--examples/tutorials/widgets/childwidget/childwidget.pro1
-rw-r--r--examples/tutorials/widgets/childwidget/main.cpp2
-rw-r--r--examples/tutorials/widgets/nestedlayouts/main.cpp2
-rw-r--r--examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro1
-rw-r--r--examples/tutorials/widgets/toplevel/main.cpp2
-rw-r--r--examples/tutorials/widgets/toplevel/toplevel.pro1
-rw-r--r--examples/tutorials/widgets/widgets.pro1
-rw-r--r--examples/tutorials/widgets/windowlayout/main.cpp2
-rw-r--r--examples/tutorials/widgets/windowlayout/windowlayout.pro1
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.cpp2
-rw-r--r--examples/uitools/multipleinheritance/multipleinheritance.pro1
-rw-r--r--examples/uitools/textfinder/textfinder.cpp2
-rw-r--r--examples/uitools/textfinder/textfinder.pro1
-rw-r--r--examples/uitools/uitools.pro1
-rw-r--r--examples/webkit/webkit-guide/webkit-guide.pro1
-rw-r--r--examples/widgets/analogclock/analogclock.cpp2
-rw-r--r--examples/widgets/analogclock/analogclock.pro1
-rw-r--r--examples/widgets/applicationicon/applicationicon.pro2
-rw-r--r--examples/widgets/applicationicon/main.cpp4
-rw-r--r--examples/widgets/calculator/button.cpp2
-rw-r--r--examples/widgets/calculator/calculator.cpp2
-rw-r--r--examples/widgets/calculator/calculator.pro1
-rw-r--r--examples/widgets/calendarwidget/calendarwidget.pro1
-rw-r--r--examples/widgets/calendarwidget/main.cpp2
-rw-r--r--examples/widgets/calendarwidget/window.cpp2
-rw-r--r--examples/widgets/charactermap/charactermap.pro1
-rw-r--r--examples/widgets/charactermap/characterwidget.cpp2
-rw-r--r--examples/widgets/charactermap/mainwindow.cpp2
-rw-r--r--examples/widgets/codeeditor/codeeditor.cpp2
-rw-r--r--examples/widgets/codeeditor/codeeditor.pro1
-rw-r--r--examples/widgets/codeeditor/main.cpp2
-rw-r--r--examples/widgets/digitalclock/digitalclock.cpp2
-rw-r--r--examples/widgets/digitalclock/digitalclock.pro1
-rw-r--r--examples/widgets/elidedlabel/elidedlabel.h10
-rw-r--r--examples/widgets/elidedlabel/elidedlabel.pro2
-rw-r--r--examples/widgets/elidedlabel/main.cpp2
-rw-r--r--examples/widgets/elidedlabel/testwidget.cpp8
-rw-r--r--examples/widgets/elidedlabel/testwidget.h8
-rw-r--r--examples/widgets/groupbox/groupbox.pro1
-rw-r--r--examples/widgets/groupbox/window.cpp2
-rw-r--r--examples/widgets/icons/iconpreviewarea.cpp2
-rw-r--r--examples/widgets/icons/icons.pro1
-rw-r--r--examples/widgets/icons/iconsizespinbox.cpp2
-rw-r--r--examples/widgets/icons/imagedelegate.cpp2
-rw-r--r--examples/widgets/icons/mainwindow.cpp2
-rw-r--r--examples/widgets/imageviewer/imageviewer.cpp3
-rw-r--r--examples/widgets/imageviewer/imageviewer.pro1
-rw-r--r--examples/widgets/lineedits/lineedits.pro1
-rw-r--r--examples/widgets/lineedits/window.cpp2
-rw-r--r--examples/widgets/movie/movie.pro1
-rw-r--r--examples/widgets/movie/movieplayer.cpp2
-rw-r--r--examples/widgets/orientation/main.cpp2
-rw-r--r--examples/widgets/orientation/orientation.pro2
-rw-r--r--examples/widgets/scribble/mainwindow.cpp2
-rw-r--r--examples/widgets/scribble/scribble.pro1
-rw-r--r--examples/widgets/scribble/scribblearea.cpp4
-rw-r--r--examples/widgets/shapedclock/shapedclock.cpp2
-rw-r--r--examples/widgets/shapedclock/shapedclock.pro1
-rw-r--r--examples/widgets/sliders/sliders.pro1
-rw-r--r--examples/widgets/sliders/slidersgroup.cpp2
-rw-r--r--examples/widgets/sliders/window.cpp2
-rw-r--r--examples/widgets/softkeys/main.cpp2
-rw-r--r--examples/widgets/softkeys/softkeys.h2
-rw-r--r--examples/widgets/softkeys/softkeys.pro1
-rw-r--r--examples/widgets/spinboxes/spinboxes.pro1
-rw-r--r--examples/widgets/spinboxes/window.cpp2
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.cpp2
-rw-r--r--examples/widgets/styles/styles.pro1
-rw-r--r--examples/widgets/styles/widgetgallery.cpp2
-rw-r--r--examples/widgets/stylesheet/main.cpp2
-rw-r--r--examples/widgets/stylesheet/mainwindow.cpp2
-rw-r--r--examples/widgets/stylesheet/mainwindow.h2
-rw-r--r--examples/widgets/stylesheet/stylesheet.pro1
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.cpp2
-rw-r--r--examples/widgets/tablet/main.cpp2
-rw-r--r--examples/widgets/tablet/mainwindow.cpp2
-rw-r--r--examples/widgets/tablet/tablet.pro1
-rw-r--r--examples/widgets/tablet/tabletapplication.cpp2
-rw-r--r--examples/widgets/tablet/tabletcanvas.cpp2
-rw-r--r--examples/widgets/tetrix/main.cpp2
-rw-r--r--examples/widgets/tetrix/tetrix.pro1
-rw-r--r--examples/widgets/tetrix/tetrixboard.cpp2
-rw-r--r--examples/widgets/tetrix/tetrixwindow.cpp2
-rw-r--r--examples/widgets/tooltips/main.cpp2
-rw-r--r--examples/widgets/tooltips/shapeitem.cpp2
-rw-r--r--examples/widgets/tooltips/sortingbox.cpp2
-rw-r--r--examples/widgets/tooltips/tooltips.pro1
-rw-r--r--examples/widgets/validators/validators.pro1
-rw-r--r--examples/widgets/widgets.pro1
-rw-r--r--examples/widgets/wiggly/dialog.cpp3
-rw-r--r--examples/widgets/wiggly/wiggly.pro2
-rw-r--r--examples/widgets/wiggly/wigglywidget.cpp2
-rw-r--r--examples/widgets/windowflags/controllerwindow.cpp2
-rw-r--r--examples/widgets/windowflags/previewwindow.cpp2
-rw-r--r--examples/widgets/windowflags/windowflags.pro1
-rw-r--r--examples/xml/dombookmarks/dombookmarks.pro2
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp2
-rw-r--r--examples/xml/dombookmarks/xbeltree.cpp2
-rw-r--r--examples/xml/rsslisting/main.cpp2
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp2
-rw-r--r--examples/xml/rsslisting/rsslisting.pro2
-rw-r--r--examples/xml/saxbookmarks/mainwindow.cpp2
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.pro2
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.cpp2
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.cpp2
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp2
-rw-r--r--examples/xml/streambookmarks/streambookmarks.pro2
-rw-r--r--examples/xml/streambookmarks/xbelreader.cpp2
-rw-r--r--examples/xml/streambookmarks/xbelwriter.cpp2
-rw-r--r--examples/xml/xml.pro1
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.pro2
751 files changed, 1584 insertions, 1821 deletions
diff --git a/examples/animation/animatedtiles/animatedtiles.pro b/examples/animation/animatedtiles/animatedtiles.pro
index 1287d8b3d0..791bbf6a22 100644
--- a/examples/animation/animatedtiles/animatedtiles.pro
+++ b/examples/animation/animatedtiles/animatedtiles.pro
@@ -11,4 +11,5 @@ symbian {
TARGET.UID3 = 0xA000D7D1
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/animation/animatedtiles/main.cpp b/examples/animation/animatedtiles/main.cpp
index 46b5d1ddc5..c59c981cb1 100644
--- a/examples/animation/animatedtiles/main.cpp
+++ b/examples/animation/animatedtiles/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtCore/qstate.h>
class Pixmap : public QObject, public QGraphicsPixmapItem
diff --git a/examples/animation/animation.pro b/examples/animation/animation.pro
index e5fa7c4a56..b17aa0e0fe 100644
--- a/examples/animation/animation.pro
+++ b/examples/animation/animation.pro
@@ -14,3 +14,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS animation.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation
INSTALLS += target sources
+QT += widgets
diff --git a/examples/animation/appchooser/appchooser.pro b/examples/animation/appchooser/appchooser.pro
index 958b1710e3..3969b551e9 100644
--- a/examples/animation/appchooser/appchooser.pro
+++ b/examples/animation/appchooser/appchooser.pro
@@ -11,4 +11,5 @@ symbian {
TARGET.UID3 = 0xA000E3F5
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/animation/appchooser/main.cpp b/examples/animation/appchooser/main.cpp
index 3788533aa8..873054ce5f 100644
--- a/examples/animation/appchooser/main.cpp
+++ b/examples/animation/appchooser/main.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
class Pixmap : public QGraphicsWidget
@@ -88,7 +88,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *)
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
diff --git a/examples/animation/easing/animation.h b/examples/animation/easing/animation.h
index f0aef6560b..5f6c425827 100644
--- a/examples/animation/easing/animation.h
+++ b/examples/animation/easing/animation.h
@@ -41,7 +41,7 @@
#ifndef ANIMATION_H
#define ANIMATION_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtCore/qpropertyanimation.h>
diff --git a/examples/animation/easing/easing.pro b/examples/animation/easing/easing.pro
index 0d5eaf4386..b26ce30083 100644
--- a/examples/animation/easing/easing.pro
+++ b/examples/animation/easing/easing.pro
@@ -17,5 +17,6 @@ symbian {
TARGET.UID3 = 0xA000E3F6
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/animation/easing/main.cpp b/examples/animation/easing/main.cpp
index 66a6958cf2..0d63a3136e 100644
--- a/examples/animation/easing/main.cpp
+++ b/examples/animation/easing/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
int main(int argc, char **argv)
diff --git a/examples/animation/easing/window.h b/examples/animation/easing/window.h
index 17899a422e..51fa00d859 100644
--- a/examples/animation/easing/window.h
+++ b/examples/animation/easing/window.h
@@ -38,7 +38,8 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+
#include "ui_form.h"
#include "animation.h"
diff --git a/examples/animation/moveblocks/main.cpp b/examples/animation/moveblocks/main.cpp
index ca1876f95a..24e5f051d7 100644
--- a/examples/animation/moveblocks/main.cpp
+++ b/examples/animation/moveblocks/main.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
//![15]
class StateSwitchEvent: public QEvent
diff --git a/examples/animation/moveblocks/moveblocks.pro b/examples/animation/moveblocks/moveblocks.pro
index ee60e8fcc0..b82370dff6 100644
--- a/examples/animation/moveblocks/moveblocks.pro
+++ b/examples/animation/moveblocks/moveblocks.pro
@@ -10,4 +10,5 @@ symbian {
TARGET.UID3 = 0xA000E3F7
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/animation/states/main.cpp b/examples/animation/states/main.cpp
index d49aa415a7..f37c2bdbbf 100644
--- a/examples/animation/states/main.cpp
+++ b/examples/animation/states/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class Pixmap : public QGraphicsObject
{
@@ -69,7 +69,7 @@ public:
{
}
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *)
{
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
diff --git a/examples/animation/states/states.pro b/examples/animation/states/states.pro
index 24d6976334..5c0d28163b 100644
--- a/examples/animation/states/states.pro
+++ b/examples/animation/states/states.pro
@@ -11,4 +11,5 @@ symbian {
TARGET.UID3 = 0xA000E3F8
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp
index 0f7ce5f1c6..0d422ab1d2 100644
--- a/examples/animation/stickman/graphicsview.cpp
+++ b/examples/animation/stickman/graphicsview.cpp
@@ -42,8 +42,8 @@
#include "stickman.h"
#include <QtGui/QKeyEvent>
-#include <QtGui/QGraphicsScene>
-#include <QtGui/QGraphicsView>
+#include <QtWidgets/QGraphicsScene>
+#include <QtWidgets/QGraphicsView>
GraphicsView::GraphicsView(QWidget *parent) : QGraphicsView(parent), m_editor(0) {}
@@ -54,7 +54,7 @@ void GraphicsView::keyPressEvent(QKeyEvent *e)
emit keyPressed(Qt::Key(e->key()));
}
-void GraphicsView::resizeEvent(QResizeEvent *event)
+void GraphicsView::resizeEvent(QResizeEvent *)
{
fitInView(scene()->sceneRect());
}
diff --git a/examples/animation/stickman/graphicsview.h b/examples/animation/stickman/graphicsview.h
index 400e4a63d4..abd621df43 100644
--- a/examples/animation/stickman/graphicsview.h
+++ b/examples/animation/stickman/graphicsview.h
@@ -41,7 +41,7 @@
#ifndef GRAPHICSVIEW_H
#define GRAPHICSVIEW
-#include <QtGui/QGraphicsView>
+#include <QtWidgets/QGraphicsView>
class MainWindow;
class GraphicsView: public QGraphicsView
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index 8e9dbe1e8b..791b33eb2e 100644
--- a/examples/animation/stickman/lifecycle.cpp
+++ b/examples/animation/stickman/lifecycle.cpp
@@ -45,7 +45,7 @@
#include "graphicsview.h"
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
class KeyPressTransition: public QSignalTransition
{
diff --git a/examples/animation/stickman/main.cpp b/examples/animation/stickman/main.cpp
index 902e572a0e..c5c3eb316b 100644
--- a/examples/animation/stickman/main.cpp
+++ b/examples/animation/stickman/main.cpp
@@ -46,7 +46,7 @@
#include "rectbutton.h"
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char **argv)
{
diff --git a/examples/animation/stickman/rectbutton.cpp b/examples/animation/stickman/rectbutton.cpp
index d45e8abefe..d1bd9e42d1 100644
--- a/examples/animation/stickman/rectbutton.cpp
+++ b/examples/animation/stickman/rectbutton.cpp
@@ -51,7 +51,7 @@ RectButton::~RectButton()
}
-void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *event)
+void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *)
{
emit clicked();
}
@@ -63,7 +63,7 @@ QRectF RectButton::boundingRect() const
}
-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);
diff --git a/examples/animation/stickman/stickman.pro b/examples/animation/stickman/stickman.pro
index ba31265055..340a502c90 100644
--- a/examples/animation/stickman/stickman.pro
+++ b/examples/animation/stickman/stickman.pro
@@ -24,4 +24,5 @@ symbian {
TARGET.UID3 = 0xA000E3F9
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/animation/sub-attaq/boat_p.h b/examples/animation/sub-attaq/boat_p.h
index 9022a4ca51..4141671eb0 100644
--- a/examples/animation/sub-attaq/boat_p.h
+++ b/examples/animation/sub-attaq/boat_p.h
@@ -58,7 +58,7 @@
#include "graphicsscene.h"
// Qt
-#include <QtGui/QKeyEventTransition>
+#include <QtWidgets/QKeyEventTransition>
static const int MAX_BOMB = 5;
diff --git a/examples/animation/sub-attaq/graphicsscene.cpp b/examples/animation/sub-attaq/graphicsscene.cpp
index f82d441068..d274ca3bde 100644
--- a/examples/animation/sub-attaq/graphicsscene.cpp
+++ b/examples/animation/sub-attaq/graphicsscene.cpp
@@ -59,12 +59,12 @@
#include <QtCore/QStateMachine>
#include <QtCore/QFinalState>
#include <QtCore/QPauseAnimation>
-#include <QtGui/QAction>
+#include <QtWidgets/QAction>
#include <QtCore/QDir>
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
-#include <QtGui/QGraphicsView>
-#include <QtGui/QGraphicsSceneMouseEvent>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QGraphicsView>
+#include <QtWidgets/QGraphicsSceneMouseEvent>
#include <QtCore/QXmlStreamReader>
GraphicsScene::GraphicsScene(int x, int y, int width, int height, Mode mode)
diff --git a/examples/animation/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h
index e1220a5eb8..198b27101f 100644
--- a/examples/animation/sub-attaq/graphicsscene.h
+++ b/examples/animation/sub-attaq/graphicsscene.h
@@ -43,7 +43,7 @@
#define __GRAPHICSSCENE__H__
//Qt
-#include <QtGui/QGraphicsScene>
+#include <QtWidgets/QGraphicsScene>
#include <QtCore/QSet>
#include <QtCore/QState>
diff --git a/examples/animation/sub-attaq/main.cpp b/examples/animation/sub-attaq/main.cpp
index c8e534e7e7..6fdc47ca20 100644
--- a/examples/animation/sub-attaq/main.cpp
+++ b/examples/animation/sub-attaq/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/animation/sub-attaq/mainwindow.h b/examples/animation/sub-attaq/mainwindow.h
index 933587a262..0514776b75 100644
--- a/examples/animation/sub-attaq/mainwindow.h
+++ b/examples/animation/sub-attaq/mainwindow.h
@@ -43,7 +43,7 @@
#define __MAINWINDOW__H__
//Qt
-#include <QtGui/QMainWindow>
+#include <QtWidgets/QMainWindow>
class GraphicsScene;
QT_BEGIN_NAMESPACE
class QGraphicsView;
diff --git a/examples/animation/sub-attaq/pixmapitem.h b/examples/animation/sub-attaq/pixmapitem.h
index 0a94aab7eb..f6fced9e97 100644
--- a/examples/animation/sub-attaq/pixmapitem.h
+++ b/examples/animation/sub-attaq/pixmapitem.h
@@ -46,7 +46,7 @@
#include "graphicsscene.h"
//Qt
-#include <QtGui/QGraphicsObject>
+#include <QtWidgets/QGraphicsObject>
class PixmapItem : public QGraphicsObject
{
diff --git a/examples/animation/sub-attaq/progressitem.h b/examples/animation/sub-attaq/progressitem.h
index bcf708c512..9a8a575111 100644
--- a/examples/animation/sub-attaq/progressitem.h
+++ b/examples/animation/sub-attaq/progressitem.h
@@ -43,7 +43,7 @@
#define PROGRESSITEM_H
//Qt
-#include <QtGui/QGraphicsTextItem>
+#include <QtWidgets/QGraphicsTextItem>
class ProgressItem : public QGraphicsTextItem
{
diff --git a/examples/animation/sub-attaq/states.cpp b/examples/animation/sub-attaq/states.cpp
index 462e13b90e..db50938016 100644
--- a/examples/animation/sub-attaq/states.cpp
+++ b/examples/animation/sub-attaq/states.cpp
@@ -50,10 +50,10 @@
#include "textinformationitem.h"
//Qt
-#include <QtGui/QMessageBox>
-#include <QtGui/QGraphicsView>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QGraphicsView>
#include <QtCore/QStateMachine>
-#include <QtGui/QKeyEventTransition>
+#include <QtWidgets/QKeyEventTransition>
#include <QtCore/QFinalState>
PlayState::PlayState(GraphicsScene *scene, QState *parent)
diff --git a/examples/animation/sub-attaq/states.h b/examples/animation/sub-attaq/states.h
index cda9603196..4f322cbd57 100644
--- a/examples/animation/sub-attaq/states.h
+++ b/examples/animation/sub-attaq/states.h
@@ -46,7 +46,7 @@
#include <QtCore/QState>
#include <QtCore/QSignalTransition>
#include <QtCore/QPropertyAnimation>
-#include <QtGui/QKeyEventTransition>
+#include <QtWidgets/QKeyEventTransition>
#include <QtCore/QSet>
class GraphicsScene;
diff --git a/examples/animation/sub-attaq/sub-attaq.pro b/examples/animation/sub-attaq/sub-attaq.pro
index ff3040490c..e994694b54 100644
--- a/examples/animation/sub-attaq/sub-attaq.pro
+++ b/examples/animation/sub-attaq/sub-attaq.pro
@@ -1,4 +1,4 @@
-contains(QT_CONFIG, opengl):QT += opengl
+contains(QT_CONFIG, opengl):QT += opengl widgets
HEADERS += boat.h \
bomb.h \
mainwindow.h \
diff --git a/examples/animation/sub-attaq/submarine.h b/examples/animation/sub-attaq/submarine.h
index 0d6087dc26..852b63de36 100644
--- a/examples/animation/sub-attaq/submarine.h
+++ b/examples/animation/sub-attaq/submarine.h
@@ -43,7 +43,7 @@
#define __SUBMARINE__H__
//Qt
-#include <QtGui/QGraphicsTransform>
+#include <QtWidgets/QGraphicsTransform>
#include "pixmapitem.h"
diff --git a/examples/animation/sub-attaq/submarine_p.h b/examples/animation/sub-attaq/submarine_p.h
index f0b370d878..eb81c6604b 100644
--- a/examples/animation/sub-attaq/submarine_p.h
+++ b/examples/animation/sub-attaq/submarine_p.h
@@ -60,7 +60,7 @@
//Qt
#include <QtCore/QPropertyAnimation>
-#include <QtGui/QGraphicsScene>
+#include <QtWidgets/QGraphicsScene>
//This state is describing when the boat is moving right
class MovementState : public QAnimationState
diff --git a/examples/animation/sub-attaq/textinformationitem.h b/examples/animation/sub-attaq/textinformationitem.h
index 4b5f71969f..1c62c8597e 100644
--- a/examples/animation/sub-attaq/textinformationitem.h
+++ b/examples/animation/sub-attaq/textinformationitem.h
@@ -43,7 +43,7 @@
#define TEXTINFORMATIONITEM_H
//Qt
-#include <QtGui/QGraphicsTextItem>
+#include <QtWidgets/QGraphicsTextItem>
class TextInformationItem : public QGraphicsTextItem
{
diff --git a/examples/dbus/complexpingpong/complexpingpong.pro b/examples/dbus/complexpingpong/complexpingpong.pro
index cd618d549d..1dfeff92ac 100644
--- a/examples/dbus/complexpingpong/complexpingpong.pro
+++ b/examples/dbus/complexpingpong/complexpingpong.pro
@@ -2,3 +2,4 @@ TEMPLATE = subdirs
CONFIG += ordered
win32:CONFIG += console
SUBDIRS = complexping.pro complexpong.pro
+QT += widgets
diff --git a/examples/dbus/dbus-chat/chat.cpp b/examples/dbus/dbus-chat/chat.cpp
index 5cc12caafa..33ba0f7a3a 100644
--- a/examples/dbus/dbus-chat/chat.cpp
+++ b/examples/dbus/dbus-chat/chat.cpp
@@ -39,8 +39,8 @@
****************************************************************************/
#include "chat.h"
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
#include "chat_adaptor.h"
#include "chat_interface.h"
diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro
index ae2b7fee5d..3009045e78 100644
--- a/examples/dbus/dbus-chat/dbus-chat.pro
+++ b/examples/dbus/dbus-chat/dbus-chat.pro
@@ -18,6 +18,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/chat
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro
index 0ac20ad165..b3c05597d4 100644
--- a/examples/dbus/dbus.pro
+++ b/examples/dbus/dbus.pro
@@ -15,4 +15,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/dbus/pingpong/pingpong.pro b/examples/dbus/pingpong/pingpong.pro
index 07fca74c9a..701e778676 100644
--- a/examples/dbus/pingpong/pingpong.pro
+++ b/examples/dbus/pingpong/pingpong.pro
@@ -2,3 +2,4 @@ TEMPLATE = subdirs
CONFIG += ordered
win32:CONFIG += console
SUBDIRS = ping.pro pong.pro
+QT += widgets
diff --git a/examples/dbus/remotecontrolledcar/car/car.cpp b/examples/dbus/remotecontrolledcar/car/car.cpp
index 50f8f24d3e..d42db25d10 100644
--- a/examples/dbus/remotecontrolledcar/car/car.cpp
+++ b/examples/dbus/remotecontrolledcar/car/car.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include "car.h"
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
#include <math.h>
static const double Pi = 3.14159265358979323846264338327950288419717;
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro
index b7f232f7a2..7ae919ceca 100644
--- a/examples/dbus/remotecontrolledcar/car/car.pro
+++ b/examples/dbus/remotecontrolledcar/car/car.pro
@@ -19,6 +19,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/car
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp
index 342a2b0c5d..df68f6125b 100644
--- a/examples/dbus/remotecontrolledcar/car/main.cpp
+++ b/examples/dbus/remotecontrolledcar/car/main.cpp
@@ -40,9 +40,9 @@
#include "car.h"
#include "car_adaptor.h"
-#include <QtGui/QApplication>
-#include <QtGui/QGraphicsView>
-#include <QtGui/QGraphicsScene>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QGraphicsView>
+#include <QtWidgets/QGraphicsScene>
#include <QtDBus/QDBusConnection>
int main(int argc, char *argv[])
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp
index 8691aafa92..1303d9e218 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "controller.h"
#include "car_interface.h"
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
index 5edf1a006f..5e8a82e8a0 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.pro
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -20,6 +20,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/controlle
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/dbus/remotecontrolledcar/controller/main.cpp b/examples/dbus/remotecontrolledcar/controller/main.cpp
index 5b536117c8..c91edd3056 100644
--- a/examples/dbus/remotecontrolledcar/controller/main.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtDBus>
#include "controller.h"
diff --git a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
index eec736d74f..2959170c89 100644
--- a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
+++ b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
@@ -8,4 +8,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/desktop/desktop.pro b/examples/desktop/desktop.pro
index 3333578451..02d3ec8888 100644
--- a/examples/desktop/desktop.pro
+++ b/examples/desktop/desktop.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/desktop
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/desktop/screenshot/screenshot.cpp b/examples/desktop/screenshot/screenshot.cpp
index 0d7a18842a..683682ae52 100644
--- a/examples/desktop/screenshot/screenshot.cpp
+++ b/examples/desktop/screenshot/screenshot.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "screenshot.h"
diff --git a/examples/desktop/screenshot/screenshot.pro b/examples/desktop/screenshot/screenshot.pro
index d86f038152..1402ad42b9 100644
--- a/examples/desktop/screenshot/screenshot.pro
+++ b/examples/desktop/screenshot/screenshot.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/desktop/screenshot
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
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)
diff --git a/examples/dialogs/classwizard/classwizard.cpp b/examples/dialogs/classwizard/classwizard.cpp
index 5247d7e2ae..64039ae44f 100644
--- a/examples/dialogs/classwizard/classwizard.cpp
+++ b/examples/dialogs/classwizard/classwizard.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "classwizard.h"
diff --git a/examples/dialogs/classwizard/classwizard.pro b/examples/dialogs/classwizard/classwizard.pro
index 09cdce2b4c..6dd1cac37c 100644
--- a/examples/dialogs/classwizard/classwizard.pro
+++ b/examples/dialogs/classwizard/classwizard.pro
@@ -10,6 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/classwizard
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
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)
diff --git a/examples/dialogs/configdialog/configdialog.cpp b/examples/dialogs/configdialog/configdialog.cpp
index 0e1de0c61c..d0f071440d 100644
--- a/examples/dialogs/configdialog/configdialog.cpp
+++ b/examples/dialogs/configdialog/configdialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "configdialog.h"
#include "pages.h"
diff --git a/examples/dialogs/configdialog/configdialog.pro b/examples/dialogs/configdialog/configdialog.pro
index 1a7e9fccf8..51a7f457d7 100644
--- a/examples/dialogs/configdialog/configdialog.pro
+++ b/examples/dialogs/configdialog/configdialog.pro
@@ -14,6 +14,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+QT += widgets
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)
diff --git a/examples/dialogs/configdialog/pages.cpp b/examples/dialogs/configdialog/pages.cpp
index f69ec53f83..84949dd075 100644
--- a/examples/dialogs/configdialog/pages.cpp
+++ b/examples/dialogs/configdialog/pages.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "pages.h"
diff --git a/examples/dialogs/dialogs.pro b/examples/dialogs/dialogs.pro
index 5bdac5a63d..47444c10f1 100644
--- a/examples/dialogs/dialogs.pro
+++ b/examples/dialogs/dialogs.pro
@@ -17,4 +17,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/dialogs/extension/extension.pro b/examples/dialogs/extension/extension.pro
index db57fc8361..5511f37150 100644
--- a/examples/dialogs/extension/extension.pro
+++ b/examples/dialogs/extension/extension.pro
@@ -9,5 +9,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/extension
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/dialogs/extension/finddialog.cpp b/examples/dialogs/extension/finddialog.cpp
index 2ce0391d3c..0e797edf81 100644
--- a/examples/dialogs/extension/finddialog.cpp
+++ b/examples/dialogs/extension/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
diff --git a/examples/dialogs/findfiles/findfiles.pro b/examples/dialogs/findfiles/findfiles.pro
index 865fb8e0ba..c19d47e271 100644
--- a/examples/dialogs/findfiles/findfiles.pro
+++ b/examples/dialogs/findfiles/findfiles.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/findfiles
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/dialogs/findfiles/window.cpp b/examples/dialogs/findfiles/window.cpp
index f700e82d5e..d2ffd0988e 100644
--- a/examples/dialogs/findfiles/window.cpp
+++ b/examples/dialogs/findfiles/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/dialogs/licensewizard/licensewizard.cpp b/examples/dialogs/licensewizard/licensewizard.cpp
index 19a0c069e4..1c9587161b 100644
--- a/examples/dialogs/licensewizard/licensewizard.cpp
+++ b/examples/dialogs/licensewizard/licensewizard.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "licensewizard.h"
@@ -350,10 +352,12 @@ void ConclusionPage::setVisible(bool visible)
void ConclusionPage::printButtonClicked()
{
+#ifndef QT_NO_PRINTER
QPrinter printer;
QPrintDialog dialog(&printer, this);
if (dialog.exec())
QMessageBox::warning(this, tr("Print License"),
tr("As an environmentally friendly measure, the "
"license text will not actually be printed."));
+#endif
}
diff --git a/examples/dialogs/licensewizard/licensewizard.pro b/examples/dialogs/licensewizard/licensewizard.pro
index 4c43e7ae91..20b533644e 100644
--- a/examples/dialogs/licensewizard/licensewizard.pro
+++ b/examples/dialogs/licensewizard/licensewizard.pro
@@ -10,6 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/licensewizard
INSTALLS += target sources
symbian: CONFIG += qt_example
+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)
diff --git a/examples/dialogs/sipdialog/dialog.cpp b/examples/dialogs/sipdialog/dialog.cpp
index c6d5a1767f..3dd37e368b 100644
--- a/examples/dialogs/sipdialog/dialog.cpp
+++ b/examples/dialogs/sipdialog/dialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "dialog.h"
diff --git a/examples/dialogs/sipdialog/main.cpp b/examples/dialogs/sipdialog/main.cpp
index bd37e33960..aa1151c0a9 100644
--- a/examples/dialogs/sipdialog/main.cpp
+++ b/examples/dialogs/sipdialog/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "dialog.h"
diff --git a/examples/dialogs/sipdialog/sipdialog.pro b/examples/dialogs/sipdialog/sipdialog.pro
index 989e63734a..cea038ede3 100644
--- a/examples/dialogs/sipdialog/sipdialog.pro
+++ b/examples/dialogs/sipdialog/sipdialog.pro
@@ -11,6 +11,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+QT += widgets
+
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)
diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp
index a59b3c5ef7..28fdaaad80 100644
--- a/examples/dialogs/standarddialogs/dialog.cpp
+++ b/examples/dialogs/standarddialogs/dialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "dialog.h"
diff --git a/examples/dialogs/standarddialogs/standarddialogs.pro b/examples/dialogs/standarddialogs/standarddialogs.pro
index c9fb4a3a5e..59cd79f413 100644
--- a/examples/dialogs/standarddialogs/standarddialogs.pro
+++ b/examples/dialogs/standarddialogs/standarddialogs.pro
@@ -11,4 +11,5 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/dialogs/tabdialog/tabdialog.cpp b/examples/dialogs/tabdialog/tabdialog.cpp
index 5d4d345a0c..e38946a8ff 100644
--- a/examples/dialogs/tabdialog/tabdialog.cpp
+++ b/examples/dialogs/tabdialog/tabdialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "tabdialog.h"
diff --git a/examples/dialogs/tabdialog/tabdialog.pro b/examples/dialogs/tabdialog/tabdialog.pro
index 54c95a6bec..4e01a68b96 100644
--- a/examples/dialogs/tabdialog/tabdialog.pro
+++ b/examples/dialogs/tabdialog/tabdialog.pro
@@ -10,6 +10,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+QT += widgets
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)
diff --git a/examples/dialogs/trivialwizard/trivialwizard.cpp b/examples/dialogs/trivialwizard/trivialwizard.cpp
index 3dbc039b62..df7d4e6559 100644
--- a/examples/dialogs/trivialwizard/trivialwizard.cpp
+++ b/examples/dialogs/trivialwizard/trivialwizard.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QTranslator>
#include <QLocale>
#include <QLibraryInfo>
diff --git a/examples/dialogs/trivialwizard/trivialwizard.pro b/examples/dialogs/trivialwizard/trivialwizard.pro
index 0321ac8fdb..b2a285e95a 100644
--- a/examples/dialogs/trivialwizard/trivialwizard.pro
+++ b/examples/dialogs/trivialwizard/trivialwizard.pro
@@ -7,6 +7,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/trivialwizard
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/draganddrop/draganddrop.pro b/examples/draganddrop/draganddrop.pro
index 8f737f1918..6759520ddc 100644
--- a/examples/draganddrop/draganddrop.pro
+++ b/examples/draganddrop/draganddrop.pro
@@ -11,3 +11,4 @@ symbian: SUBDIRS -= dropsite
sources.files = README *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop
INSTALLS += sources
+QT += widgets
diff --git a/examples/draganddrop/draggableicons/draggableicons.pro b/examples/draganddrop/draggableicons/draggableicons.pro
index 36e14b5800..792de0a73c 100644
--- a/examples/draganddrop/draggableicons/draggableicons.pro
+++ b/examples/draganddrop/draggableicons/draggableicons.pro
@@ -13,4 +13,5 @@ symbian {
TARGET.UID3 = 0xA000C615
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/draganddrop/draggableicons/dragwidget.cpp b/examples/draganddrop/draggableicons/dragwidget.cpp
index 46bfff9330..e465e8ada5 100644
--- a/examples/draganddrop/draggableicons/dragwidget.cpp
+++ b/examples/draganddrop/draggableicons/dragwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "dragwidget.h"
diff --git a/examples/draganddrop/draggabletext/draggabletext.pro b/examples/draganddrop/draggabletext/draggabletext.pro
index 0bc3dd154b..38c20663a2 100644
--- a/examples/draganddrop/draggabletext/draggabletext.pro
+++ b/examples/draganddrop/draggabletext/draggabletext.pro
@@ -15,5 +15,6 @@ symbian {
TARGET.UID3 = 0xA000CF64
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/draganddrop/draggabletext/draglabel.cpp b/examples/draganddrop/draggabletext/draglabel.cpp
index dff09da14f..9eb5dfac0b 100644
--- a/examples/draganddrop/draggabletext/draglabel.cpp
+++ b/examples/draganddrop/draggabletext/draglabel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "draglabel.h"
diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp
index 060d41de2d..5287c998a3 100644
--- a/examples/draganddrop/draggabletext/dragwidget.cpp
+++ b/examples/draganddrop/draggabletext/dragwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "draglabel.h"
#include "dragwidget.h"
diff --git a/examples/draganddrop/dropsite/droparea.cpp b/examples/draganddrop/dropsite/droparea.cpp
index 2a83de888e..c3cac7bf45 100644
--- a/examples/draganddrop/dropsite/droparea.cpp
+++ b/examples/draganddrop/dropsite/droparea.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "droparea.h"
diff --git a/examples/draganddrop/dropsite/dropsite.pro b/examples/draganddrop/dropsite/dropsite.pro
index b3be1b64cb..c725992f26 100644
--- a/examples/draganddrop/dropsite/dropsite.pro
+++ b/examples/draganddrop/dropsite/dropsite.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/dropsite
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
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)
diff --git a/examples/draganddrop/dropsite/dropsitewindow.cpp b/examples/draganddrop/dropsite/dropsitewindow.cpp
index db7d6e3566..191470207e 100644
--- a/examples/draganddrop/dropsite/dropsitewindow.cpp
+++ b/examples/draganddrop/dropsite/dropsitewindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "droparea.h"
#include "dropsitewindow.h"
diff --git a/examples/draganddrop/fridgemagnets/draglabel.cpp b/examples/draganddrop/fridgemagnets/draglabel.cpp
index 986f0b28c8..dd5ddb57d9 100644
--- a/examples/draganddrop/fridgemagnets/draglabel.cpp
+++ b/examples/draganddrop/fridgemagnets/draglabel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "draglabel.h"
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp
index 19abfb6976..3dcd406174 100644
--- a/examples/draganddrop/fridgemagnets/dragwidget.cpp
+++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "draglabel.h"
#include "dragwidget.h"
diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.pro b/examples/draganddrop/fridgemagnets/fridgemagnets.pro
index 9a34a5c29c..481fffd5fe 100644
--- a/examples/draganddrop/fridgemagnets/fridgemagnets.pro
+++ b/examples/draganddrop/fridgemagnets/fridgemagnets.pro
@@ -16,4 +16,6 @@ symbian {
CONFIG += qt_example
}
+QT += widgets
+
maemo5: CONFIG += qt_example
diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp
index 09fcaf7c59..c00892a098 100644
--- a/examples/draganddrop/puzzle/mainwindow.cpp
+++ b/examples/draganddrop/puzzle/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <stdlib.h>
#include "mainwindow.h"
diff --git a/examples/draganddrop/puzzle/pieceslist.cpp b/examples/draganddrop/puzzle/pieceslist.cpp
index 5eb4984146..181cd56427 100644
--- a/examples/draganddrop/puzzle/pieceslist.cpp
+++ b/examples/draganddrop/puzzle/pieceslist.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "pieceslist.h"
diff --git a/examples/draganddrop/puzzle/puzzle.pro b/examples/draganddrop/puzzle/puzzle.pro
index fa8ad81b2a..d084827a45 100644
--- a/examples/draganddrop/puzzle/puzzle.pro
+++ b/examples/draganddrop/puzzle/puzzle.pro
@@ -27,4 +27,5 @@ wince*: {
addFile.path = .
DEPLOYMENT += addFile
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/draganddrop/puzzle/puzzlewidget.cpp b/examples/draganddrop/puzzle/puzzlewidget.cpp
index e83f248112..cee2596a61 100644
--- a/examples/draganddrop/puzzle/puzzlewidget.cpp
+++ b/examples/draganddrop/puzzle/puzzlewidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "puzzlewidget.h"
diff --git a/examples/effects/blurpicker/blurpicker.cpp b/examples/effects/blurpicker/blurpicker.cpp
index 362ec43931..5883c741be 100644
--- a/examples/effects/blurpicker/blurpicker.cpp
+++ b/examples/effects/blurpicker/blurpicker.cpp
@@ -40,7 +40,7 @@
#include "blurpicker.h"
-#include <QtGui>
+#include <QtWidgets>
#include "blureffect.h"
diff --git a/examples/effects/blurpicker/blurpicker.pro b/examples/effects/blurpicker/blurpicker.pro
index 913dd10306..ca651b8858 100644
--- a/examples/effects/blurpicker/blurpicker.pro
+++ b/examples/effects/blurpicker/blurpicker.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/blurpicker
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS blurpicker.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/blurpicker
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/effects/effects.pro b/examples/effects/effects.pro
index 4b13387902..db7b8a723e 100644
--- a/examples/effects/effects.pro
+++ b/examples/effects/effects.pro
@@ -11,3 +11,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS effects.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects
INSTALLS += target sources
+QT += widgets
diff --git a/examples/effects/fademessage/fademessage.cpp b/examples/effects/fademessage/fademessage.cpp
index 158f0491bc..b6e94e5e2e 100644
--- a/examples/effects/fademessage/fademessage.cpp
+++ b/examples/effects/fademessage/fademessage.cpp
@@ -40,7 +40,7 @@
#include "fademessage.h"
-#include <QtGui>
+#include <QtWidgets>
FadeMessage::FadeMessage(QWidget *parent): QGraphicsView(parent)
{
diff --git a/examples/effects/fademessage/fademessage.pro b/examples/effects/fademessage/fademessage.pro
index 78a4ac652f..261bee42f9 100644
--- a/examples/effects/fademessage/fademessage.pro
+++ b/examples/effects/fademessage/fademessage.pro
@@ -15,4 +15,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/fademessage
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
+QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/effects/lighting/lighting.cpp b/examples/effects/lighting/lighting.cpp
index bd23a2d21a..4532fafe25 100644
--- a/examples/effects/lighting/lighting.cpp
+++ b/examples/effects/lighting/lighting.cpp
@@ -40,7 +40,7 @@
#include "lighting.h"
-#include <QtGui>
+#include <QtWidgets>
#ifndef M_PI
#define M_PI 3.14159265358979323846
diff --git a/examples/effects/lighting/lighting.pro b/examples/effects/lighting/lighting.pro
index 1dbb3ee289..1876a7b3af 100644
--- a/examples/effects/lighting/lighting.pro
+++ b/examples/effects/lighting/lighting.pro
@@ -6,6 +6,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/lighting
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS lighting.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/lighting
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/embedded/digiflip/digiflip.cpp b/examples/embedded/digiflip/digiflip.cpp
index 895524355e..38501d3ecc 100644
--- a/examples/embedded/digiflip/digiflip.cpp
+++ b/examples/embedded/digiflip/digiflip.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
class Digits: public QWidget
{
diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro
index 0063c0038a..8670fcb3a5 100644
--- a/examples/embedded/embedded.pro
+++ b/examples/embedded/embedded.pro
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded
INSTALLS += sources
symbian: CONFIG += qt_demo
+QT += widgets widgets
diff --git a/examples/embedded/flickable/flickable.cpp b/examples/embedded/flickable/flickable.cpp
index edcc1a7396..0c707a172b 100644
--- a/examples/embedded/flickable/flickable.cpp
+++ b/examples/embedded/flickable/flickable.cpp
@@ -42,7 +42,7 @@
#include "flickable.h"
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
class FlickableTicker: QObject
{
diff --git a/examples/embedded/flickable/flickable.pro b/examples/embedded/flickable/flickable.pro
index e90e64f89f..d31e7eba14 100644
--- a/examples/embedded/flickable/flickable.pro
+++ b/examples/embedded/flickable/flickable.pro
@@ -10,3 +10,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable
INSTALLS += target sources
+QT += widgets widgets
diff --git a/examples/embedded/flickable/main.cpp b/examples/embedded/flickable/main.cpp
index 3711a6dc57..5ecc0c10df 100644
--- a/examples/embedded/flickable/main.cpp
+++ b/examples/embedded/flickable/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#include "flickable.h"
diff --git a/examples/embedded/flightinfo/flightinfo.cpp b/examples/embedded/flightinfo/flightinfo.cpp
index 58e71c8376..592357cab4 100644
--- a/examples/embedded/flightinfo/flightinfo.cpp
+++ b/examples/embedded/flightinfo/flightinfo.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "ui_form.h"
diff --git a/examples/embedded/flightinfo/flightinfo.pro b/examples/embedded/flightinfo/flightinfo.pro
index 9fce741b9c..89a7265d41 100644
--- a/examples/embedded/flightinfo/flightinfo.pro
+++ b/examples/embedded/flightinfo/flightinfo.pro
@@ -3,7 +3,7 @@ TARGET = flightinfo
SOURCES = flightinfo.cpp
FORMS += form.ui
RESOURCES = flightinfo.qrc
-QT += network
+QT += network widgets
symbian {
TARGET.UID3 = 0xA000CF74
diff --git a/examples/embedded/lightmaps/lightmaps.cpp b/examples/embedded/lightmaps/lightmaps.cpp
index d672530e19..2489ddc840 100644
--- a/examples/embedded/lightmaps/lightmaps.cpp
+++ b/examples/embedded/lightmaps/lightmaps.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include <math.h>
diff --git a/examples/embedded/lightmaps/lightmaps.pro b/examples/embedded/lightmaps/lightmaps.pro
index 7622f88511..1f638b5398 100644
--- a/examples/embedded/lightmaps/lightmaps.pro
+++ b/examples/embedded/lightmaps/lightmaps.pro
@@ -6,7 +6,7 @@ SOURCES = lightmaps.cpp \
main.cpp \
mapzoom.cpp \
slippymap.cpp
-QT += network
+QT += network widgets
symbian {
TARGET.UID3 = 0xA000CF75
diff --git a/examples/embedded/lightmaps/mapzoom.cpp b/examples/embedded/lightmaps/mapzoom.cpp
index d01457e3f4..225c54c2a6 100644
--- a/examples/embedded/lightmaps/mapzoom.cpp
+++ b/examples/embedded/lightmaps/mapzoom.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "lightmaps.h"
#include "mapzoom.h"
diff --git a/examples/embedded/lightmaps/slippymap.cpp b/examples/embedded/lightmaps/slippymap.cpp
index 8c71f2946a..e2a2eaa0bc 100644
--- a/examples/embedded/lightmaps/slippymap.cpp
+++ b/examples/embedded/lightmaps/slippymap.cpp
@@ -41,7 +41,7 @@
#include <math.h>
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "slippymap.h"
diff --git a/examples/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp
index d404044a9a..0a50fb0419 100644
--- a/examples/embedded/raycasting/raycasting.cpp
+++ b/examples/embedded/raycasting/raycasting.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/embedded/raycasting/raycasting.pro b/examples/embedded/raycasting/raycasting.pro
index 83103a5aad..181eadf74c 100644
--- a/examples/embedded/raycasting/raycasting.pro
+++ b/examples/embedded/raycasting/raycasting.pro
@@ -11,3 +11,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting
INSTALLS += target sources
+QT += widgets widgets
diff --git a/examples/embedded/styleexample/styleexample.pro b/examples/embedded/styleexample/styleexample.pro
index 70942fd444..5b1273e6aa 100644
--- a/examples/embedded/styleexample/styleexample.pro
+++ b/examples/embedded/styleexample/styleexample.pro
@@ -15,3 +15,4 @@ symbian {
TARGET.UID3 = 0xA000A63F
CONFIG += qt_example
}
+QT += widgets widgets
diff --git a/examples/examples.pro b/examples/examples.pro
index 3abcf22af7..23271ebe53 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,3 +1,5 @@
+Qt += widgets
+
TEMPLATE = subdirs
SUBDIRS = \
network \
@@ -44,16 +46,13 @@ symbian: SUBDIRS = \
gestures \
xml
-!contains(QT_CONFIG, no-gui):contains(QT_CONFIG, multimedia) {
- SUBDIRS += multimedia
-}
+qpa:SUBDIRS += qpa
wince*|symbian|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded
embedded:SUBDIRS += qws
contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):SUBDIRS += qtestlib
contains(QT_CONFIG, opengl): SUBDIRS += opengl
-contains(QT_CONFIG, openvg): SUBDIRS += openvg
contains(QT_CONFIG, dbus): SUBDIRS += dbus
contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
contains(QT_CONFIG, concurrent): SUBDIRS += qtconcurrent
@@ -64,4 +63,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/gestures/gestures.pro b/examples/gestures/gestures.pro
index 1e9e2270f3..b354ec4645 100644
--- a/examples/gestures/gestures.pro
+++ b/examples/gestures/gestures.pro
@@ -8,3 +8,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/gestures
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS gestures.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/gestures
INSTALLS += target sources
+QT += widgets
diff --git a/examples/gestures/imagegestures/imagegestures.pro b/examples/gestures/imagegestures/imagegestures.pro
index 64810b0aeb..03fd2e8ff3 100644
--- a/examples/gestures/imagegestures/imagegestures.pro
+++ b/examples/gestures/imagegestures/imagegestures.pro
@@ -19,6 +19,7 @@ symbian {
TARGET.UID3 = 0xA000D7D0
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
maemo5: warning(This example does not work on Maemo platform)
diff --git a/examples/gestures/imagegestures/imagewidget.cpp b/examples/gestures/imagegestures/imagewidget.cpp
index 8bbb96563e..e12cb41363 100644
--- a/examples/gestures/imagegestures/imagewidget.cpp
+++ b/examples/gestures/imagegestures/imagewidget.cpp
@@ -41,7 +41,7 @@
#include "imagewidget.h"
-#include <QtGui>
+#include <QtWidgets>
//! [constructor]
ImageWidget::ImageWidget(QWidget *parent)
diff --git a/examples/gestures/imagegestures/imagewidget.h b/examples/gestures/imagegestures/imagewidget.h
index fff24fbcdf..1ee7d02224 100644
--- a/examples/gestures/imagegestures/imagewidget.h
+++ b/examples/gestures/imagegestures/imagewidget.h
@@ -43,7 +43,7 @@
#include <QWidget>
#include <QImage>
-#include <QtGui>
+#include <QtWidgets>
QT_BEGIN_NAMESPACE
class QGestureEvent;
diff --git a/examples/gestures/imagegestures/main.cpp b/examples/gestures/imagegestures/main.cpp
index ca37a733f7..4097a2fb31 100644
--- a/examples/gestures/imagegestures/main.cpp
+++ b/examples/gestures/imagegestures/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwidget.h"
diff --git a/examples/graphicsview/anchorlayout/anchorlayout.pro b/examples/graphicsview/anchorlayout/anchorlayout.pro
index b4a75653e0..abe55f2ef6 100644
--- a/examples/graphicsview/anchorlayout/anchorlayout.pro
+++ b/examples/graphicsview/anchorlayout/anchorlayout.pro
@@ -7,6 +7,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/anchorlayout
INSTALLS += target sources
TARGET = anchorlayout
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp
index dbe9f19880..f9f93fb961 100644
--- a/examples/graphicsview/anchorlayout/main.cpp
+++ b/examples/graphicsview/anchorlayout/main.cpp
@@ -41,7 +41,7 @@
#include <QGraphicsWidget>
#include <QGraphicsProxyWidget>
#include <QGraphicsAnchorLayout>
-#include <QtGui>
+#include <QtWidgets>
static QGraphicsProxyWidget *createItem(const QSizeF &minimum = QSizeF(100.0, 100.0),
const QSizeF &preferred = QSize(150.0, 100.0),
diff --git a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
index 32c94ca8c9..88fa8182ab 100644
--- a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
+++ b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
@@ -15,5 +15,6 @@ symbian {
TARGET.UID3 = 0xA000A645
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.h b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
index 448e9bac3f..3d83d4cd88 100644
--- a/examples/graphicsview/basicgraphicslayouts/layoutitem.h
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
@@ -40,7 +40,7 @@
#ifndef LAYOUTITEM_H
#define LAYOUTITEM_H
-#include <QtGui>
+#include <QtWidgets>
//! [0]
class LayoutItem : public QGraphicsLayoutItem, public QGraphicsItem
diff --git a/examples/graphicsview/basicgraphicslayouts/main.cpp b/examples/graphicsview/basicgraphicslayouts/main.cpp
index 11da1838f3..4a9e8f91b4 100644
--- a/examples/graphicsview/basicgraphicslayouts/main.cpp
+++ b/examples/graphicsview/basicgraphicslayouts/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/graphicsview/basicgraphicslayouts/window.h b/examples/graphicsview/basicgraphicslayouts/window.h
index b2166f0552..4efa1ecd3a 100644
--- a/examples/graphicsview/basicgraphicslayouts/window.h
+++ b/examples/graphicsview/basicgraphicslayouts/window.h
@@ -41,7 +41,7 @@
#ifndef WINDOW_H
#define WINDOW_H
-#include <QtGui/QGraphicsWidget>
+#include <QtWidgets/QGraphicsWidget>
//! [0]
class Window : public QGraphicsWidget {
diff --git a/examples/graphicsview/boxes/boxes.pro b/examples/graphicsview/boxes/boxes.pro
index 49de5a9e50..176bc3a1cf 100644
--- a/examples/graphicsview/boxes/boxes.pro
+++ b/examples/graphicsview/boxes/boxes.pro
@@ -27,7 +27,7 @@ SOURCES += 3rdparty/fbm.c \
RESOURCES += boxes.qrc
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/boxes
diff --git a/examples/graphicsview/boxes/glbuffers.h b/examples/graphicsview/boxes/glbuffers.h
index 6b18d3f128..1a53fa2c1a 100644
--- a/examples/graphicsview/boxes/glbuffers.h
+++ b/examples/graphicsview/boxes/glbuffers.h
@@ -45,7 +45,7 @@
//#include <GL/glew.h>
#include "glextensions.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#define BUFFER_OFFSET(i) ((char*)0 + (i))
diff --git a/examples/graphicsview/boxes/gltrianglemesh.h b/examples/graphicsview/boxes/gltrianglemesh.h
index ecf6531d85..f023938b7b 100644
--- a/examples/graphicsview/boxes/gltrianglemesh.h
+++ b/examples/graphicsview/boxes/gltrianglemesh.h
@@ -45,7 +45,7 @@
//#include <GL/glew.h>
#include "glextensions.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include "glbuffers.h"
diff --git a/examples/graphicsview/boxes/main.cpp b/examples/graphicsview/boxes/main.cpp
index 483170801f..e7dced71d2 100644
--- a/examples/graphicsview/boxes/main.cpp
+++ b/examples/graphicsview/boxes/main.cpp
@@ -44,7 +44,7 @@
#include "scene.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QGLWidget>
class GraphicsView : public QGraphicsView
diff --git a/examples/graphicsview/boxes/qtbox.h b/examples/graphicsview/boxes/qtbox.h
index 56b86a55bb..81ef8ae7d5 100644
--- a/examples/graphicsview/boxes/qtbox.h
+++ b/examples/graphicsview/boxes/qtbox.h
@@ -42,7 +42,7 @@
#ifndef QTBOX_H
#define QTBOX_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtGui/qvector3d.h>
#include "glbuffers.h"
diff --git a/examples/graphicsview/boxes/roundedbox.h b/examples/graphicsview/boxes/roundedbox.h
index 54dda82000..e4e7c589d3 100644
--- a/examples/graphicsview/boxes/roundedbox.h
+++ b/examples/graphicsview/boxes/roundedbox.h
@@ -45,7 +45,7 @@
//#include <GL/glew.h>
#include "glextensions.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include "gltrianglemesh.h"
diff --git a/examples/graphicsview/boxes/scene.h b/examples/graphicsview/boxes/scene.h
index 96ee908d58..357f955bb6 100644
--- a/examples/graphicsview/boxes/scene.h
+++ b/examples/graphicsview/boxes/scene.h
@@ -45,7 +45,7 @@
//#include <GL/glew.h>
#include "glextensions.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include "roundedbox.h"
diff --git a/examples/graphicsview/boxes/trackball.h b/examples/graphicsview/boxes/trackball.h
index 097851a42c..cc3d5ade34 100644
--- a/examples/graphicsview/boxes/trackball.h
+++ b/examples/graphicsview/boxes/trackball.h
@@ -42,7 +42,7 @@
#ifndef TRACKBALL_H
#define TRACKBALL_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtGui/qvector3d.h>
#include <QtGui/qquaternion.h>
diff --git a/examples/graphicsview/chip/chip.cpp b/examples/graphicsview/chip/chip.cpp
index 21b63bae2c..b47069b20c 100644
--- a/examples/graphicsview/chip/chip.cpp
+++ b/examples/graphicsview/chip/chip.cpp
@@ -41,7 +41,7 @@
#include "chip.h"
-#include <QtGui>
+#include <QtWidgets>
Chip::Chip(const QColor &color, int x, int y)
{
diff --git a/examples/graphicsview/chip/chip.h b/examples/graphicsview/chip/chip.h
index ff9f636843..460969451b 100644
--- a/examples/graphicsview/chip/chip.h
+++ b/examples/graphicsview/chip/chip.h
@@ -43,7 +43,7 @@
#define CHIP_H
#include <QtGui/QColor>
-#include <QtGui/QGraphicsItem>
+#include <QtWidgets/QGraphicsItem>
class Chip : public QGraphicsItem
{
diff --git a/examples/graphicsview/chip/chip.pro b/examples/graphicsview/chip/chip.pro
index aff551ef9f..5bf1b88164 100644
--- a/examples/graphicsview/chip/chip.pro
+++ b/examples/graphicsview/chip/chip.pro
@@ -4,6 +4,7 @@ HEADERS += mainwindow.h view.h chip.h
SOURCES += main.cpp
SOURCES += mainwindow.cpp view.cpp chip.cpp
+QT += widgets printsupport
contains(QT_CONFIG, opengl):QT += opengl
build_all:!build_pass {
diff --git a/examples/graphicsview/chip/mainwindow.cpp b/examples/graphicsview/chip/mainwindow.cpp
index 41117c3d47..a8f4675c13 100644
--- a/examples/graphicsview/chip/mainwindow.cpp
+++ b/examples/graphicsview/chip/mainwindow.cpp
@@ -43,7 +43,7 @@
#include "view.h"
#include "chip.h"
-#include <QtGui>
+#include <QtWidgets>
MainWindow::MainWindow(QWidget *parent)
: QWidget(parent)
diff --git a/examples/graphicsview/chip/mainwindow.h b/examples/graphicsview/chip/mainwindow.h
index 650e1f1f3c..a5ea9402d7 100644
--- a/examples/graphicsview/chip/mainwindow.h
+++ b/examples/graphicsview/chip/mainwindow.h
@@ -42,7 +42,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
QT_FORWARD_DECLARE_CLASS(QGraphicsScene)
QT_FORWARD_DECLARE_CLASS(QGraphicsView)
diff --git a/examples/graphicsview/chip/view.cpp b/examples/graphicsview/chip/view.cpp
index 5634f85d98..072dafaed4 100644
--- a/examples/graphicsview/chip/view.cpp
+++ b/examples/graphicsview/chip/view.cpp
@@ -41,7 +41,10 @@
#include "view.h"
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
#endif
diff --git a/examples/graphicsview/collidingmice/collidingmice.pro b/examples/graphicsview/collidingmice/collidingmice.pro
index 05971c5f6d..1c1c2683cf 100644
--- a/examples/graphicsview/collidingmice/collidingmice.pro
+++ b/examples/graphicsview/collidingmice/collidingmice.pro
@@ -17,5 +17,6 @@ symbian {
TARGET.UID3 = 0xA000A643
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/collidingmice/main.cpp b/examples/graphicsview/collidingmice/main.cpp
index 43594029fa..561887995e 100644
--- a/examples/graphicsview/collidingmice/main.cpp
+++ b/examples/graphicsview/collidingmice/main.cpp
@@ -40,7 +40,7 @@
#include "mouse.h"
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/graphicsview/diagramscene/arrow.cpp b/examples/graphicsview/diagramscene/arrow.cpp
index 188928d1d8..34142ff71b 100644
--- a/examples/graphicsview/diagramscene/arrow.cpp
+++ b/examples/graphicsview/diagramscene/arrow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "arrow.h"
#include <math.h>
diff --git a/examples/graphicsview/diagramscene/diagramitem.cpp b/examples/graphicsview/diagramscene/diagramitem.cpp
index cd7ce0c6e1..31c9627f9a 100644
--- a/examples/graphicsview/diagramscene/diagramitem.cpp
+++ b/examples/graphicsview/diagramscene/diagramitem.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "diagramitem.h"
#include "arrow.h"
diff --git a/examples/graphicsview/diagramscene/diagramscene.cpp b/examples/graphicsview/diagramscene/diagramscene.cpp
index 7592224db7..4ce5c68841 100644
--- a/examples/graphicsview/diagramscene/diagramscene.cpp
+++ b/examples/graphicsview/diagramscene/diagramscene.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "diagramscene.h"
#include "arrow.h"
diff --git a/examples/graphicsview/diagramscene/diagramscene.pro b/examples/graphicsview/diagramscene/diagramscene.pro
index 0703365d07..99cd4dea78 100644
--- a/examples/graphicsview/diagramscene/diagramscene.pro
+++ b/examples/graphicsview/diagramscene/diagramscene.pro
@@ -21,6 +21,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
+QT += widgets
symbian: warning(This example might not fully work on Symbian platform)
maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/diagramscene/diagramtextitem.cpp b/examples/graphicsview/diagramscene/diagramtextitem.cpp
index 588603eda5..f8858f1f51 100644
--- a/examples/graphicsview/diagramscene/diagramtextitem.cpp
+++ b/examples/graphicsview/diagramscene/diagramtextitem.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "diagramtextitem.h"
#include "diagramscene.h"
diff --git a/examples/graphicsview/diagramscene/main.cpp b/examples/graphicsview/diagramscene/main.cpp
index fcd027cb44..bab04ef1aa 100644
--- a/examples/graphicsview/diagramscene/main.cpp
+++ b/examples/graphicsview/diagramscene/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp
index 87eb33e7ee..edf7d3c3f3 100644
--- a/examples/graphicsview/diagramscene/mainwindow.cpp
+++ b/examples/graphicsview/diagramscene/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QLabel>
#include "mainwindow.h"
diff --git a/examples/graphicsview/dragdroprobot/coloritem.cpp b/examples/graphicsview/dragdroprobot/coloritem.cpp
index 81e8f5607b..24b8491a6b 100644
--- a/examples/graphicsview/dragdroprobot/coloritem.cpp
+++ b/examples/graphicsview/dragdroprobot/coloritem.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "coloritem.h"
diff --git a/examples/graphicsview/dragdroprobot/dragdroprobot.pro b/examples/graphicsview/dragdroprobot/dragdroprobot.pro
index 0fe241dbd2..db5d94a600 100644
--- a/examples/graphicsview/dragdroprobot/dragdroprobot.pro
+++ b/examples/graphicsview/dragdroprobot/dragdroprobot.pro
@@ -18,6 +18,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/dragdroprobot
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp
index c8b84ecb97..9b6f95c7a2 100644
--- a/examples/graphicsview/dragdroprobot/main.cpp
+++ b/examples/graphicsview/dragdroprobot/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "coloritem.h"
#include "robot.h"
@@ -53,7 +53,7 @@ public:
}
protected:
- virtual void resizeEvent(QResizeEvent *event)
+ virtual void resizeEvent(QResizeEvent *)
{
#if defined(Q_OS_SYMBIAN)
fitInView(sceneRect(), Qt::KeepAspectRatio);
diff --git a/examples/graphicsview/dragdroprobot/robot.cpp b/examples/graphicsview/dragdroprobot/robot.cpp
index 9494e7af7f..df585a948f 100644
--- a/examples/graphicsview/dragdroprobot/robot.cpp
+++ b/examples/graphicsview/dragdroprobot/robot.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "robot.h"
diff --git a/examples/graphicsview/elasticnodes/elasticnodes.pro b/examples/graphicsview/elasticnodes/elasticnodes.pro
index 965d824c7f..6b591a8c66 100644
--- a/examples/graphicsview/elasticnodes/elasticnodes.pro
+++ b/examples/graphicsview/elasticnodes/elasticnodes.pro
@@ -21,6 +21,7 @@ symbian {
TARGET.UID3 = 0xA000A642
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/elasticnodes/graphwidget.cpp b/examples/graphicsview/elasticnodes/graphwidget.cpp
index f6bf05de31..48a9784c54 100644
--- a/examples/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/graphicsview/elasticnodes/graphwidget.cpp
@@ -42,7 +42,7 @@
#include "edge.h"
#include "node.h"
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/graphicsview/elasticnodes/graphwidget.h b/examples/graphicsview/elasticnodes/graphwidget.h
index 524ef67b8a..354967bdd2 100644
--- a/examples/graphicsview/elasticnodes/graphwidget.h
+++ b/examples/graphicsview/elasticnodes/graphwidget.h
@@ -41,7 +41,7 @@
#ifndef GRAPHWIDGET_H
#define GRAPHWIDGET_H
-#include <QtGui/QGraphicsView>
+#include <QtWidgets/QGraphicsView>
class Node;
diff --git a/examples/graphicsview/elasticnodes/main.cpp b/examples/graphicsview/elasticnodes/main.cpp
index d653da5355..9eb8ba11be 100644
--- a/examples/graphicsview/elasticnodes/main.cpp
+++ b/examples/graphicsview/elasticnodes/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "graphwidget.h"
diff --git a/examples/graphicsview/embeddeddialogs/customproxy.cpp b/examples/graphicsview/embeddeddialogs/customproxy.cpp
index cbc622a34f..13f5f654c2 100644
--- a/examples/graphicsview/embeddeddialogs/customproxy.cpp
+++ b/examples/graphicsview/embeddeddialogs/customproxy.cpp
@@ -41,7 +41,7 @@
#include "customproxy.h"
-#include <QtGui>
+#include <QtWidgets>
CustomProxy::CustomProxy(QGraphicsItem *parent, Qt::WindowFlags wFlags)
: QGraphicsProxyWidget(parent, wFlags), popupShown(false), currentPopup(0)
diff --git a/examples/graphicsview/embeddeddialogs/customproxy.h b/examples/graphicsview/embeddeddialogs/customproxy.h
index 1ceaa06bb3..0ac7c7afe4 100644
--- a/examples/graphicsview/embeddeddialogs/customproxy.h
+++ b/examples/graphicsview/embeddeddialogs/customproxy.h
@@ -43,7 +43,7 @@
#define CUSTOMPROXY_H
#include <QtCore/qtimeline.h>
-#include <QtGui/qgraphicsproxywidget.h>
+#include <QtWidgets/qgraphicsproxywidget.h>
class CustomProxy : public QGraphicsProxyWidget
{
diff --git a/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp b/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp
index f932307925..f608fc5558 100644
--- a/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp
+++ b/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp
@@ -42,7 +42,7 @@
#include "embeddeddialog.h"
#include "ui_embeddeddialog.h"
-#include <QtGui>
+#include <QtWidgets>
EmbeddedDialog::EmbeddedDialog(QWidget *parent)
: QDialog(parent)
diff --git a/examples/graphicsview/embeddeddialogs/embeddeddialog.h b/examples/graphicsview/embeddeddialogs/embeddeddialog.h
index b7f8da085e..1c7051fac9 100644
--- a/examples/graphicsview/embeddeddialogs/embeddeddialog.h
+++ b/examples/graphicsview/embeddeddialogs/embeddeddialog.h
@@ -42,7 +42,7 @@
#ifndef EMBEDDEDDIALOG_H
#define EMBEDDEDDIALOG_H
-#include <QtGui/qdialog.h>
+#include <QtWidgets/qdialog.h>
QT_FORWARD_DECLARE_CLASS(Ui_embeddedDialog);
diff --git a/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro b/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro
index 31386063f6..1f4ef91946 100644
--- a/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro
+++ b/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro
@@ -16,4 +16,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.png *.jpg *.plist *.ic
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/embeddeddialogs
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
diff --git a/examples/graphicsview/embeddeddialogs/main.cpp b/examples/graphicsview/embeddeddialogs/main.cpp
index e5defb1471..0dc61a4930 100644
--- a/examples/graphicsview/embeddeddialogs/main.cpp
+++ b/examples/graphicsview/embeddeddialogs/main.cpp
@@ -42,7 +42,7 @@
#include "customproxy.h"
#include "embeddeddialog.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/graphicsview/flowlayout/flowlayout.cpp b/examples/graphicsview/flowlayout/flowlayout.cpp
index 0531e4cce5..cb0ca1b2de 100644
--- a/examples/graphicsview/flowlayout/flowlayout.cpp
+++ b/examples/graphicsview/flowlayout/flowlayout.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include "flowlayout.h"
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include <QtCore/qmath.h>
FlowLayout::FlowLayout()
diff --git a/examples/graphicsview/flowlayout/flowlayout.h b/examples/graphicsview/flowlayout/flowlayout.h
index aff3382c01..67c3315736 100644
--- a/examples/graphicsview/flowlayout/flowlayout.h
+++ b/examples/graphicsview/flowlayout/flowlayout.h
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/qgraphicslayout.h>
+#include <QtWidgets/qgraphicslayout.h>
class FlowLayout : public QGraphicsLayout
{
diff --git a/examples/graphicsview/flowlayout/flowlayout.pro b/examples/graphicsview/flowlayout/flowlayout.pro
index 5a79a9bae9..f8d1e4871f 100644
--- a/examples/graphicsview/flowlayout/flowlayout.pro
+++ b/examples/graphicsview/flowlayout/flowlayout.pro
@@ -7,6 +7,7 @@ QMAKE_PROJECT_NAME = flowlayout_graphicsview
# Input
HEADERS += flowlayout.h window.h
SOURCES += flowlayout.cpp main.cpp window.cpp
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/graphicsview/flowlayout/main.cpp b/examples/graphicsview/flowlayout/main.cpp
index cc5eeb6175..8f5a0faede 100644
--- a/examples/graphicsview/flowlayout/main.cpp
+++ b/examples/graphicsview/flowlayout/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
int main(int argc, char **argv)
diff --git a/examples/graphicsview/flowlayout/window.cpp b/examples/graphicsview/flowlayout/window.cpp
index 4abe2a55c2..35bd931d39 100644
--- a/examples/graphicsview/flowlayout/window.cpp
+++ b/examples/graphicsview/flowlayout/window.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/qgraphicsproxywidget.h>
-#include <QtGui/qlabel.h>
+#include <QtWidgets/qgraphicsproxywidget.h>
+#include <QtWidgets/qlabel.h>
#include "flowlayout.h"
#include "window.h"
diff --git a/examples/graphicsview/flowlayout/window.h b/examples/graphicsview/flowlayout/window.h
index c338a14236..7697d70842 100644
--- a/examples/graphicsview/flowlayout/window.h
+++ b/examples/graphicsview/flowlayout/window.h
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/qgraphicswidget.h>
+#include <QtWidgets/qgraphicswidget.h>
class Window : public QGraphicsWidget {
Q_OBJECT
diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro
index 190c48a596..a9aeb0d17f 100644
--- a/examples/graphicsview/graphicsview.pro
+++ b/examples/graphicsview/graphicsview.pro
@@ -28,4 +28,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/graphicsview/padnavigator/flippablepad.cpp b/examples/graphicsview/padnavigator/flippablepad.cpp
index ada44dad8f..78f8281afd 100644
--- a/examples/graphicsview/padnavigator/flippablepad.cpp
+++ b/examples/graphicsview/padnavigator/flippablepad.cpp
@@ -40,7 +40,7 @@
#include "flippablepad.h"
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
//! [0]
static QRectF boundsFromSize(const QSize &size)
diff --git a/examples/graphicsview/padnavigator/main.cpp b/examples/graphicsview/padnavigator/main.cpp
index d7d2f56305..9a397c783a 100644
--- a/examples/graphicsview/padnavigator/main.cpp
+++ b/examples/graphicsview/padnavigator/main.cpp
@@ -40,7 +40,7 @@
#include "padnavigator.h"
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
//! [0]
int main(int argc, char *argv[])
diff --git a/examples/graphicsview/padnavigator/padnavigator.cpp b/examples/graphicsview/padnavigator/padnavigator.cpp
index 3e57dcfbe6..b714ebfb71 100644
--- a/examples/graphicsview/padnavigator/padnavigator.cpp
+++ b/examples/graphicsview/padnavigator/padnavigator.cpp
@@ -42,7 +42,7 @@
#include "padnavigator.h"
#include "splashitem.h"
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
#ifndef QT_NO_OPENGL
#include <QtOpenGL/QtOpenGL>
#endif
diff --git a/examples/graphicsview/padnavigator/padnavigator.pro b/examples/graphicsview/padnavigator/padnavigator.pro
index 5c05e48221..f0287f1f86 100644
--- a/examples/graphicsview/padnavigator/padnavigator.pro
+++ b/examples/graphicsview/padnavigator/padnavigator.pro
@@ -16,7 +16,7 @@ RESOURCES += \
FORMS += \
form.ui
-contains(QT_CONFIG, opengl):QT += opengl
+contains(QT_CONFIG, opengl):QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/padnavigator
diff --git a/examples/graphicsview/padnavigator/roundrectitem.cpp b/examples/graphicsview/padnavigator/roundrectitem.cpp
index 643770f4c6..0103de47fe 100644
--- a/examples/graphicsview/padnavigator/roundrectitem.cpp
+++ b/examples/graphicsview/padnavigator/roundrectitem.cpp
@@ -40,7 +40,7 @@
#include "roundrectitem.h"
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
//! [0]
RoundRectItem::RoundRectItem(const QRectF &bounds, const QColor &color,
diff --git a/examples/graphicsview/padnavigator/splashitem.cpp b/examples/graphicsview/padnavigator/splashitem.cpp
index 8cedcd6e60..ee3b38c1a9 100644
--- a/examples/graphicsview/padnavigator/splashitem.cpp
+++ b/examples/graphicsview/padnavigator/splashitem.cpp
@@ -40,7 +40,7 @@
#include "splashitem.h"
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
//! [0]
SplashItem::SplashItem(QGraphicsItem *parent)
diff --git a/examples/graphicsview/simpleanchorlayout/main.cpp b/examples/graphicsview/simpleanchorlayout/main.cpp
index cba37d9fb7..ff1ac2ba59 100644
--- a/examples/graphicsview/simpleanchorlayout/main.cpp
+++ b/examples/graphicsview/simpleanchorlayout/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class Widget : public QGraphicsWidget
{
diff --git a/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro b/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
index 26f4c82ff3..80cc3a1a24 100644
--- a/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
+++ b/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
@@ -7,6 +7,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/simpleanchorlayout
INSTALLS += target sources
TARGET = simpleanchorlayout
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
index 81138c4a1b..5f1dfd38e1 100644
--- a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
+++ b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
@@ -12,6 +12,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES weatheranchorlayout.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/weatheranchorlayout
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro
index a9dd9c172e..3c07ce9af8 100644
--- a/examples/ipc/ipc.pro
+++ b/examples/ipc/ipc.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp
index 86cc0cc005..2884fac7a7 100644
--- a/examples/ipc/localfortuneclient/client.cpp
+++ b/examples/ipc/localfortuneclient/client.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "client.h"
diff --git a/examples/ipc/localfortuneclient/localfortuneclient.pro b/examples/ipc/localfortuneclient/localfortuneclient.pro
index 295c942400..bace9574cf 100644
--- a/examples/ipc/localfortuneclient/localfortuneclient.pro
+++ b/examples/ipc/localfortuneclient/localfortuneclient.pro
@@ -1,7 +1,7 @@
HEADERS = client.h
SOURCES = client.cpp \
main.cpp
-QT += network
+QT += network widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneclient
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.pro b/examples/ipc/localfortuneserver/localfortuneserver.pro
index 55857cf56e..4c55f3b11d 100644
--- a/examples/ipc/localfortuneserver/localfortuneserver.pro
+++ b/examples/ipc/localfortuneserver/localfortuneserver.pro
@@ -1,7 +1,7 @@
HEADERS = server.h
SOURCES = server.cpp \
main.cpp
-QT += network
+QT += network widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneserver
diff --git a/examples/ipc/localfortuneserver/server.cpp b/examples/ipc/localfortuneserver/server.cpp
index 08dd31d81e..e68e5de457 100644
--- a/examples/ipc/localfortuneserver/server.cpp
+++ b/examples/ipc/localfortuneserver/server.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include <stdlib.h>
diff --git a/examples/ipc/sharedmemory/sharedmemory.pro b/examples/ipc/sharedmemory/sharedmemory.pro
index 9202cb7b7a..7c5b5dcd29 100644
--- a/examples/ipc/sharedmemory/sharedmemory.pro
+++ b/examples/ipc/sharedmemory/sharedmemory.pro
@@ -13,6 +13,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/sharedmemory
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/itemviews/addressbook/adddialog.cpp b/examples/itemviews/addressbook/adddialog.cpp
index 551e729f9b..c5baddd1ea 100644
--- a/examples/itemviews/addressbook/adddialog.cpp
+++ b/examples/itemviews/addressbook/adddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "adddialog.h"
//! [0]
diff --git a/examples/itemviews/addressbook/addressbook.pro b/examples/itemviews/addressbook/addressbook.pro
index 4f182c25aa..5eeb601d55 100644
--- a/examples/itemviews/addressbook/addressbook.pro
+++ b/examples/itemviews/addressbook/addressbook.pro
@@ -20,5 +20,6 @@ symbian {
TARGET.UID3 = 0xA000A646
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp
index 40b71f13fd..d9d3f46fed 100644
--- a/examples/itemviews/addressbook/addresswidget.cpp
+++ b/examples/itemviews/addressbook/addresswidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addresswidget.h"
#include "adddialog.h"
diff --git a/examples/itemviews/addressbook/main.cpp b/examples/itemviews/addressbook/main.cpp
index 76efb01979..2c01aec78b 100644
--- a/examples/itemviews/addressbook/main.cpp
+++ b/examples/itemviews/addressbook/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
//! [0]
diff --git a/examples/itemviews/addressbook/mainwindow.cpp b/examples/itemviews/addressbook/mainwindow.cpp
index 336da30d30..0a08b726bb 100644
--- a/examples/itemviews/addressbook/mainwindow.cpp
+++ b/examples/itemviews/addressbook/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
//! [0]
diff --git a/examples/itemviews/addressbook/mainwindow.h b/examples/itemviews/addressbook/mainwindow.h
index 0134c032bd..4f925dd1e4 100644
--- a/examples/itemviews/addressbook/mainwindow.h
+++ b/examples/itemviews/addressbook/mainwindow.h
@@ -41,7 +41,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui>
+#include <QtWidgets>
#include "addresswidget.h"
//! [0]
diff --git a/examples/itemviews/addressbook/newaddresstab.cpp b/examples/itemviews/addressbook/newaddresstab.cpp
index f3622604ab..3a720f6cb4 100644
--- a/examples/itemviews/addressbook/newaddresstab.cpp
+++ b/examples/itemviews/addressbook/newaddresstab.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "newaddresstab.h"
#include "adddialog.h"
diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
index 9bc0e93a02..a317f44282 100644
--- a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
+++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
@@ -10,4 +10,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/basicsortfiltermodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/basicsortfiltermodel/main.cpp b/examples/itemviews/basicsortfiltermodel/main.cpp
index 750a19e55a..003f6a45f8 100644
--- a/examples/itemviews/basicsortfiltermodel/main.cpp
+++ b/examples/itemviews/basicsortfiltermodel/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp
index f95c9cc48a..9fcd363002 100644
--- a/examples/itemviews/basicsortfiltermodel/window.cpp
+++ b/examples/itemviews/basicsortfiltermodel/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/itemviews/chart/chart.pro b/examples/itemviews/chart/chart.pro
index 75dd621a0d..34d69957c9 100644
--- a/examples/itemviews/chart/chart.pro
+++ b/examples/itemviews/chart/chart.pro
@@ -18,5 +18,6 @@ symbian {
TARGET.UID3 = 0xA000A647
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/chart/mainwindow.cpp b/examples/itemviews/chart/mainwindow.cpp
index df6f01abc2..b98057e2e3 100644
--- a/examples/itemviews/chart/mainwindow.cpp
+++ b/examples/itemviews/chart/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "pieview.h"
#include "mainwindow.h"
diff --git a/examples/itemviews/chart/pieview.cpp b/examples/itemviews/chart/pieview.cpp
index 75c47ac5e9..ff6306e9ea 100644
--- a/examples/itemviews/chart/pieview.cpp
+++ b/examples/itemviews/chart/pieview.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <math.h>
-#include <QtGui>
+#include <QtWidgets>
#ifndef M_PI
#define M_PI 3.1415927
diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
index 2b150b43b3..387efd59aa 100644
--- a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
+++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/coloreditorfactory
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/itemviews/coloreditorfactory/colorlisteditor.cpp b/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
index d8ce45b5ab..ee540c603c 100644
--- a/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
+++ b/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "colorlisteditor.h"
diff --git a/examples/itemviews/coloreditorfactory/main.cpp b/examples/itemviews/coloreditorfactory/main.cpp
index 8b7eff429e..7690ba9c1d 100644
--- a/examples/itemviews/coloreditorfactory/main.cpp
+++ b/examples/itemviews/coloreditorfactory/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/itemviews/coloreditorfactory/window.cpp b/examples/itemviews/coloreditorfactory/window.cpp
index f234af1367..aa7e9377b5 100644
--- a/examples/itemviews/coloreditorfactory/window.cpp
+++ b/examples/itemviews/coloreditorfactory/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
#include "colorlisteditor.h"
diff --git a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
index 0f64715ba8..46fce72ec9 100644
--- a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
+++ b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/combowidgetmapper
sources.files = $$SOURCES $$HEADERS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/combowidgetmapper
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/combowidgetmapper/window.cpp b/examples/itemviews/combowidgetmapper/window.cpp
index 667fc4b8d2..8721a6a8e6 100644
--- a/examples/itemviews/combowidgetmapper/window.cpp
+++ b/examples/itemviews/combowidgetmapper/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
//! [Set up widgets]
diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
index 40cc2237a7..05087f9dda 100644
--- a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
+++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
@@ -12,4 +12,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/customsortfiltermodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/customsortfiltermodel/main.cpp b/examples/itemviews/customsortfiltermodel/main.cpp
index 4154dbf1f9..e643062ac0 100644
--- a/examples/itemviews/customsortfiltermodel/main.cpp
+++ b/examples/itemviews/customsortfiltermodel/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
index 7e91444997..358546350c 100644
--- a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
+++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mysortfilterproxymodel.h"
diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp
index 51fdcb705e..323eef98ce 100644
--- a/examples/itemviews/customsortfiltermodel/window.cpp
+++ b/examples/itemviews/customsortfiltermodel/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mysortfilterproxymodel.h"
#include "window.h"
diff --git a/examples/itemviews/dirview/dirview.pro b/examples/itemviews/dirview/dirview.pro
index 21a84b3ec4..2401ee91dc 100644
--- a/examples/itemviews/dirview/dirview.pro
+++ b/examples/itemviews/dirview/dirview.pro
@@ -7,4 +7,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/dirview
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/dirview/main.cpp b/examples/itemviews/dirview/main.cpp
index 3500d7bef8..c15040902c 100644
--- a/examples/itemviews/dirview/main.cpp
+++ b/examples/itemviews/dirview/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.pro b/examples/itemviews/editabletreemodel/editabletreemodel.pro
index 7f4223feca..e844994896 100644
--- a/examples/itemviews/editabletreemodel/editabletreemodel.pro
+++ b/examples/itemviews/editabletreemodel/editabletreemodel.pro
@@ -16,4 +16,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/editabletreemodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/editabletreemodel/main.cpp b/examples/itemviews/editabletreemodel/main.cpp
index d8b3b9bcf8..c499bb7454 100644
--- a/examples/itemviews/editabletreemodel/main.cpp
+++ b/examples/itemviews/editabletreemodel/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/itemviews/editabletreemodel/mainwindow.cpp b/examples/itemviews/editabletreemodel/mainwindow.cpp
index 486a9ad1c6..a6a294e71c 100644
--- a/examples/itemviews/editabletreemodel/mainwindow.cpp
+++ b/examples/itemviews/editabletreemodel/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "treemodel.h"
diff --git a/examples/itemviews/editabletreemodel/treemodel.cpp b/examples/itemviews/editabletreemodel/treemodel.cpp
index 8b44438623..34168137fa 100644
--- a/examples/itemviews/editabletreemodel/treemodel.cpp
+++ b/examples/itemviews/editabletreemodel/treemodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "treeitem.h"
#include "treemodel.h"
diff --git a/examples/itemviews/fetchmore/fetchmore.pro b/examples/itemviews/fetchmore/fetchmore.pro
index c9f3fe3746..848a12f3c6 100644
--- a/examples/itemviews/fetchmore/fetchmore.pro
+++ b/examples/itemviews/fetchmore/fetchmore.pro
@@ -10,5 +10,6 @@ sources.files = $$SOURCES $$HEADERS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/fetchmore
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/fetchmore/window.cpp b/examples/itemviews/fetchmore/window.cpp
index 29dbf12b21..676a4ae1a8 100644
--- a/examples/itemviews/fetchmore/window.cpp
+++ b/examples/itemviews/fetchmore/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "filelistmodel.h"
#include "window.h"
diff --git a/examples/itemviews/frozencolumn/freezetablewidget.cpp b/examples/itemviews/frozencolumn/freezetablewidget.cpp
index 357d387321..f76575a86d 100644
--- a/examples/itemviews/frozencolumn/freezetablewidget.cpp
+++ b/examples/itemviews/frozencolumn/freezetablewidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "freezetablewidget.h"
diff --git a/examples/itemviews/frozencolumn/frozencolumn.pro b/examples/itemviews/frozencolumn/frozencolumn.pro
index f16489b7aa..79eedf787a 100644
--- a/examples/itemviews/frozencolumn/frozencolumn.pro
+++ b/examples/itemviews/frozencolumn/frozencolumn.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/frozencolumn
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/frozencolumn
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/interview/interview.pro b/examples/itemviews/interview/interview.pro
index f479dc4f09..fec3ec1168 100644
--- a/examples/itemviews/interview/interview.pro
+++ b/examples/itemviews/interview/interview.pro
@@ -16,4 +16,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES README *.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/interview
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
diff --git a/examples/itemviews/itemviews.pro b/examples/itemviews/itemviews.pro
index 1d5da705d4..3048aa18d6 100644
--- a/examples/itemviews/itemviews.pro
+++ b/examples/itemviews/itemviews.pro
@@ -23,4 +23,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/pixelator/imagemodel.cpp b/examples/itemviews/pixelator/imagemodel.cpp
index abf92ddef5..d0e315978b 100644
--- a/examples/itemviews/pixelator/imagemodel.cpp
+++ b/examples/itemviews/pixelator/imagemodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "imagemodel.h"
diff --git a/examples/itemviews/pixelator/mainwindow.cpp b/examples/itemviews/pixelator/mainwindow.cpp
index 62c6830313..15bd60e1b4 100644
--- a/examples/itemviews/pixelator/mainwindow.cpp
+++ b/examples/itemviews/pixelator/mainwindow.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "imagemodel.h"
#include "mainwindow.h"
diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro
index 2464a3e506..91a78aa1f5 100644
--- a/examples/itemviews/pixelator/pixelator.pro
+++ b/examples/itemviews/pixelator/pixelator.pro
@@ -14,4 +14,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/pixelator
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets printsupport
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/pixelator/pixeldelegate.cpp b/examples/itemviews/pixelator/pixeldelegate.cpp
index 2c026e1a98..2260553cbb 100644
--- a/examples/itemviews/pixelator/pixeldelegate.cpp
+++ b/examples/itemviews/pixelator/pixeldelegate.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "pixeldelegate.h"
diff --git a/examples/itemviews/puzzle/mainwindow.cpp b/examples/itemviews/puzzle/mainwindow.cpp
index 6fd5d63987..9787512cb4 100644
--- a/examples/itemviews/puzzle/mainwindow.cpp
+++ b/examples/itemviews/puzzle/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <stdlib.h>
#include "mainwindow.h"
diff --git a/examples/itemviews/puzzle/piecesmodel.cpp b/examples/itemviews/puzzle/piecesmodel.cpp
index 520b571f0a..4c53648210 100644
--- a/examples/itemviews/puzzle/piecesmodel.cpp
+++ b/examples/itemviews/puzzle/piecesmodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "piecesmodel.h"
diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro
index c867a50750..2f15daf7ca 100644
--- a/examples/itemviews/puzzle/puzzle.pro
+++ b/examples/itemviews/puzzle/puzzle.pro
@@ -19,5 +19,6 @@ wince* {
DEPLOYMENT_PLUGIN += qjpeg qgif qtiff
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/puzzle/puzzlewidget.cpp b/examples/itemviews/puzzle/puzzlewidget.cpp
index 261e0080a2..604c73d8f0 100644
--- a/examples/itemviews/puzzle/puzzlewidget.cpp
+++ b/examples/itemviews/puzzle/puzzlewidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "puzzlewidget.h"
diff --git a/examples/itemviews/simpledommodel/dommodel.cpp b/examples/itemviews/simpledommodel/dommodel.cpp
index 7a5e9ca5c0..2a04f7a840 100644
--- a/examples/itemviews/simpledommodel/dommodel.cpp
+++ b/examples/itemviews/simpledommodel/dommodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtXml>
#include "domitem.h"
diff --git a/examples/itemviews/simpledommodel/mainwindow.cpp b/examples/itemviews/simpledommodel/mainwindow.cpp
index 9803726d9f..11517c124b 100644
--- a/examples/itemviews/simpledommodel/mainwindow.cpp
+++ b/examples/itemviews/simpledommodel/mainwindow.cpp
@@ -40,7 +40,7 @@
#include <QDomDocument>
#include <QFile>
-#include <QtGui>
+#include <QtWidgets>
#include "dommodel.h"
#include "mainwindow.h"
diff --git a/examples/itemviews/simpledommodel/simpledommodel.pro b/examples/itemviews/simpledommodel/simpledommodel.pro
index 85ef37b1ca..4044ae397d 100644
--- a/examples/itemviews/simpledommodel/simpledommodel.pro
+++ b/examples/itemviews/simpledommodel/simpledommodel.pro
@@ -6,7 +6,7 @@ SOURCES = domitem.cpp \
main.cpp \
mainwindow.cpp
CONFIG += qt
-QT += xml
+QT += xml widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpledommodel
diff --git a/examples/itemviews/simpletreemodel/main.cpp b/examples/itemviews/simpletreemodel/main.cpp
index 6401695d00..15e6bc3e76 100644
--- a/examples/itemviews/simpletreemodel/main.cpp
+++ b/examples/itemviews/simpletreemodel/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "treemodel.h"
diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.pro b/examples/itemviews/simpletreemodel/simpletreemodel.pro
index 6533b46749..336544d9fb 100644
--- a/examples/itemviews/simpletreemodel/simpletreemodel.pro
+++ b/examples/itemviews/simpletreemodel/simpletreemodel.pro
@@ -13,4 +13,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpletreemodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/simpletreemodel/treemodel.cpp b/examples/itemviews/simpletreemodel/treemodel.cpp
index 3041d3b1ef..de5b6f8d6e 100644
--- a/examples/itemviews/simpletreemodel/treemodel.cpp
+++ b/examples/itemviews/simpletreemodel/treemodel.cpp
@@ -45,7 +45,7 @@
models.
*/
-#include <QtGui>
+#include <QtWidgets>
#include "treeitem.h"
#include "treemodel.h"
diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
index 5208115530..b496064234 100644
--- a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
+++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simplewidgetmapper
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/simplewidgetmapper/window.cpp b/examples/itemviews/simplewidgetmapper/window.cpp
index a6ed1bc984..c3331b689d 100644
--- a/examples/itemviews/simplewidgetmapper/window.cpp
+++ b/examples/itemviews/simplewidgetmapper/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/itemviews/spinboxdelegate/delegate.cpp b/examples/itemviews/spinboxdelegate/delegate.cpp
index 7837cbf670..ecc4f3eb3b 100644
--- a/examples/itemviews/spinboxdelegate/delegate.cpp
+++ b/examples/itemviews/spinboxdelegate/delegate.cpp
@@ -45,7 +45,7 @@
using a spin box widget.
*/
-#include <QtGui>
+#include <QtWidgets>
#include "delegate.h"
diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
index bbee66aa50..1859252626 100644
--- a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
+++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/spinboxdelegate
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/itemviews/spreadsheet/main.cpp b/examples/itemviews/spreadsheet/main.cpp
index 4c20646f9c..19bb379124 100644
--- a/examples/itemviews/spreadsheet/main.cpp
+++ b/examples/itemviews/spreadsheet/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "spreadsheet.h"
int main(int argc, char** argv) {
diff --git a/examples/itemviews/spreadsheet/printview.h b/examples/itemviews/spreadsheet/printview.h
index 7c74844483..43a7bb39b7 100644
--- a/examples/itemviews/spreadsheet/printview.h
+++ b/examples/itemviews/spreadsheet/printview.h
@@ -43,6 +43,7 @@
#define PRINTVIEW_H
#include <QTableView>
+class QPrinter;
class PrintView : public QTableView
{
diff --git a/examples/itemviews/spreadsheet/spreadsheet.cpp b/examples/itemviews/spreadsheet/spreadsheet.cpp
index 6b99521b7b..d3e57a5f4f 100644
--- a/examples/itemviews/spreadsheet/spreadsheet.cpp
+++ b/examples/itemviews/spreadsheet/spreadsheet.cpp
@@ -39,7 +39,11 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPrintPreviewDialog>
+
#include "spreadsheet.h"
#include "spreadsheetdelegate.h"
#include "spreadsheetitem.h"
diff --git a/examples/itemviews/spreadsheet/spreadsheet.pro b/examples/itemviews/spreadsheet/spreadsheet.pro
index c06972b760..aaa90e7998 100644
--- a/examples/itemviews/spreadsheet/spreadsheet.pro
+++ b/examples/itemviews/spreadsheet/spreadsheet.pro
@@ -7,8 +7,9 @@ TARGET =
DEPENDPATH += .
INCLUDEPATH += .
+QT += widgets printsupport
CONFIG += qt warn_on
-#unix:contains(QT_CONFIG, dbus):QT += dbus
+#unix:contains(QT_CONFIG, dbus):QT += dbus widgets
# Input
HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h
diff --git a/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp b/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp
index 6f2f2dd071..59f340ae3d 100644
--- a/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp
+++ b/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "spreadsheetdelegate.h"
-#include <QtGui>
+#include <QtWidgets>
SpreadSheetDelegate::SpreadSheetDelegate(QObject *parent)
: QItemDelegate(parent) {}
diff --git a/examples/itemviews/spreadsheet/spreadsheetitem.h b/examples/itemviews/spreadsheet/spreadsheetitem.h
index b0e7e337ed..c7764ea1de 100644
--- a/examples/itemviews/spreadsheet/spreadsheetitem.h
+++ b/examples/itemviews/spreadsheet/spreadsheetitem.h
@@ -43,7 +43,7 @@
#define SPREADSHEETITEM_H
#include <QTableWidgetItem>
-#include <QtGui>
+#include <QtWidgets>
#include "spreadsheet.h"
class SpreadSheetItem : public QTableWidgetItem
diff --git a/examples/itemviews/stardelegate/main.cpp b/examples/itemviews/stardelegate/main.cpp
index 4f5c86164e..a9d5e96655 100644
--- a/examples/itemviews/stardelegate/main.cpp
+++ b/examples/itemviews/stardelegate/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "stardelegate.h"
#include "stareditor.h"
diff --git a/examples/itemviews/stardelegate/stardelegate.cpp b/examples/itemviews/stardelegate/stardelegate.cpp
index c784da2ffd..687ae0da2d 100644
--- a/examples/itemviews/stardelegate/stardelegate.cpp
+++ b/examples/itemviews/stardelegate/stardelegate.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "stardelegate.h"
#include "stareditor.h"
diff --git a/examples/itemviews/stardelegate/stardelegate.pro b/examples/itemviews/stardelegate/stardelegate.pro
index 63d9bcba4b..56679be0a4 100644
--- a/examples/itemviews/stardelegate/stardelegate.pro
+++ b/examples/itemviews/stardelegate/stardelegate.pro
@@ -15,6 +15,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
+QT += widgets
symbian: warning(This example might not fully work on Symbian platform)
maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/itemviews/stardelegate/stareditor.cpp b/examples/itemviews/stardelegate/stareditor.cpp
index 453c75dbb7..6a9092c058 100644
--- a/examples/itemviews/stardelegate/stareditor.cpp
+++ b/examples/itemviews/stardelegate/stareditor.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "stareditor.h"
#include "starrating.h"
diff --git a/examples/itemviews/stardelegate/starrating.cpp b/examples/itemviews/stardelegate/starrating.cpp
index 121d4a2ca1..c77a40b323 100644
--- a/examples/itemviews/stardelegate/starrating.cpp
+++ b/examples/itemviews/stardelegate/starrating.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
#include "starrating.h"
diff --git a/examples/ja_JP/linguist/hellotr/hellotr.pro b/examples/ja_JP/linguist/hellotr/hellotr.pro
index b42e8752d4..ab51bc8082 100644
--- a/examples/ja_JP/linguist/hellotr/hellotr.pro
+++ b/examples/ja_JP/linguist/hellotr/hellotr.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/hellotr
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/layouts/basiclayouts/basiclayouts.pro b/examples/layouts/basiclayouts/basiclayouts.pro
index 2b15787446..7751e139e7 100644
--- a/examples/layouts/basiclayouts/basiclayouts.pro
+++ b/examples/layouts/basiclayouts/basiclayouts.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/basiclayouts
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/layouts/basiclayouts/dialog.cpp b/examples/layouts/basiclayouts/dialog.cpp
index e3cbc08948..91ae01cb0d 100644
--- a/examples/layouts/basiclayouts/dialog.cpp
+++ b/examples/layouts/basiclayouts/dialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "dialog.h"
diff --git a/examples/layouts/borderlayout/borderlayout.cpp b/examples/layouts/borderlayout/borderlayout.cpp
index e6c2bbc79e..c83ce0e476 100644
--- a/examples/layouts/borderlayout/borderlayout.cpp
+++ b/examples/layouts/borderlayout/borderlayout.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "borderlayout.h"
diff --git a/examples/layouts/borderlayout/borderlayout.pro b/examples/layouts/borderlayout/borderlayout.pro
index 19075ab412..76a939daa4 100644
--- a/examples/layouts/borderlayout/borderlayout.pro
+++ b/examples/layouts/borderlayout/borderlayout.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/borderlayout
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/layouts/borderlayout/window.cpp b/examples/layouts/borderlayout/window.cpp
index da32600114..7501a7296c 100644
--- a/examples/layouts/borderlayout/window.cpp
+++ b/examples/layouts/borderlayout/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "borderlayout.h"
#include "window.h"
diff --git a/examples/layouts/dynamiclayouts/dialog.cpp b/examples/layouts/dynamiclayouts/dialog.cpp
index 690e52b8fa..d07903d8aa 100644
--- a/examples/layouts/dynamiclayouts/dialog.cpp
+++ b/examples/layouts/dynamiclayouts/dialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "dialog.h"
diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.pro b/examples/layouts/dynamiclayouts/dynamiclayouts.pro
index 44f2b5fdcd..f6ab7791aa 100644
--- a/examples/layouts/dynamiclayouts/dynamiclayouts.pro
+++ b/examples/layouts/dynamiclayouts/dynamiclayouts.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/dynamiclayouts
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/layouts/flowlayout/flowlayout.cpp b/examples/layouts/flowlayout/flowlayout.cpp
index b570af8e78..ddca09b71b 100644
--- a/examples/layouts/flowlayout/flowlayout.cpp
+++ b/examples/layouts/flowlayout/flowlayout.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "flowlayout.h"
//! [1]
diff --git a/examples/layouts/flowlayout/flowlayout.pro b/examples/layouts/flowlayout/flowlayout.pro
index 6064b5a57c..f59c4bc835 100644
--- a/examples/layouts/flowlayout/flowlayout.pro
+++ b/examples/layouts/flowlayout/flowlayout.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/flowlayout
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/layouts/flowlayout/window.cpp b/examples/layouts/flowlayout/window.cpp
index 0c7eb73101..50782b9822 100644
--- a/examples/layouts/flowlayout/window.cpp
+++ b/examples/layouts/flowlayout/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "flowlayout.h"
#include "window.h"
diff --git a/examples/layouts/layouts.pro b/examples/layouts/layouts.pro
index 678691ad86..f1940c1421 100644
--- a/examples/layouts/layouts.pro
+++ b/examples/layouts/layouts.pro
@@ -10,4 +10,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/linguist/arrowpad/arrowpad.cpp b/examples/linguist/arrowpad/arrowpad.cpp
index 1a5357a3ca..12e41474bf 100644
--- a/examples/linguist/arrowpad/arrowpad.cpp
+++ b/examples/linguist/arrowpad/arrowpad.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "arrowpad.h"
diff --git a/examples/linguist/arrowpad/arrowpad.pro b/examples/linguist/arrowpad/arrowpad.pro
index f9b7488feb..8181ee07cb 100644
--- a/examples/linguist/arrowpad/arrowpad.pro
+++ b/examples/linguist/arrowpad/arrowpad.pro
@@ -16,6 +16,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/arrowpad
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/linguist/arrowpad/main.cpp b/examples/linguist/arrowpad/main.cpp
index dc8cae8251..23f62b2ebf 100644
--- a/examples/linguist/arrowpad/main.cpp
+++ b/examples/linguist/arrowpad/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/linguist/arrowpad/mainwindow.cpp b/examples/linguist/arrowpad/mainwindow.cpp
index 8c3ccf2fd3..9e141904cd 100644
--- a/examples/linguist/arrowpad/mainwindow.cpp
+++ b/examples/linguist/arrowpad/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "arrowpad.h"
#include "mainwindow.h"
diff --git a/examples/linguist/hellotr/hellotr.pro b/examples/linguist/hellotr/hellotr.pro
index 69c28ece8c..0a3ed48dfb 100644
--- a/examples/linguist/hellotr/hellotr.pro
+++ b/examples/linguist/hellotr/hellotr.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/hellotr
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/linguist/linguist.pro b/examples/linguist/linguist.pro
index 64b214c70c..416a6e6c9d 100644
--- a/examples/linguist/linguist.pro
+++ b/examples/linguist/linguist.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/linguist/trollprint/main.cpp b/examples/linguist/trollprint/main.cpp
index 92f163002c..b2f2131927 100644
--- a/examples/linguist/trollprint/main.cpp
+++ b/examples/linguist/trollprint/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/linguist/trollprint/mainwindow.cpp b/examples/linguist/trollprint/mainwindow.cpp
index 4ea0db1733..337b7aa8c4 100644
--- a/examples/linguist/trollprint/mainwindow.cpp
+++ b/examples/linguist/trollprint/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "printpanel.h"
diff --git a/examples/linguist/trollprint/printpanel.cpp b/examples/linguist/trollprint/printpanel.cpp
index af1ff53193..74ddc18b59 100644
--- a/examples/linguist/trollprint/printpanel.cpp
+++ b/examples/linguist/trollprint/printpanel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "printpanel.h"
diff --git a/examples/linguist/trollprint/trollprint.pro b/examples/linguist/trollprint/trollprint.pro
index e874f5a1fd..0588424ff7 100644
--- a/examples/linguist/trollprint/trollprint.pro
+++ b/examples/linguist/trollprint/trollprint.pro
@@ -12,6 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/trollprint
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/mainwindows/application/application.pro b/examples/mainwindows/application/application.pro
index 6b8f80afbb..f66fa5fb62 100644
--- a/examples/mainwindows/application/application.pro
+++ b/examples/mainwindows/application/application.pro
@@ -12,6 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/application
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
index 4ebc5c169e..fd8fa97e68 100644
--- a/examples/mainwindows/application/mainwindow.cpp
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
//! [0]
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
//! [0]
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro
index a45b1e1dcd..6a155f6edd 100644
--- a/examples/mainwindows/dockwidgets/dockwidgets.pro
+++ b/examples/mainwindows/dockwidgets/dockwidgets.pro
@@ -10,6 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/dockwidgets
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
index 296eec2242..5a0c1f6ad9 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
//! [0]
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
//! [0]
diff --git a/examples/mainwindows/macmainwindow/macmainwindow.h b/examples/mainwindows/macmainwindow/macmainwindow.h
index 10ff3b5147..d6f8b4cbdd 100644
--- a/examples/mainwindows/macmainwindow/macmainwindow.h
+++ b/examples/mainwindows/macmainwindow/macmainwindow.h
@@ -41,7 +41,7 @@
#ifndef MACMAINWINDOW_H
#define MACMAINWINDOW_H
-#include <QtGui>
+#include <QtWidgets>
#ifdef Q_WS_MAC
diff --git a/examples/mainwindows/macmainwindow/macmainwindow.pro b/examples/mainwindows/macmainwindow/macmainwindow.pro
index 3ababcca15..8db88375f5 100644
--- a/examples/mainwindows/macmainwindow/macmainwindow.pro
+++ b/examples/mainwindows/macmainwindow/macmainwindow.pro
@@ -21,3 +21,4 @@ sources.files = $$SOURCES *.pro *.html
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/macmainwindow
INSTALLS += target sources
}
+QT += widgets widgets
diff --git a/examples/mainwindows/macmainwindow/main.cpp b/examples/mainwindows/macmainwindow/main.cpp
index 34e4847068..c984d80397 100644
--- a/examples/mainwindows/macmainwindow/main.cpp
+++ b/examples/mainwindows/macmainwindow/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "macmainwindow.h"
#ifdef Q_WS_MAC
diff --git a/examples/mainwindows/mainwindow/mainwindow.pro b/examples/mainwindows/mainwindow/mainwindow.pro
index 17902246ac..afe03a5788 100644
--- a/examples/mainwindows/mainwindow/mainwindow.pro
+++ b/examples/mainwindows/mainwindow/mainwindow.pro
@@ -14,4 +14,5 @@ sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.png *.jpg *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mainwindow
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
diff --git a/examples/mainwindows/mainwindows.pro b/examples/mainwindows/mainwindows.pro
index d570a24042..9ed8e7aaff 100644
--- a/examples/mainwindows/mainwindows.pro
+++ b/examples/mainwindows/mainwindows.pro
@@ -15,4 +15,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp
index 956eabb230..816c8094da 100644
--- a/examples/mainwindows/mdi/mainwindow.cpp
+++ b/examples/mainwindows/mdi/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "mdichild.h"
diff --git a/examples/mainwindows/mdi/mdi.pro b/examples/mainwindows/mdi/mdi.pro
index d545e880bc..3112128d9b 100644
--- a/examples/mainwindows/mdi/mdi.pro
+++ b/examples/mainwindows/mdi/mdi.pro
@@ -12,6 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mdi
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/mainwindows/mdi/mdichild.cpp b/examples/mainwindows/mdi/mdichild.cpp
index 0382b27e23..0b55ee5223 100644
--- a/examples/mainwindows/mdi/mdichild.cpp
+++ b/examples/mainwindows/mdi/mdichild.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mdichild.h"
diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp
index 99f1ddcfbf..eae4e6e9ec 100644
--- a/examples/mainwindows/menus/mainwindow.cpp
+++ b/examples/mainwindows/menus/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/mainwindows/menus/menus.pro b/examples/mainwindows/menus/menus.pro
index f64157b5cd..c004ef73a8 100644
--- a/examples/mainwindows/menus/menus.pro
+++ b/examples/mainwindows/menus/menus.pro
@@ -12,6 +12,7 @@ symbian {
TARGET.UID3 = 0xA000CF66
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/mainwindows/recentfiles/mainwindow.cpp b/examples/mainwindows/recentfiles/mainwindow.cpp
index 623c4a375c..4a8011d64a 100644
--- a/examples/mainwindows/recentfiles/mainwindow.cpp
+++ b/examples/mainwindows/recentfiles/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/mainwindows/recentfiles/recentfiles.pro b/examples/mainwindows/recentfiles/recentfiles.pro
index c3057fd9c0..ecc78f245a 100644
--- a/examples/mainwindows/recentfiles/recentfiles.pro
+++ b/examples/mainwindows/recentfiles/recentfiles.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/recentfiles
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/mainwindows/sdi/mainwindow.cpp b/examples/mainwindows/sdi/mainwindow.cpp
index f881118899..7ae426d68c 100644
--- a/examples/mainwindows/sdi/mainwindow.cpp
+++ b/examples/mainwindows/sdi/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/mainwindows/sdi/sdi.pro b/examples/mainwindows/sdi/sdi.pro
index 5a75e2a6cd..c8687614c2 100644
--- a/examples/mainwindows/sdi/sdi.pro
+++ b/examples/mainwindows/sdi/sdi.pro
@@ -10,6 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/sdi
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro
index d87bedb330..8b2b33affb 100644
--- a/examples/network/bearermonitor/bearermonitor.pro
+++ b/examples/network/bearermonitor/bearermonitor.pro
@@ -1,5 +1,5 @@
TARGET = bearermonitor
-QT = core gui network
+QT = core gui network widgets
HEADERS = sessionwidget.h \
bearermonitor.h
diff --git a/examples/network/bearermonitor/main.cpp b/examples/network/bearermonitor/main.cpp
index 1358033fc2..cc6d918ee7 100644
--- a/examples/network/bearermonitor/main.cpp
+++ b/examples/network/bearermonitor/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QMainWindow>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMainWindow>
#include "bearermonitor.h"
diff --git a/examples/network/blockingfortuneclient/blockingclient.cpp b/examples/network/blockingfortuneclient/blockingclient.cpp
index bd2fb829a9..0491433d56 100644
--- a/examples/network/blockingfortuneclient/blockingclient.cpp
+++ b/examples/network/blockingfortuneclient/blockingclient.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "blockingclient.h"
diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.pro b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
index ea64f00b92..3fe6f7c7ab 100644
--- a/examples/network/blockingfortuneclient/blockingfortuneclient.pro
+++ b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = blockingclient.h \
fortunethread.h
SOURCES = blockingclient.cpp \
diff --git a/examples/network/broadcastreceiver/broadcastreceiver.pro b/examples/network/broadcastreceiver/broadcastreceiver.pro
index adef726ed0..bc6b0ee55a 100644
--- a/examples/network/broadcastreceiver/broadcastreceiver.pro
+++ b/examples/network/broadcastreceiver/broadcastreceiver.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = receiver.h
SOURCES = receiver.cpp \
main.cpp
diff --git a/examples/network/broadcastreceiver/receiver.cpp b/examples/network/broadcastreceiver/receiver.cpp
index 04feffbc80..e0830283a9 100644
--- a/examples/network/broadcastreceiver/receiver.cpp
+++ b/examples/network/broadcastreceiver/receiver.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "receiver.h"
diff --git a/examples/network/broadcastsender/broadcastsender.pro b/examples/network/broadcastsender/broadcastsender.pro
index d2bf78d414..0944164e7c 100644
--- a/examples/network/broadcastsender/broadcastsender.pro
+++ b/examples/network/broadcastsender/broadcastsender.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = sender.h
SOURCES = sender.cpp \
main.cpp
diff --git a/examples/network/broadcastsender/sender.cpp b/examples/network/broadcastsender/sender.cpp
index 7ce877d586..33b34a4a4c 100644
--- a/examples/network/broadcastsender/sender.cpp
+++ b/examples/network/broadcastsender/sender.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "sender.h"
diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
index 9eab1c2371..27443659df 100644
--- a/examples/network/fortuneclient/client.cpp
+++ b/examples/network/fortuneclient/client.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "client.h"
diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro
index b8bb2b9b70..b5cb3b4390 100644
--- a/examples/network/fortuneclient/fortuneclient.pro
+++ b/examples/network/fortuneclient/fortuneclient.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = client.h
SOURCES = client.cpp \
main.cpp
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
index 09dc9773ae..ed865e4ca5 100644
--- a/examples/network/fortuneserver/fortuneserver.pro
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = server.h
SOURCES = server.cpp \
main.cpp
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
index edb8c9398c..9ce6b650e0 100644
--- a/examples/network/fortuneserver/server.cpp
+++ b/examples/network/fortuneserver/server.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include <stdlib.h>
diff --git a/examples/network/googlesuggest/googlesuggest.h b/examples/network/googlesuggest/googlesuggest.h
index a5d268a126..6b4abff5d9 100644
--- a/examples/network/googlesuggest/googlesuggest.h
+++ b/examples/network/googlesuggest/googlesuggest.h
@@ -41,7 +41,7 @@
#ifndef GOOGLESUGGEST_H
#define GOOGLESUGGEST_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include <QObject>
diff --git a/examples/network/googlesuggest/googlesuggest.pro b/examples/network/googlesuggest/googlesuggest.pro
index 0f887318a3..97866f6f32 100644
--- a/examples/network/googlesuggest/googlesuggest.pro
+++ b/examples/network/googlesuggest/googlesuggest.pro
@@ -1,4 +1,4 @@
-QT += network
+QT += network widgets
SOURCES = main.cpp searchbox.cpp googlesuggest.cpp
HEADERS = searchbox.h googlesuggest.h
diff --git a/examples/network/http/http.pro b/examples/network/http/http.pro
index 7da0979935..6f4b7be076 100644
--- a/examples/network/http/http.pro
+++ b/examples/network/http/http.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += httpwindow.h
SOURCES += httpwindow.cpp \
main.cpp
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
index 6497a33508..77c1e314c7 100644
--- a/examples/network/http/httpwindow.cpp
+++ b/examples/network/http/httpwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "httpwindow.h"
diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp
index 14154b47cc..f9a51268b7 100644
--- a/examples/network/loopback/dialog.cpp
+++ b/examples/network/loopback/dialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "dialog.h"
diff --git a/examples/network/loopback/loopback.pro b/examples/network/loopback/loopback.pro
index 3565058e12..c96868fb40 100644
--- a/examples/network/loopback/loopback.pro
+++ b/examples/network/loopback/loopback.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dialog.h
SOURCES = dialog.cpp \
main.cpp
diff --git a/examples/network/multicastreceiver/multicastreceiver.pro b/examples/network/multicastreceiver/multicastreceiver.pro
index 958a13f11d..caeca7ff46 100644
--- a/examples/network/multicastreceiver/multicastreceiver.pro
+++ b/examples/network/multicastreceiver/multicastreceiver.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = receiver.h
SOURCES = receiver.cpp \
main.cpp
diff --git a/examples/network/multicastreceiver/receiver.cpp b/examples/network/multicastreceiver/receiver.cpp
index 77446b93ff..8db3042a4e 100644
--- a/examples/network/multicastreceiver/receiver.cpp
+++ b/examples/network/multicastreceiver/receiver.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "receiver.h"
diff --git a/examples/network/multicastsender/multicastsender.pro b/examples/network/multicastsender/multicastsender.pro
index 479251ca0b..a0cdc61eab 100644
--- a/examples/network/multicastsender/multicastsender.pro
+++ b/examples/network/multicastsender/multicastsender.pro
@@ -1,7 +1,7 @@
HEADERS = sender.h
SOURCES = sender.cpp \
main.cpp
-QT += network
+QT += network widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/multicastsender
diff --git a/examples/network/multicastsender/sender.cpp b/examples/network/multicastsender/sender.cpp
index aab94aa42a..6172f07063 100644
--- a/examples/network/multicastsender/sender.cpp
+++ b/examples/network/multicastsender/sender.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "sender.h"
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp
index cdb29ea518..9ad042e05f 100644
--- a/examples/network/network-chat/chatdialog.cpp
+++ b/examples/network/network-chat/chatdialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "chatdialog.h"
diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro
index d34da98822..f6650f1d40 100644
--- a/examples/network/network-chat/network-chat.pro
+++ b/examples/network/network-chat/network-chat.pro
@@ -10,7 +10,7 @@ SOURCES = chatdialog.cpp \
peermanager.cpp \
server.cpp
FORMS = chatdialog.ui
-QT += network
+QT += network widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/network-chat
diff --git a/examples/network/network.pro b/examples/network/network.pro
index b8416bb31f..90079f9b50 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -35,4 +35,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index c0a2b73428..1c0d057c66 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include "ftpwindow.h"
diff --git a/examples/network/qftp/qftp.pro b/examples/network/qftp/qftp.pro
index d3f017af52..f0efe630b9 100644
--- a/examples/network/qftp/qftp.pro
+++ b/examples/network/qftp/qftp.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = ftpwindow.h
SOURCES = ftpwindow.cpp \
main.cpp
diff --git a/examples/network/securesocketclient/certificateinfo.h b/examples/network/securesocketclient/certificateinfo.h
index 6e60ade4f0..cc5cc34e8a 100644
--- a/examples/network/securesocketclient/certificateinfo.h
+++ b/examples/network/securesocketclient/certificateinfo.h
@@ -41,7 +41,7 @@
#ifndef CERTIFICATEINFO_H
#define CERTIFICATEINFO_H
-#include <QtGui/QDialog>
+#include <QtWidgets/QDialog>
#include <QtNetwork/QSslCertificate>
QT_BEGIN_NAMESPACE
diff --git a/examples/network/securesocketclient/securesocketclient.pro b/examples/network/securesocketclient/securesocketclient.pro
index ae4b15ffbe..94c01cd757 100644
--- a/examples/network/securesocketclient/securesocketclient.pro
+++ b/examples/network/securesocketclient/securesocketclient.pro
@@ -7,7 +7,7 @@ RESOURCES += securesocketclient.qrc
FORMS += certificateinfo.ui \
sslclient.ui \
sslerrors.ui
-QT += network
+QT += network widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/securesocketclient
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
index 11e6ffd537..9d6af86813 100644
--- a/examples/network/securesocketclient/sslclient.cpp
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -43,9 +43,9 @@
#include "ui_sslclient.h"
#include "ui_sslerrors.h"
-#include <QtGui/QScrollBar>
-#include <QtGui/QStyle>
-#include <QtGui/QToolButton>
+#include <QtWidgets/QScrollBar>
+#include <QtWidgets/QStyle>
+#include <QtWidgets/QToolButton>
#include <QtNetwork/QSslCipher>
SslClient::SslClient(QWidget *parent)
diff --git a/examples/network/securesocketclient/sslclient.h b/examples/network/securesocketclient/sslclient.h
index 33a9a882b6..4e0bc1891f 100644
--- a/examples/network/securesocketclient/sslclient.h
+++ b/examples/network/securesocketclient/sslclient.h
@@ -41,7 +41,7 @@
#ifndef SSLCLIENT_H
#define SSLCLIENT_H
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#include <QtNetwork/QAbstractSocket>
#include <QtNetwork/QSslSocket>
diff --git a/examples/network/threadedfortuneserver/dialog.cpp b/examples/network/threadedfortuneserver/dialog.cpp
index 27bf253b1a..e62076130d 100644
--- a/examples/network/threadedfortuneserver/dialog.cpp
+++ b/examples/network/threadedfortuneserver/dialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtNetwork>
#include <stdlib.h>
diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.pro b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
index 335666bd76..1b4cd598a2 100644
--- a/examples/network/threadedfortuneserver/threadedfortuneserver.pro
+++ b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = dialog.h \
fortuneserver.h \
fortunethread.h
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 06dfca1ba2..3d264eb272 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addtorrentdialog.h"
#include "mainwindow.h"
diff --git a/examples/network/torrent/torrent.pro b/examples/network/torrent/torrent.pro
index 3565978d8c..b2da8b6b56 100644
--- a/examples/network/torrent/torrent.pro
+++ b/examples/network/torrent/torrent.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS += addtorrentdialog.h \
bencodeparser.h \
connectionmanager.h \
diff --git a/examples/opengl/2dpainting/2dpainting.pro b/examples/opengl/2dpainting/2dpainting.pro
index ac88b9940a..5d361bc1bf 100644
--- a/examples/opengl/2dpainting/2dpainting.pro
+++ b/examples/opengl/2dpainting/2dpainting.pro
@@ -1,4 +1,4 @@
-QT += opengl
+QT += opengl widgets
HEADERS = glwidget.h \
helper.h \
diff --git a/examples/opengl/2dpainting/glwidget.cpp b/examples/opengl/2dpainting/glwidget.cpp
index 8b28a6e6a3..800e947385 100644
--- a/examples/opengl/2dpainting/glwidget.cpp
+++ b/examples/opengl/2dpainting/glwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "glwidget.h"
#include "helper.h"
diff --git a/examples/opengl/2dpainting/helper.cpp b/examples/opengl/2dpainting/helper.cpp
index 662a4264a7..dc18c60a4b 100644
--- a/examples/opengl/2dpainting/helper.cpp
+++ b/examples/opengl/2dpainting/helper.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "helper.h"
//! [0]
diff --git a/examples/opengl/2dpainting/widget.cpp b/examples/opengl/2dpainting/widget.cpp
index 16398147c7..35eedae240 100644
--- a/examples/opengl/2dpainting/widget.cpp
+++ b/examples/opengl/2dpainting/widget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "widget.h"
#include "helper.h"
diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
index d2c8ef706c..0186670f38 100644
--- a/examples/opengl/2dpainting/window.cpp
+++ b/examples/opengl/2dpainting/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "glwidget.h"
#include "widget.h"
#include "window.h"
diff --git a/examples/opengl/cube/cube.pro b/examples/opengl/cube/cube.pro
index a11aaf6bc7..652812b718 100644
--- a/examples/opengl/cube/cube.pro
+++ b/examples/opengl/cube/cube.pro
@@ -4,7 +4,7 @@
#
#-------------------------------------------------
-QT += core gui
+QT += core gui widgets
TARGET = cube
TEMPLATE = app
diff --git a/examples/opengl/cube/main.cpp b/examples/opengl/cube/main.cpp
index c75fd0826a..ef6efdc4dc 100644
--- a/examples/opengl/cube/main.cpp
+++ b/examples/opengl/cube/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QApplication>
#include <QLabel>
#ifndef QT_NO_OPENGL
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
index 1116526922..3f4e9214ac 100644
--- a/examples/opengl/cube/mainwidget.cpp
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -72,13 +72,13 @@ MainWidget::~MainWidget()
void MainWidget::mousePressEvent(QMouseEvent *e)
{
// Saving mouse press position
- mousePressPosition = QVector2D(e->posF());
+ mousePressPosition = QVector2D(e->localPos());
}
void MainWidget::mouseReleaseEvent(QMouseEvent *e)
{
// Mouse release position - mouse press position
- QVector2D diff = QVector2D(e->posF()) - mousePressPosition;
+ QVector2D diff = QVector2D(e->localPos()) - mousePressPosition;
// Rotation axis is perpendicular to the mouse position difference
// vector
diff --git a/examples/opengl/framebufferobject2/framebufferobject2.pro b/examples/opengl/framebufferobject2/framebufferobject2.pro
index d2787853e0..d3fce133fa 100644
--- a/examples/opengl/framebufferobject2/framebufferobject2.pro
+++ b/examples/opengl/framebufferobject2/framebufferobject2.pro
@@ -2,7 +2,7 @@ HEADERS += glwidget.h
SOURCES += glwidget.cpp main.cpp
RESOURCES += framebufferobject2.qrc
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/framebufferobject2
diff --git a/examples/opengl/framebufferobject2/main.cpp b/examples/opengl/framebufferobject2/main.cpp
index 12e5a62cdd..313e683da5 100644
--- a/examples/opengl/framebufferobject2/main.cpp
+++ b/examples/opengl/framebufferobject2/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
#include "glwidget.h"
int main(int argc, char **argv)
diff --git a/examples/opengl/grabber/glwidget.cpp b/examples/opengl/grabber/glwidget.cpp
index 72039a7b66..52d0b2662a 100644
--- a/examples/opengl/grabber/glwidget.cpp
+++ b/examples/opengl/grabber/glwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include <math.h>
diff --git a/examples/opengl/grabber/grabber.pro b/examples/opengl/grabber/grabber.pro
index e9f371b6ad..6a73201cd2 100644
--- a/examples/opengl/grabber/grabber.pro
+++ b/examples/opengl/grabber/grabber.pro
@@ -3,7 +3,7 @@ HEADERS = glwidget.h \
SOURCES = glwidget.cpp \
main.cpp \
mainwindow.cpp
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/grabber
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
index d2f3a98dce..965c49ab1a 100644
--- a/examples/opengl/grabber/mainwindow.cpp
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include "glwidget.h"
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
index 59efb12368..38333d8560 100644
--- a/examples/opengl/hellogl/glwidget.cpp
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include <math.h>
diff --git a/examples/opengl/hellogl/hellogl.pro b/examples/opengl/hellogl/hellogl.pro
index 0c81aae5c1..82372c5d98 100644
--- a/examples/opengl/hellogl/hellogl.pro
+++ b/examples/opengl/hellogl/hellogl.pro
@@ -8,7 +8,7 @@ SOURCES = glwidget.cpp \
main.cpp \
window.cpp \
qtlogo.cpp
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl
diff --git a/examples/opengl/hellogl/window.cpp b/examples/opengl/hellogl/window.cpp
index ef7cc2ad09..9f7d6be68b 100644
--- a/examples/opengl/hellogl/window.cpp
+++ b/examples/opengl/hellogl/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "glwidget.h"
#include "window.h"
diff --git a/examples/opengl/hellogl_es/bubble.cpp b/examples/opengl/hellogl_es/bubble.cpp
deleted file mode 100644
index 167d9abd92..0000000000
--- a/examples/opengl/hellogl_es/bubble.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "bubble.h"
-
-Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
- : position(position), vel(velocity), radius(radius)
-{
- innerColor = randomColor();
- outerColor = randomColor();
- cache = 0;
- updateBrush();
-}
-
-//! [0]
-void Bubble::updateCache()
-{
- if (cache)
- delete cache;
- cache = new QImage(qRound(radius * 2 + 2), qRound(radius * 2 + 2), QImage::Format_ARGB32);
- cache->fill(0x00000000);
- QPainter p(cache);
- p.setRenderHint(QPainter::HighQualityAntialiasing);
- QPen pen(Qt::white);
- pen.setWidth(2);
- p.setPen(pen);
- p.setBrush(brush);
- p.drawEllipse(0, 0, int(2*radius), int(2*radius));
-}
-//! [0]
-
-Bubble::~Bubble()
-{
- if (cache)
- delete cache;
-}
-
-void Bubble::updateBrush()
-{
- QRadialGradient gradient(QPointF(radius, radius), radius,
- QPointF(radius*0.5, radius*0.5));
-
- gradient.setColorAt(0, QColor(255, 255, 255, 255));
- gradient.setColorAt(0.25, innerColor);
- gradient.setColorAt(1, outerColor);
- brush = QBrush(gradient);
- updateCache();
-}
-
-//! [1]
-void Bubble::drawBubble(QPainter *painter)
-{
- painter->save();
- painter->translate(position.x() - radius, position.y() - radius);
- painter->setOpacity(0.8);
- painter->drawImage(0, 0, *cache);
- painter->restore();
-}
-//! [1]
-
-QColor Bubble::randomColor()
-{
- int red = int(185 + 70.0*qrand()/(RAND_MAX+1.0));
- int green = int(185 + 70.0*qrand()/(RAND_MAX+1.0));
- int blue = int(205 + 50.0*qrand()/(RAND_MAX+1.0));
- int alpha = int(91 + 100.0*qrand()/(RAND_MAX+1.0));
-
- return QColor(red, green, blue, alpha);
-}
-
-void Bubble::move(const QRect &bbox)
-{
- position += vel;
- qreal leftOverflow = position.x() - radius - bbox.left();
- qreal rightOverflow = position.x() + radius - bbox.right();
- qreal topOverflow = position.y() - radius - bbox.top();
- qreal bottomOverflow = position.y() + radius - bbox.bottom();
-
- if (leftOverflow < 0.0) {
- position.setX(position.x() - 2 * leftOverflow);
- vel.setX(-vel.x());
- } else if (rightOverflow > 0.0) {
- position.setX(position.x() - 2 * rightOverflow);
- vel.setX(-vel.x());
- }
-
- if (topOverflow < 0.0) {
- position.setY(position.y() - 2 * topOverflow);
- vel.setY(-vel.y());
- } else if (bottomOverflow > 0.0) {
- position.setY(position.y() - 2 * bottomOverflow);
- vel.setY(-vel.y());
- }
-}
-
-QRectF Bubble::rect()
-{
- return QRectF(position.x() - radius, position.y() - radius,
- 2 * radius, 2 * radius);
-}
diff --git a/examples/opengl/hellogl_es/bubble.h b/examples/opengl/hellogl_es/bubble.h
deleted file mode 100644
index 21f5add43e..0000000000
--- a/examples/opengl/hellogl_es/bubble.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef BUBBLE_H
-#define BUBBLE_H
-
-#include <QBrush>
-#include <QColor>
-#include <QPointF>
-#include <QRect>
-#include <QRectF>
-
-class QPainter;
-
-class Bubble
-{
-public:
- Bubble(const QPointF &position, qreal radius, const QPointF &velocity);
- ~Bubble();
-
- void drawBubble(QPainter *painter);
- void updateBrush();
- void move(const QRect &bbox);
- void updateCache();
- QRectF rect();
-
-private:
- QColor randomColor();
-
- QBrush brush;
- QPointF position;
- QPointF vel;
- qreal radius;
- QColor innerColor;
- QColor outerColor;
- QImage *cache;
-};
-
-#endif
diff --git a/examples/opengl/hellogl_es/glwidget.cpp b/examples/opengl/hellogl_es/glwidget.cpp
deleted file mode 100644
index 80444dfdbe..0000000000
--- a/examples/opengl/hellogl_es/glwidget.cpp
+++ /dev/null
@@ -1,455 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "glwidget.h"
-#include <QPainter>
-#include <math.h>
-
-#include "bubble.h"
-
-
-const int bubbleNum = 8;
-
-inline void CrossProduct(qreal &xOut, qreal &yOut, qreal &zOut, qreal x1, qreal y1, qreal z1, qreal x2, qreal y2, qreal z2)
-{
- xOut = y1 * z2 - z1 * y2;
- yOut = z1 * x2 - x1 * z2;
- zOut = x1 * y2 - y1 * x2;
-}
-
-inline void Normalize(qreal &x, qreal &y, qreal &z)
-{
- qreal l = sqrt(x*x + y*y + z*z);
- x = x / l;
- y = y / l;
- z = z / l;
-}
-
-GLWidget::GLWidget(QWidget *parent)
- : QGLWidget(parent)
-{
- qtLogo = true;
- createdVertices = 0;
- createdNormals = 0;
- m_vertexNumber = 0;
- frames = 0;
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoBufferSwap(false);
- m_showBubbles = true;
-}
-
-GLWidget::~GLWidget()
-{
- if (createdVertices)
- delete[] createdVertices;
- if (createdNormals)
- delete[] createdNormals;
-}
-
-void GLWidget::setScaling(int scale) {
-
- if (scale > 50)
- m_fScale = 1 + qreal(scale -50) / 50 * 0.5;
- else if (scale < 50)
- m_fScale = 1- (qreal(50 - scale) / 50 * 1/2);
- else
- m_fScale = 1;
-}
-
-void GLWidget::setLogo() {
- qtLogo = true;
-}
-
-void GLWidget::setTexture() {
- qtLogo = false;
-}
-
-void GLWidget::showBubbles(bool bubbles)
-{
- m_showBubbles = bubbles;
-}
-
-//! [2]
-void GLWidget::paintQtLogo()
-{
- glDisable(GL_TEXTURE_2D);
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3,GL_FLOAT,0, createdVertices);
- glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(GL_FLOAT,0,createdNormals);
- glDrawArrays(GL_TRIANGLES, 0, m_vertexNumber / 3);
-}
-//! [2]
-
-void GLWidget::paintTexturedCube()
-{
- glEnable(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D, m_uiTexture);
- GLfloat afVertices[] = {
- -0.5, 0.5, 0.5, 0.5,-0.5,0.5,-0.5,-0.5,0.5,
- 0.5, -0.5, 0.5, -0.5,0.5,0.5,0.5,0.5,0.5,
- -0.5, -0.5, -0.5, 0.5,-0.5,-0.5,-0.5,0.5,-0.5,
- 0.5, 0.5, -0.5, -0.5,0.5,-0.5,0.5,-0.5,-0.5,
-
- 0.5, -0.5, -0.5, 0.5,-0.5,0.5,0.5,0.5,-0.5,
- 0.5, 0.5, 0.5, 0.5,0.5,-0.5,0.5,-0.5,0.5,
- -0.5, 0.5, -0.5, -0.5,-0.5,0.5,-0.5,-0.5,-0.5,
- -0.5, -0.5, 0.5, -0.5,0.5,-0.5,-0.5,0.5,0.5,
-
- 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5,
- -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5,
- -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5,
- 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5
- };
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3,GL_FLOAT,0,afVertices);
-
- GLfloat afTexCoord[] = {
- 0.0f,0.0f, 1.0f,1.0f, 1.0f,0.0f,
- 1.0f,1.0f, 0.0f,0.0f, 0.0f,1.0f,
- 1.0f,1.0f, 1.0f,0.0f, 0.0f,1.0f,
- 0.0f,0.0f, 0.0f,1.0f, 1.0f,0.0f,
-
- 1.0f,1.0f, 1.0f,0.0f, 0.0f,1.0f,
- 0.0f,0.0f, 0.0f,1.0f, 1.0f,0.0f,
- 0.0f,0.0f, 1.0f,1.0f, 1.0f,0.0f,
- 1.0f,1.0f, 0.0f,0.0f, 0.0f,1.0f,
-
- 0.0f,1.0f, 1.0f,0.0f, 1.0f,1.0f,
- 1.0f,0.0f, 0.0f,1.0f, 0.0f,0.0f,
- 1.0f,0.0f, 1.0f,1.0f, 0.0f,0.0f,
- 0.0f,1.0f, 0.0f,0.0f, 1.0f,1.0f
- };
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glTexCoordPointer(2,GL_FLOAT,0,afTexCoord);
-
- GLfloat afNormals[] = {
-
- 0,0,-1, 0,0,-1, 0,0,-1,
- 0,0,-1, 0,0,-1, 0,0,-1,
- 0,0,1, 0,0,1, 0,0,1,
- 0,0,1, 0,0,1, 0,0,1,
-
- -1,0,0, -1,0,0, -1,0,0,
- -1,0,0, -1,0,0, -1,0,0,
- 1,0,0, 1,0,0, 1,0,0,
- 1,0,0, 1,0,0, 1,0,0,
-
- 0,-1,0, 0,-1,0, 0,-1,0,
- 0,-1,0, 0,-1,0, 0,-1,0,
- 0,1,0, 0,1,0, 0,1,0,
- 0,1,0, 0,1,0, 0,1,0
- };
- glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(GL_FLOAT,0,afNormals);
-
- glDrawArrays(GL_TRIANGLES, 0, 36);
-}
-
-void GLWidget::initializeGL ()
-{
- glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
-
- glEnable(GL_TEXTURE_2D);
- glGenTextures(1, &m_uiTexture);
- m_uiTexture = bindTexture(QImage(":/qt.png"));
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
-
- GLfloat aLightPosition[] = {0.0f,0.3f,1.0f,0.0f};
-
- glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, aLightPosition);
- m_fAngle = 0;
- m_fScale = 1;
- createGeometry();
- createBubbles(bubbleNum - bubbles.count());
-}
-
-void GLWidget::paintGL()
-{
- createBubbles(bubbleNum - bubbles.count());
-
-//! [3]
- QPainter painter;
- painter.begin(this);
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
-//! [3]
-
-//! [4]
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
-
- //Since OpenGL ES does not support glPush/PopAttrib(GL_ALL_ATTRIB_BITS)
- //we have to take care of the states ourselves
-
- glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glEnable(GL_TEXTURE_2D);
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
-
- glShadeModel(GL_FLAT);
- glFrontFace(GL_CW);
- glCullFace(GL_FRONT);
- glEnable(GL_CULL_FACE);
- glEnable(GL_DEPTH_TEST);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- glRotatef(m_fAngle, 0.0f, 1.0f, 0.0f);
- glRotatef(m_fAngle, 1.0f, 0.0f, 0.0f);
- glRotatef(m_fAngle, 0.0f, 0.0f, 1.0f);
- glScalef(m_fScale, m_fScale,m_fScale);
- glTranslatef(0.0f,-0.2f,0.0f);
-
- GLfloat matDiff[] = {0.40f, 1.0f, 0.0f, 1.0f};
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matDiff);
-
- if (qtLogo)
- paintQtLogo();
- else
- paintTexturedCube();
-//! [4]
-
-//![5]
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
-
- glDisable(GL_LIGHTING);
- glDisable(GL_LIGHT0);
-
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_CULL_FACE);
-//![5]
-
-//! [6]
- if (m_showBubbles)
- foreach (Bubble *bubble, bubbles) {
- bubble->drawBubble(&painter);
- }
-//! [6]
-
-//! [7]
- QString framesPerSecond;
- framesPerSecond.setNum(frames /(time.elapsed() / 1000.0), 'f', 2);
-
- painter.setPen(Qt::white);
-
- painter.drawText(20, 40, framesPerSecond + " fps");
-
- painter.end();
-//! [7]
-
-//! [8]
- swapBuffers();
-//! [8]
-
- QMutableListIterator<Bubble*> iter(bubbles);
-
- while (iter.hasNext()) {
- Bubble *bubble = iter.next();
- bubble->move(rect());
- }
- if (!(frames % 100)) {
- time.start();
- frames = 0;
- }
- m_fAngle += 1.0f;
- frames ++;
-}
-
-void GLWidget::createBubbles(int number)
-{
- for (int i = 0; i < number; ++i) {
- QPointF position(width()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))),
- height()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))));
- qreal radius = qMin(width(), height())*(0.0175 + 0.0875*qrand()/(RAND_MAX+1.0));
- QPointF velocity(width()*0.0175*(-0.5 + qrand()/(RAND_MAX+1.0)),
- height()*0.0175*(-0.5 + qrand()/(RAND_MAX+1.0)));
-
- bubbles.append(new Bubble(position, radius, velocity));
- }
-}
-
-void GLWidget::createGeometry()
-{
- vertices.clear();
- normals.clear();
-
- qreal x1 = +0.06f;
- qreal y1 = -0.14f;
- qreal x2 = +0.14f;
- qreal y2 = -0.06f;
- qreal x3 = +0.08f;
- qreal y3 = +0.00f;
- qreal x4 = +0.30f;
- qreal y4 = +0.22f;
-
- quad(x1, y1, x2, y2, y2, x2, y1, x1);
- quad(x3, y3, x4, y4, y4, x4, y3, x3);
-
- extrude(x1, y1, x2, y2);
- extrude(x2, y2, y2, x2);
- extrude(y2, x2, y1, x1);
- extrude(y1, x1, x1, y1);
- extrude(x3, y3, x4, y4);
- extrude(x4, y4, y4, x4);
- extrude(y4, x4, y3, x3);
-
- const qreal Pi = 3.14159f;
- const int NumSectors = 100;
-
- for (int i = 0; i < NumSectors; ++i) {
- qreal angle1 = (i * 2 * Pi) / NumSectors;
- qreal x5 = 0.30 * sin(angle1);
- qreal y5 = 0.30 * cos(angle1);
- qreal x6 = 0.20 * sin(angle1);
- qreal y6 = 0.20 * cos(angle1);
-
- qreal angle2 = ((i + 1) * 2 * Pi) / NumSectors;
- qreal x7 = 0.20 * sin(angle2);
- qreal y7 = 0.20 * cos(angle2);
- qreal x8 = 0.30 * sin(angle2);
- qreal y8 = 0.30 * cos(angle2);
-
- quad(x5, y5, x6, y6, x7, y7, x8, y8);
-
- extrude(x6, y6, x7, y7);
- extrude(x8, y8, x5, y5);
- }
-
-//! [1]
- m_vertexNumber = vertices.size();
- createdVertices = new GLfloat[m_vertexNumber];
- createdNormals = new GLfloat[m_vertexNumber];
- for (int i = 0;i < m_vertexNumber;i++) {
- createdVertices[i] = vertices.at(i) * 2;
- createdNormals[i] = normals.at(i);
- }
- vertices.clear();
- normals.clear();
-}
-//! [1]
-
-//! [0]
-void GLWidget::quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
-{
- qreal nx, ny, nz;
-
- vertices << x1 << y1 << -0.05f;
- vertices << x2 << y2 << -0.05f;
- vertices << x4 << y4 << -0.05f;
-
- vertices << x3 << y3 << -0.05f;
- vertices << x4 << y4 << -0.05f;
- vertices << x2 << y2 << -0.05f;
-
- CrossProduct(nx, ny, nz, x2 - x1, y2 - y1, 0, x4 - x1, y4 - y1, 0);
- Normalize(nx, ny, nz);
-
- normals << nx << ny << nz;
- normals << nx << ny << nz;
- normals << nx << ny << nz;
-
- normals << nx << ny << nz;
- normals << nx << ny << nz;
- normals << nx << ny << nz;
-
- vertices << x4 << y4 << 0.05f;
- vertices << x2 << y2 << 0.05f;
- vertices << x1 << y1 << 0.05f;
-
- vertices << x2 << y2 << 0.05f;
- vertices << x4 << y4 << 0.05f;
- vertices << x3 << y3 << 0.05f;
-
- CrossProduct(nx, ny, nz, x2 - x4, y2 - y4, 0, x1 - x4, y1 - y4, 0);
- Normalize(nx, ny, nz);
-
- normals << nx << ny << nz;
- normals << nx << ny << nz;
- normals << nx << ny << nz;
-
- normals << nx << ny << nz;
- normals << nx << ny << nz;
- normals << nx << ny << nz;
-}
-//! [0]
-
-void GLWidget::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
-{
- qreal nx, ny, nz;
-
- vertices << x1 << y1 << +0.05f;
- vertices << x2 << y2 << +0.05f;
- vertices << x1 << y1 << -0.05f;
-
- vertices << x2 << y2 << -0.05f;
- vertices << x1 << y1 << -0.05f;
- vertices << x2 << y2 << +0.05f;
-
- CrossProduct(nx, ny, nz, x2 - x1, y2 - y1, 0.0f, 0.0f, 0.0f, -0.1f);
- Normalize(nx, ny, nz);
-
- normals << nx << ny << nz;
- normals << nx << ny << nz;
- normals << nx << ny << nz;
-
- normals << nx << ny << nz;
- normals << nx << ny << nz;
- normals << nx << ny << nz;
-}
diff --git a/examples/opengl/hellogl_es/glwidget.h b/examples/opengl/hellogl_es/glwidget.h
deleted file mode 100644
index 9908f63fd8..0000000000
--- a/examples/opengl/hellogl_es/glwidget.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef GLWIDGET_H
-#define GLWIDGET_H
-
-#include <QGLWidget>
-#include <QTime>
-
-
-
-class Bubble;
-class GLWidget : public QGLWidget {
-
- Q_OBJECT
-public:
- GLWidget(QWidget *parent = 0);
- ~GLWidget();
-public slots:
- void setScaling(int scale);
- void setLogo();
- void setTexture();
- void showBubbles(bool);
-protected:
- void paintGL ();
- void initializeGL ();
-private:
- GLuint m_uiTexture;
- qreal m_fAngle;
- qreal m_fScale;
- bool m_showBubbles;
- void paintTexturedCube();
- void paintQtLogo();
- void createGeometry();
- void createBubbles(int number);
- void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
- void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
- QList<qreal> vertices;
- QList<qreal> normals;
- GLfloat *createdVertices;
- GLfloat *createdNormals;
- int m_vertexNumber;
- bool qtLogo;
- QList<Bubble*> bubbles;
- int frames;
- QTime time;
-};
-#endif
diff --git a/examples/opengl/hellogl_es/hellogl_es.desktop b/examples/opengl/hellogl_es/hellogl_es.desktop
deleted file mode 100644
index 11c1dd795c..0000000000
--- a/examples/opengl/hellogl_es/hellogl_es.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=Hello GL ES
-Exec=/opt/usr/bin/hellogl_es
-Icon=hellogl_es
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/opengl/hellogl_es/hellogl_es.pro b/examples/opengl/hellogl_es/hellogl_es.pro
deleted file mode 100644
index c25ab30235..0000000000
--- a/examples/opengl/hellogl_es/hellogl_es.pro
+++ /dev/null
@@ -1,33 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Thu Oct 4 19:01:12 2007
-######################################################################
-
-TEMPLATE = app
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
-SOURCES += main.cpp
-SOURCES += glwidget.cpp
-SOURCES += mainwindow.cpp
-SOURCES += bubble.cpp
-
-HEADERS += glwidget.h
-HEADERS += mainwindow.h
-HEADERS += bubble.h
-
-RESOURCES += texture.qrc
-QT += opengl
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es
-INSTALLS += target sources
-
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/opengl/hellogl_es/main.cpp b/examples/opengl/hellogl_es/main.cpp
deleted file mode 100644
index 5693d7ad55..0000000000
--- a/examples/opengl/hellogl_es/main.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include <QMainWindow>
-#include "mainwindow.h"
-
-int main( int argc, char ** argv )
-{
- Q_INIT_RESOURCE(texture);
- QApplication a( argc, argv );
- MainWindow mw;
- mw.showMaximized();
- return a.exec();
-}
diff --git a/examples/opengl/hellogl_es/mainwindow.cpp b/examples/opengl/hellogl_es/mainwindow.cpp
deleted file mode 100644
index cd253fcd19..0000000000
--- a/examples/opengl/hellogl_es/mainwindow.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-
-#include <QApplication>
-#include <QMenuBar>
-#include <QGroupBox>
-#include <QGridLayout>
-#include <QSlider>
-#include <QLabel>
-#include <QTimer>
-
-#include "glwidget.h"
-
-MainWindow::MainWindow()
-{
- GLWidget *glwidget = new GLWidget();
- QLabel *label = new QLabel(this);
- QTimer *timer = new QTimer(this);
- QSlider *slider = new QSlider(this);
- slider->setOrientation(Qt::Horizontal);
-
- slider->setRange(0, 100);
- slider->setSliderPosition(50);
- timer->setInterval(10);
- label->setText("A QGlWidget with OpenGl ES");
- label->setAlignment(Qt::AlignHCenter);
-
- QGroupBox * groupBox = new QGroupBox(this);
- setCentralWidget(groupBox);
- groupBox->setTitle("OpenGL ES Example");
-
- QGridLayout *layout = new QGridLayout(groupBox);
-
- layout->addWidget(glwidget,1,0,8,1);
- layout->addWidget(label,9,0,1,1);
- layout->addWidget(slider, 11,0,1,1);
-
- groupBox->setLayout(layout);
-
- QMenu *fileMenu = new QMenu("File");
- QMenu *helpMenu = new QMenu("Help");
- QMenu *showMenu = new QMenu("Show");
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(showMenu);
- menuBar()->addMenu(helpMenu);
- QAction *exit = new QAction("Exit", fileMenu);
- QAction *aboutQt = new QAction("AboutQt", helpMenu);
- QAction *showLogo = new QAction("Show 3D Logo", showMenu);
- QAction *showTexture = new QAction("Show 2D Texture", showMenu);
- QAction *showBubbles = new QAction("Show bubbles", showMenu);
- showBubbles->setCheckable(true);
- showBubbles->setChecked(true);
- fileMenu->addAction(exit);
- helpMenu->addAction(aboutQt);
- showMenu->addAction(showLogo);
- showMenu->addAction(showTexture);
- showMenu->addAction(showBubbles);
-
- QObject::connect(timer, SIGNAL(timeout()), glwidget, SLOT(updateGL()));
- QObject::connect(exit, SIGNAL(triggered(bool)), this, SLOT(close()));
- QObject::connect(aboutQt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
-
- QObject::connect(showLogo, SIGNAL(triggered(bool)), glwidget, SLOT(setLogo()));
- QObject::connect(showTexture, SIGNAL(triggered(bool)), glwidget, SLOT(setTexture()));
- QObject::connect(showBubbles, SIGNAL(triggered(bool)), glwidget, SLOT(showBubbles(bool)));
- QObject::connect(slider, SIGNAL(valueChanged(int)), glwidget, SLOT(setScaling(int)));
- timer->start();
-}
diff --git a/examples/opengl/hellogl_es/mainwindow.h b/examples/opengl/hellogl_es/mainwindow.h
deleted file mode 100644
index a0a6adfc3c..0000000000
--- a/examples/opengl/hellogl_es/mainwindow.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QMainWindow>
-
-class QSlider;
-class GLWidget;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow();
-
-private:
-};
-
-#endif
diff --git a/examples/opengl/hellogl_es/qt.png b/examples/opengl/hellogl_es/qt.png
deleted file mode 100644
index 79e383cf50..0000000000
--- a/examples/opengl/hellogl_es/qt.png
+++ /dev/null
Binary files differ
diff --git a/examples/opengl/hellogl_es/texture.qrc b/examples/opengl/hellogl_es/texture.qrc
deleted file mode 100644
index ff1d0e535f..0000000000
--- a/examples/opengl/hellogl_es/texture.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>qt.png</file>
-</qresource>
-</RCC>
diff --git a/examples/opengl/hellogl_es2/bubble.cpp b/examples/opengl/hellogl_es2/bubble.cpp
index 167d9abd92..6db14e32bd 100644
--- a/examples/opengl/hellogl_es2/bubble.cpp
+++ b/examples/opengl/hellogl_es2/bubble.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "bubble.h"
diff --git a/examples/opengl/hellogl_es2/hellogl_es2.pro b/examples/opengl/hellogl_es2/hellogl_es2.pro
index 4061a0f678..2eef986ed2 100644
--- a/examples/opengl/hellogl_es2/hellogl_es2.pro
+++ b/examples/opengl/hellogl_es2/hellogl_es2.pro
@@ -17,7 +17,7 @@ HEADERS += mainwindow.h
HEADERS += bubble.h
RESOURCES += texture.qrc
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es2
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
new file mode 100644
index 0000000000..10d9d346a6
--- /dev/null
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -0,0 +1,276 @@
+#include "hellowindow.h"
+
+#include <QOpenGLContext>
+
+#include <QTimer>
+
+#include <qmath.h>
+
+Renderer::Renderer(const QSurfaceFormat &format, Renderer *share)
+ : m_initialized(false)
+ , m_format(format)
+{
+ m_context = new QOpenGLContext(this);
+ m_context->setFormat(format);
+ if (share)
+ m_context->setShareContext(share->m_context);
+ m_context->create();
+}
+
+HelloWindow::HelloWindow(Renderer *renderer)
+ : m_colorIndex(0)
+ , m_renderer(renderer)
+{
+ setSurfaceType(QWindow::OpenGLSurface);
+ setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+
+ setGeometry(QRect(10, 10, 640, 480));
+
+ setFormat(renderer->format());
+
+ create();
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(render()));
+ timer->start(10);
+
+ connect(this, SIGNAL(needRender(QSurface *, const QColor &, const QSize &)),
+ renderer, SLOT(render(QSurface *, const QColor &, const QSize &)));
+
+ updateColor();
+}
+
+void HelloWindow::mousePressEvent(QMouseEvent *)
+{
+ updateColor();
+}
+
+void HelloWindow::render()
+{
+ emit needRender(this, m_color, size());
+}
+
+void HelloWindow::updateColor()
+{
+ QColor colors[] =
+ {
+ QColor(100, 255, 0),
+ QColor(0, 100, 255)
+ };
+
+ m_color = colors[m_colorIndex];
+
+ m_colorIndex++;
+ if (m_colorIndex >= int(sizeof(colors) / sizeof(colors[0])))
+ m_colorIndex = 0;
+}
+
+void Renderer::render(QSurface *surface, const QColor &color, const QSize &viewSize)
+{
+ if (!m_context->makeCurrent(surface))
+ return;
+
+ if (!m_initialized) {
+ initialize();
+ m_initialized = true;
+ }
+
+ glViewport(0, 0, viewSize.width(), viewSize.height());
+
+ glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glFrontFace(GL_CW);
+ glCullFace(GL_FRONT);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ QMatrix4x4 modelview;
+ modelview.rotate(m_fAngle, 0.0f, 1.0f, 0.0f);
+ modelview.rotate(m_fAngle, 1.0f, 0.0f, 0.0f);
+ modelview.rotate(m_fAngle, 0.0f, 0.0f, 1.0f);
+ modelview.translate(0.0f, -0.2f, 0.0f);
+
+ m_program->bind();
+ m_program->setUniformValue(matrixUniform, modelview);
+ m_program->setUniformValue(colorUniform, color);
+ paintQtLogo();
+ m_program->release();
+
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE);
+
+ m_context->swapBuffers(surface);
+
+ m_fAngle += 1.0f;
+}
+
+void Renderer::paintQtLogo()
+{
+ m_program->enableAttributeArray(normalAttr);
+ m_program->enableAttributeArray(vertexAttr);
+ m_program->setAttributeArray(vertexAttr, vertices.constData());
+ m_program->setAttributeArray(normalAttr, normals.constData());
+ glDrawArrays(GL_TRIANGLES, 0, vertices.size());
+ m_program->disableAttributeArray(normalAttr);
+ m_program->disableAttributeArray(vertexAttr);
+}
+
+void Renderer::initialize()
+{
+ glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+
+ QOpenGLShader *vshader = new QOpenGLShader(QOpenGLShader::Vertex, this);
+ const char *vsrc =
+ "attribute highp vec4 vertex;\n"
+ "attribute mediump vec3 normal;\n"
+ "uniform mediump mat4 matrix;\n"
+ "uniform lowp vec4 sourceColor;\n"
+ "varying mediump vec4 color;\n"
+ "void main(void)\n"
+ "{\n"
+ " vec3 toLight = normalize(vec3(0.0, 0.3, 1.0));\n"
+ " float angle = max(dot(normal, toLight), 0.0);\n"
+ " vec3 col = sourceColor.rgb;\n"
+ " color = vec4(col * 0.2 + col * 0.8 * angle, 1.0);\n"
+ " color = clamp(color, 0.0, 1.0);\n"
+ " gl_Position = matrix * vertex;\n"
+ "}\n";
+ vshader->compileSourceCode(vsrc);
+
+ QOpenGLShader *fshader = new QOpenGLShader(QOpenGLShader::Fragment, this);
+ const char *fsrc =
+ "varying mediump vec4 color;\n"
+ "void main(void)\n"
+ "{\n"
+ " gl_FragColor = color;\n"
+ "}\n";
+ fshader->compileSourceCode(fsrc);
+
+ m_program = new QOpenGLShaderProgram;
+ m_program->addShader(vshader);
+ m_program->addShader(fshader);
+ m_program->link();
+
+ vertexAttr = m_program->attributeLocation("vertex");
+ normalAttr = m_program->attributeLocation("normal");
+ matrixUniform = m_program->uniformLocation("matrix");
+ colorUniform = m_program->uniformLocation("sourceColor");
+
+ m_fAngle = 0;
+ createGeometry();
+}
+
+void Renderer::createGeometry()
+{
+ vertices.clear();
+ normals.clear();
+
+ qreal x1 = +0.06f;
+ qreal y1 = -0.14f;
+ qreal x2 = +0.14f;
+ qreal y2 = -0.06f;
+ qreal x3 = +0.08f;
+ qreal y3 = +0.00f;
+ qreal x4 = +0.30f;
+ qreal y4 = +0.22f;
+
+ quad(x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(x3, y3, x4, y4, y4, x4, y3, x3);
+
+ extrude(x1, y1, x2, y2);
+ extrude(x2, y2, y2, x2);
+ extrude(y2, x2, y1, x1);
+ extrude(y1, x1, x1, y1);
+ extrude(x3, y3, x4, y4);
+ extrude(x4, y4, y4, x4);
+ extrude(y4, x4, y3, x3);
+
+ const qreal Pi = 3.14159f;
+ const int NumSectors = 100;
+
+ for (int i = 0; i < NumSectors; ++i) {
+ qreal angle1 = (i * 2 * Pi) / NumSectors;
+ qreal x5 = 0.30 * qSin(angle1);
+ qreal y5 = 0.30 * qCos(angle1);
+ qreal x6 = 0.20 * qSin(angle1);
+ qreal y6 = 0.20 * qCos(angle1);
+
+ qreal angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ qreal x7 = 0.20 * qSin(angle2);
+ qreal y7 = 0.20 * qCos(angle2);
+ qreal x8 = 0.30 * qSin(angle2);
+ qreal y8 = 0.30 * qCos(angle2);
+
+ quad(x5, y5, x6, y6, x7, y7, x8, y8);
+
+ extrude(x6, y6, x7, y7);
+ extrude(x8, y8, x5, y5);
+ }
+
+ for (int i = 0;i < vertices.size();i++)
+ vertices[i] *= 2.0f;
+}
+
+void Renderer::quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
+{
+ vertices << QVector3D(x1, y1, -0.05f);
+ vertices << QVector3D(x2, y2, -0.05f);
+ vertices << QVector3D(x4, y4, -0.05f);
+
+ vertices << QVector3D(x3, y3, -0.05f);
+ vertices << QVector3D(x4, y4, -0.05f);
+ vertices << QVector3D(x2, y2, -0.05f);
+
+ QVector3D n = QVector3D::normal
+ (QVector3D(x2 - x1, y2 - y1, 0.0f), QVector3D(x4 - x1, y4 - y1, 0.0f));
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ vertices << QVector3D(x4, y4, 0.05f);
+ vertices << QVector3D(x2, y2, 0.05f);
+ vertices << QVector3D(x1, y1, 0.05f);
+
+ vertices << QVector3D(x2, y2, 0.05f);
+ vertices << QVector3D(x4, y4, 0.05f);
+ vertices << QVector3D(x3, y3, 0.05f);
+
+ n = QVector3D::normal
+ (QVector3D(x2 - x4, y2 - y4, 0.0f), QVector3D(x1 - x4, y1 - y4, 0.0f));
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ normals << n;
+ normals << n;
+ normals << n;
+}
+
+void Renderer::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
+{
+ vertices << QVector3D(x1, y1, +0.05f);
+ vertices << QVector3D(x2, y2, +0.05f);
+ vertices << QVector3D(x1, y1, -0.05f);
+
+ vertices << QVector3D(x2, y2, -0.05f);
+ vertices << QVector3D(x1, y1, -0.05f);
+ vertices << QVector3D(x2, y2, +0.05f);
+
+ QVector3D n = QVector3D::normal
+ (QVector3D(x2 - x1, y2 - y1, 0.0f), QVector3D(0.0f, 0.0f, -0.1f));
+
+ normals << n;
+ normals << n;
+ normals << n;
+
+ normals << n;
+ normals << n;
+ normals << n;
+}
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
new file mode 100644
index 0000000000..6ff7411251
--- /dev/null
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -0,0 +1,65 @@
+#include <QWindow>
+
+#include <QtGui/qopengl.h>
+#include <QtGui/qopenglshaderprogram.h>
+
+#include <QColor>
+#include <QTime>
+
+class QOpenGLContext;
+
+class Renderer : public QObject
+{
+ Q_OBJECT
+public:
+ Renderer(const QSurfaceFormat &format, Renderer *share = 0);
+
+ QSurfaceFormat format() const { return m_format; }
+
+public slots:
+ void render(QSurface *surface, const QColor &color, const QSize &viewSize);
+
+private:
+ void initialize();
+
+ qreal m_fAngle;
+ bool m_showBubbles;
+ void paintQtLogo();
+ void createGeometry();
+ void createBubbles(int number);
+ void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
+ void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
+ QVector<QVector3D> vertices;
+ QVector<QVector3D> normals;
+ int vertexAttr;
+ int normalAttr;
+ int matrixUniform;
+ int colorUniform;
+
+ bool m_initialized;
+ QSurfaceFormat m_format;
+ QOpenGLContext *m_context;
+ QOpenGLShaderProgram *m_program;
+};
+
+class HelloWindow : public QWindow
+{
+ Q_OBJECT
+public:
+ HelloWindow(Renderer *renderer);
+
+ void updateColor();
+
+signals:
+ void needRender(QSurface *surface, const QColor &color, const QSize &viewSize);
+
+private slots:
+ void render();
+
+private:
+ void mousePressEvent(QMouseEvent *);
+
+ int m_colorIndex;
+ QColor m_color;
+ Renderer *m_renderer;
+};
diff --git a/examples/opengl/hellowindow/hellowindow.pro b/examples/opengl/hellowindow/hellowindow.pro
new file mode 100644
index 0000000000..555dc83574
--- /dev/null
+++ b/examples/opengl/hellowindow/hellowindow.pro
@@ -0,0 +1,18 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Apr 27 16:40:46 2011
+######################################################################
+
+TEMPLATE = app
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += hellowindow.h
+SOURCES += hellowindow.cpp main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellowindow
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellowindow.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellowindow
+INSTALLS += target sources
+
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp
new file mode 100644
index 0000000000..b247807019
--- /dev/null
+++ b/examples/opengl/hellowindow/main.cpp
@@ -0,0 +1,50 @@
+#include <QGuiApplication>
+#include <QScreen>
+#include <QThread>
+
+#include "hellowindow.h"
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ QScreen *screen = QGuiApplication::primaryScreen();
+
+ QRect screenGeometry = screen->availableGeometry();
+
+ QSurfaceFormat format;
+ format.setDepthBufferSize(16);
+ format.setSamples(4);
+
+ QPoint center = QPoint(screenGeometry.center().x(), screenGeometry.top() + 80);
+ QSize windowSize(400, 320);
+ int delta = 40;
+
+ Renderer rendererA(format);
+ Renderer rendererB(format, &rendererA);
+
+ QThread renderThread;
+ rendererB.moveToThread(&renderThread);
+ renderThread.start();
+
+ QObject::connect(qGuiApp, SIGNAL(lastWindowClosed()), &renderThread, SLOT(quit()));
+
+ HelloWindow windowA(&rendererA);
+ windowA.setGeometry(QRect(center, windowSize).translated(-windowSize.width() - delta / 2, 0));
+ windowA.setWindowTitle(QLatin1String("Thread A - Context A"));
+ windowA.setVisible(true);
+
+ HelloWindow windowB(&rendererA);
+ windowB.setGeometry(QRect(center, windowSize).translated(delta / 2, 0));
+ windowB.setWindowTitle(QLatin1String("Thread A - Context A"));
+ windowB.setVisible(true);
+
+ HelloWindow windowC(&rendererB);
+ windowC.setGeometry(QRect(center, windowSize).translated(-windowSize.width() / 2, windowSize.height() + delta));
+ windowC.setWindowTitle(QLatin1String("Thread B - Context B"));
+ windowC.setVisible(true);
+
+ app.exec();
+
+ renderThread.wait();
+}
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index 2a96807102..5502ee270a 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -22,6 +22,11 @@ contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2){
textures
}
+qpa {
+ SUBDIRS += hellowindow
+ SUBDIRS += paintedwindow
+}
+
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro README
@@ -29,4 +34,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/opengl/overpainting/bubble.cpp b/examples/opengl/overpainting/bubble.cpp
index eb315057fa..bb6d2b8070 100644
--- a/examples/opengl/overpainting/bubble.cpp
+++ b/examples/opengl/overpainting/bubble.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "bubble.h"
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp
index ded7bf1cf5..4572e69644 100644
--- a/examples/opengl/overpainting/glwidget.cpp
+++ b/examples/opengl/overpainting/glwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include <stdlib.h>
diff --git a/examples/opengl/overpainting/overpainting.pro b/examples/opengl/overpainting/overpainting.pro
index 6dfcf28ad1..1584c3c3d4 100644
--- a/examples/opengl/overpainting/overpainting.pro
+++ b/examples/opengl/overpainting/overpainting.pro
@@ -1,7 +1,7 @@
VPATH += ../shared
INCLUDEPATH += ../shared
-QT += opengl
+QT += opengl widgets
HEADERS = bubble.h \
glwidget.h \
qtlogo.h
diff --git a/examples/opengl/paintedwindow/main.cpp b/examples/opengl/paintedwindow/main.cpp
new file mode 100644
index 0000000000..345cea7bc5
--- /dev/null
+++ b/examples/opengl/paintedwindow/main.cpp
@@ -0,0 +1,23 @@
+#include <QGuiApplication>
+#include <QRect>
+#include <QScreen>
+
+#include "paintedwindow.h"
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ QScreen *screen = QGuiApplication::primaryScreen();
+
+ QRect screenGeometry = screen->availableGeometry();
+
+ QPoint center = screenGeometry.center();
+ QRect windowRect(0, 0, 640, 480);
+
+ PaintedWindow window;
+ window.setGeometry(QRect(center - windowRect.center(), windowRect.size()));
+ window.show();
+
+ app.exec();
+}
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
new file mode 100644
index 0000000000..9b27c56914
--- /dev/null
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -0,0 +1,53 @@
+#include "paintedwindow.h"
+
+#include <QOpenGLContext>
+#include <QOpenGLPaintDevice>
+#include <QPainter>
+#include <QTimer>
+
+#include <qmath.h>
+
+PaintedWindow::PaintedWindow()
+{
+ QSurfaceFormat format;
+ format.setStencilBufferSize(8);
+ format.setSamples(4);
+
+ setSurfaceType(QWindow::OpenGLSurface);
+ setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+ setFormat(format);
+
+ create();
+
+ m_context = new QOpenGLContext(this);
+ m_context->setFormat(format);
+ m_context->create();
+}
+
+void PaintedWindow::resizeEvent(QResizeEvent *)
+{
+ paint();
+}
+
+void PaintedWindow::exposeEvent(QExposeEvent *)
+{
+ paint();
+}
+
+void PaintedWindow::paint()
+{
+ m_context->makeCurrent(this);
+
+ QPainterPath path;
+ path.addEllipse(0, 0, width(), height());
+
+ QOpenGLPaintDevice device(size());
+
+ QPainter painter(&device);
+ painter.fillRect(0, 0, width(), height(), Qt::white);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.fillPath(path, Qt::blue);
+ painter.end();
+
+ m_context->swapBuffers(this);
+}
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
new file mode 100644
index 0000000000..9da9992a3e
--- /dev/null
+++ b/examples/opengl/paintedwindow/paintedwindow.h
@@ -0,0 +1,26 @@
+#include <QWindow>
+
+#include <QtGui/qopengl.h>
+#include <QtGui/qopenglshaderprogram.h>
+#include <QtGui/qopenglframebufferobject.h>
+
+#include <QColor>
+#include <QTime>
+
+class QOpenGLContext;
+
+class PaintedWindow : public QWindow
+{
+ Q_OBJECT
+public:
+ PaintedWindow();
+
+private slots:
+ void paint();
+
+private:
+ void resizeEvent(QResizeEvent *);
+ void exposeEvent(QExposeEvent *);
+
+ QOpenGLContext *m_context;
+};
diff --git a/examples/opengl/paintedwindow/paintedwindow.pro b/examples/opengl/paintedwindow/paintedwindow.pro
new file mode 100644
index 0000000000..a3ae3bace5
--- /dev/null
+++ b/examples/opengl/paintedwindow/paintedwindow.pro
@@ -0,0 +1,18 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Apr 27 16:40:46 2011
+######################################################################
+
+TEMPLATE = app
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += paintedwindow.h
+SOURCES += paintedwindow.cpp main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/paintedwindow
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS paintedwindow.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/paintedwindow
+INSTALLS += target sources
+
diff --git a/examples/opengl/pbuffers/main.cpp b/examples/opengl/pbuffers/main.cpp
index b4f1512cfe..aac6d1939c 100644
--- a/examples/opengl/pbuffers/main.cpp
+++ b/examples/opengl/pbuffers/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
#include <QtOpenGL/QGLPixelBuffer>
#include "glwidget.h"
diff --git a/examples/opengl/pbuffers/pbuffers.pro b/examples/opengl/pbuffers/pbuffers.pro
index 755ed8c6a8..3264be3cef 100644
--- a/examples/opengl/pbuffers/pbuffers.pro
+++ b/examples/opengl/pbuffers/pbuffers.pro
@@ -4,7 +4,7 @@ SOURCES += glwidget.cpp \
main.cpp \
cube.cpp
RESOURCES += pbuffers.qrc
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/pbuffers
diff --git a/examples/opengl/pbuffers2/main.cpp b/examples/opengl/pbuffers2/main.cpp
index 0abe0b9faa..573b7f2cda 100644
--- a/examples/opengl/pbuffers2/main.cpp
+++ b/examples/opengl/pbuffers2/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
#include "glwidget.h"
int main(int argc, char **argv)
diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro
index d70981879d..9b30d793b8 100644
--- a/examples/opengl/pbuffers2/pbuffers2.pro
+++ b/examples/opengl/pbuffers2/pbuffers2.pro
@@ -6,7 +6,7 @@ TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += .
-QT += opengl svg
+QT += opengl svg widgets
# Input
HEADERS += glwidget.h
diff --git a/examples/opengl/samplebuffers/main.cpp b/examples/opengl/samplebuffers/main.cpp
index 8d4df924dd..c940541327 100644
--- a/examples/opengl/samplebuffers/main.cpp
+++ b/examples/opengl/samplebuffers/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QMessageBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
#include "glwidget.h"
int main(int argc, char **argv)
diff --git a/examples/opengl/samplebuffers/samplebuffers.pro b/examples/opengl/samplebuffers/samplebuffers.pro
index a8938b9dc1..d8f9ff1cd7 100644
--- a/examples/opengl/samplebuffers/samplebuffers.pro
+++ b/examples/opengl/samplebuffers/samplebuffers.pro
@@ -1,7 +1,7 @@
HEADERS += glwidget.h
SOURCES += glwidget.cpp main.cpp
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/samplebuffers
diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp
index b5374c0200..4e74cf9d1d 100644
--- a/examples/opengl/textures/glwidget.cpp
+++ b/examples/opengl/textures/glwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtOpenGL>
#include "glwidget.h"
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index fd9246bef2..86dc889107 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -41,7 +41,7 @@
#ifndef GLWIDGET_H
#define GLWIDGET_H
-#include <QtGui>
+#include <QtWidgets>
#include <QGLWidget>
class QGLShaderProgram;
diff --git a/examples/opengl/textures/textures.pro b/examples/opengl/textures/textures.pro
index 5bb0d5782e..d8941b3890 100644
--- a/examples/opengl/textures/textures.pro
+++ b/examples/opengl/textures/textures.pro
@@ -4,7 +4,7 @@ SOURCES = glwidget.cpp \
main.cpp \
window.cpp
RESOURCES = textures.qrc
-QT += opengl
+QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/textures
diff --git a/examples/opengl/textures/window.cpp b/examples/opengl/textures/window.cpp
index 50f3afecce..16f402efab 100644
--- a/examples/opengl/textures/window.cpp
+++ b/examples/opengl/textures/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "glwidget.h"
#include "window.h"
diff --git a/examples/openvg/README b/examples/openvg/README
deleted file mode 100644
index 3f2a60e9e7..0000000000
--- a/examples/openvg/README
+++ /dev/null
@@ -1,10 +0,0 @@
-Qt provides support for integration with OpenVG implementations on
-platforms with appropriate hardware acceleration.
-
-These examples demonstrate the basic techniques used to take advantage of
-OpenVG in Qt applications. In particular, the "star" example shows how
-to mix QPainter and OpenVG calls in the same paint event.
-
-
-Documentation for these examples can be found via the Examples
-link in the main Qt documentation.
diff --git a/examples/openvg/openvg.desktop b/examples/openvg/openvg.desktop
deleted file mode 100644
index 186699aef1..0000000000
--- a/examples/openvg/openvg.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=OpenVG Star
-Exec=/opt/usr/bin/openvg
-Icon=openvg
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/openvg/openvg.pro b/examples/openvg/openvg.pro
deleted file mode 100644
index f8c982dbfc..0000000000
--- a/examples/openvg/openvg.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = star
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/openvg
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS openvg.pro README
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/openvg
-INSTALLS += target sources
-
diff --git a/examples/openvg/star/main.cpp b/examples/openvg/star/main.cpp
deleted file mode 100644
index 0f3378e881..0000000000
--- a/examples/openvg/star/main.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QApplication>
-#include "starwidget.h"
-
-int main(int argc, char *argv[])
-{
-#ifdef Q_OS_SYMBIAN
- QApplication::setGraphicsSystem("openvg");
-#endif
- QApplication app(argc, argv);
- StarWidget mw;
- mw.show();
- return app.exec();
-}
diff --git a/examples/openvg/star/star.pro b/examples/openvg/star/star.pro
deleted file mode 100644
index 6ae1238536..0000000000
--- a/examples/openvg/star/star.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = app
-TARGET = star
-CONFIG += qt debug warn_on
-QT += openvg
-SOURCES = starwidget.cpp main.cpp
-HEADERS = starwidget.h
-LIBS += $$QMAKE_LIBS_OPENVG \ No newline at end of file
diff --git a/examples/openvg/star/starwidget.cpp b/examples/openvg/star/starwidget.cpp
deleted file mode 100644
index 93438edb1e..0000000000
--- a/examples/openvg/star/starwidget.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "starwidget.h"
-
-StarWidget::StarWidget(QWidget *parent)
- : QWidget(parent)
- , path(VG_INVALID_HANDLE)
- , pen(Qt::red, 4.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)
- , brush(Qt::yellow)
-{
- setMinimumSize(220, 250);
- setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-}
-
-static VGubyte const starSegments[] = {
- VG_MOVE_TO_ABS,
- VG_LINE_TO_REL,
- VG_LINE_TO_REL,
- VG_LINE_TO_REL,
- VG_LINE_TO_REL,
- VG_CLOSE_PATH
-};
-static VGfloat const starCoords[] = {
- 110, 35,
- 50, 160,
- -130, -100,
- 160, 0,
- -130, 100
-};
-
-void StarWidget::paintEvent(QPaintEvent *)
-{
- QPainter painter;
- painter.begin(this);
-
- // Make sure that we are using the OpenVG paint engine.
- if (painter.paintEngine()->type() != QPaintEngine::OpenVG) {
-#ifdef Q_WS_QWS
- qWarning("Not using OpenVG: use the '-display' option to specify an OpenVG driver");
-#else
- qWarning("Not using OpenVG: specify '-graphicssystem OpenVG'");
-#endif
- return;
- }
-
- // Select a pen and a brush for drawing the star.
- painter.setPen(pen);
- painter.setBrush(brush);
-
- // We want the star border to be anti-aliased.
- painter.setRenderHints(QPainter::Antialiasing);
-
- // Flush the state changes to the OpenVG implementation
- // and prepare to perform raw OpenVG calls.
- painter.beginNativePainting();
-
- // Cache the path if we haven't already or if the path has
- // become invalid because the window's context has changed.
- if (path == VG_INVALID_HANDLE || !vgGetPathCapabilities(path)) {
- path = vgCreatePath(VG_PATH_FORMAT_STANDARD,
- VG_PATH_DATATYPE_F,
- 1.0f, // scale
- 0.0f, // bias
- 6, // segmentCapacityHint
- 10, // coordCapacityHint
- VG_PATH_CAPABILITY_ALL);
- vgAppendPathData(path, sizeof(starSegments), starSegments, starCoords);
- }
-
- // Draw the star directly using the OpenVG API.
- vgDrawPath(path, VG_FILL_PATH | VG_STROKE_PATH);
-
- // Restore normal QPainter operations.
- painter.endNativePainting();
-
- painter.end();
-}
diff --git a/examples/openvg/star/starwidget.h b/examples/openvg/star/starwidget.h
deleted file mode 100644
index 70ef5ea1e3..0000000000
--- a/examples/openvg/star/starwidget.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef STARWIDGET_H
-#define STARWIDGET_H
-
-#include <QWidget>
-#include <QPainter>
-#include <QPaintEngine>
-#include "qvg.h"
-
-class StarWidget : public QWidget
-{
- Q_OBJECT
-public:
- StarWidget(QWidget *parent = 0);
- ~StarWidget() {}
-
-protected:
- void paintEvent(QPaintEvent *);
-
-private:
- VGPath path;
- QPen pen;
- QBrush brush;
-};
-
-#endif
diff --git a/examples/painting/affine/affine.pro b/examples/painting/affine/affine.pro
index 817e5829c2..1441811851 100644
--- a/examples/painting/affine/affine.pro
+++ b/examples/painting/affine/affine.pro
@@ -3,7 +3,7 @@ HEADERS += xform.h
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl
+ QT += opengl widgets
}
SHARED_FOLDER = ../shared
diff --git a/examples/painting/basicdrawing/basicdrawing.pro b/examples/painting/basicdrawing/basicdrawing.pro
index 110bf352b2..0e9c699698 100644
--- a/examples/painting/basicdrawing/basicdrawing.pro
+++ b/examples/painting/basicdrawing/basicdrawing.pro
@@ -15,6 +15,7 @@ symbian {
TARGET.UID3 = 0xA000A649
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/painting/basicdrawing/renderarea.cpp b/examples/painting/basicdrawing/renderarea.cpp
index 0906159e0e..87e6c187d3 100644
--- a/examples/painting/basicdrawing/renderarea.cpp
+++ b/examples/painting/basicdrawing/renderarea.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "renderarea.h"
diff --git a/examples/painting/basicdrawing/window.cpp b/examples/painting/basicdrawing/window.cpp
index 072c3e08aa..6f750c45d1 100644
--- a/examples/painting/basicdrawing/window.cpp
+++ b/examples/painting/basicdrawing/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "renderarea.h"
#include "window.h"
diff --git a/examples/painting/composition/composition.pro b/examples/painting/composition/composition.pro
index 3a552955b4..c8e5ab0af3 100644
--- a/examples/painting/composition/composition.pro
+++ b/examples/painting/composition/composition.pro
@@ -8,7 +8,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += composition.qrc
contains(QT_CONFIG, opengl) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl
+ QT += opengl widgets
}
# install
diff --git a/examples/painting/composition/main.cpp b/examples/painting/composition/main.cpp
index d6bc170a97..3c6a16aaf5 100644
--- a/examples/painting/composition/main.cpp
+++ b/examples/painting/composition/main.cpp
@@ -50,9 +50,6 @@ int main(int argc, char **argv)
{
// Q_INIT_RESOURCE(deform);
-#ifdef QT_OPENGL_SUPPORT
- QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
-#endif
QApplication app(argc, argv);
CompositionWidget compWidget(0);
diff --git a/examples/painting/concentriccircles/circlewidget.cpp b/examples/painting/concentriccircles/circlewidget.cpp
index d801710b99..1ffab63944 100644
--- a/examples/painting/concentriccircles/circlewidget.cpp
+++ b/examples/painting/concentriccircles/circlewidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "circlewidget.h"
diff --git a/examples/painting/concentriccircles/concentriccircles.pro b/examples/painting/concentriccircles/concentriccircles.pro
index f4b1979ba9..a889673014 100644
--- a/examples/painting/concentriccircles/concentriccircles.pro
+++ b/examples/painting/concentriccircles/concentriccircles.pro
@@ -14,5 +14,6 @@ symbian {
TARGET.UID3 = 0xA000A64A
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/painting/concentriccircles/window.cpp b/examples/painting/concentriccircles/window.cpp
index a01333be62..c4c5ed8e08 100644
--- a/examples/painting/concentriccircles/window.cpp
+++ b/examples/painting/concentriccircles/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "circlewidget.h"
#include "window.h"
diff --git a/examples/painting/deform/deform.pro b/examples/painting/deform/deform.pro
index 673b2e8288..2bfc5d32cd 100644
--- a/examples/painting/deform/deform.pro
+++ b/examples/painting/deform/deform.pro
@@ -9,7 +9,7 @@ RESOURCES += deform.qrc
contains(QT_CONFIG, opengl) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl
+ QT += opengl widgets
}
# install
diff --git a/examples/painting/fontsampler/fontsampler.pro b/examples/painting/fontsampler/fontsampler.pro
index 6d93d913e8..63892a319a 100644
--- a/examples/painting/fontsampler/fontsampler.pro
+++ b/examples/painting/fontsampler/fontsampler.pro
@@ -10,4 +10,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/fontsampler
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets printsupport
maemo5: CONFIG += qt_example
diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp
index 96698437b1..9efd307f88 100644
--- a/examples/painting/fontsampler/mainwindow.cpp
+++ b/examples/painting/fontsampler/mainwindow.cpp
@@ -38,7 +38,10 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QPrintPreviewDialog>
#include "mainwindow.h"
diff --git a/examples/painting/fontsampler/mainwindow.h b/examples/painting/fontsampler/mainwindow.h
index 4021ee7c6c..1b66c3c370 100644
--- a/examples/painting/fontsampler/mainwindow.h
+++ b/examples/painting/fontsampler/mainwindow.h
@@ -44,6 +44,7 @@
#include "ui_mainwindowbase.h"
QT_BEGIN_NAMESPACE
+class QPrinter;
class QTextEdit;
class QTreeWidget;
class QTreeWidgetItem;
diff --git a/examples/painting/gradients/gradients.h b/examples/painting/gradients/gradients.h
index e1a2bcb41e..3277c4b21d 100644
--- a/examples/painting/gradients/gradients.h
+++ b/examples/painting/gradients/gradients.h
@@ -44,7 +44,7 @@
#include "arthurwidgets.h"
-#include <QtGui>
+#include <QtWidgets>
class HoverPoints;
diff --git a/examples/painting/gradients/gradients.pro b/examples/painting/gradients/gradients.pro
index 22a4baac9e..66f19c0801 100644
--- a/examples/painting/gradients/gradients.pro
+++ b/examples/painting/gradients/gradients.pro
@@ -8,7 +8,7 @@ include($$SHARED_FOLDER/shared.pri)
RESOURCES += gradients.qrc
contains(QT_CONFIG, opengl) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl
+ QT += opengl widgets
}
# install
diff --git a/examples/painting/imagecomposition/imagecomposer.cpp b/examples/painting/imagecomposition/imagecomposer.cpp
index 9488204e30..e0173ff6d6 100644
--- a/examples/painting/imagecomposition/imagecomposer.cpp
+++ b/examples/painting/imagecomposition/imagecomposer.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "imagecomposer.h"
diff --git a/examples/painting/imagecomposition/imagecomposition.pro b/examples/painting/imagecomposition/imagecomposition.pro
index c1bc7d4454..e8841ea770 100644
--- a/examples/painting/imagecomposition/imagecomposition.pro
+++ b/examples/painting/imagecomposition/imagecomposition.pro
@@ -13,5 +13,6 @@ symbian {
TARGET.UID3 = 0xA000A64B
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/painting/painterpaths/painterpaths.pro b/examples/painting/painterpaths/painterpaths.pro
index b4233ccafc..6ead35fe5a 100644
--- a/examples/painting/painterpaths/painterpaths.pro
+++ b/examples/painting/painterpaths/painterpaths.pro
@@ -15,5 +15,6 @@ symbian {
TARGET.UID3 = 0xA000A64C
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/painting/painterpaths/renderarea.cpp b/examples/painting/painterpaths/renderarea.cpp
index 977fe30ed0..9bff70bb41 100644
--- a/examples/painting/painterpaths/renderarea.cpp
+++ b/examples/painting/painterpaths/renderarea.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "renderarea.h"
diff --git a/examples/painting/painterpaths/window.cpp b/examples/painting/painterpaths/window.cpp
index 0a4c1b0ca3..1139ad0258 100644
--- a/examples/painting/painterpaths/window.cpp
+++ b/examples/painting/painterpaths/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/painting/painting.pro b/examples/painting/painting.pro
index 33d9e354ba..263cc7326b 100644
--- a/examples/painting/painting.pro
+++ b/examples/painting/painting.pro
@@ -19,6 +19,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
examples_affine.subdir = affine
diff --git a/examples/painting/pathstroke/pathstroke.h b/examples/painting/pathstroke/pathstroke.h
index f0360b6648..72b897a994 100644
--- a/examples/painting/pathstroke/pathstroke.h
+++ b/examples/painting/pathstroke/pathstroke.h
@@ -43,7 +43,7 @@
#define PATHSTROKE_H
#include "arthurwidgets.h"
-#include <QtGui>
+#include <QtWidgets>
class PathStrokeRenderer : public ArthurFrame
{
diff --git a/examples/painting/pathstroke/pathstroke.pro b/examples/painting/pathstroke/pathstroke.pro
index 1d1efdc342..d3f6596390 100644
--- a/examples/painting/pathstroke/pathstroke.pro
+++ b/examples/painting/pathstroke/pathstroke.pro
@@ -9,7 +9,7 @@ RESOURCES += pathstroke.qrc
contains(QT_CONFIG, opengl) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl
+ QT += opengl widgets
}
# install
diff --git a/examples/painting/shared/arthurwidgets.cpp b/examples/painting/shared/arthurwidgets.cpp
index b3c75f0fc4..c1abc4bbe7 100644
--- a/examples/painting/shared/arthurwidgets.cpp
+++ b/examples/painting/shared/arthurwidgets.cpp
@@ -51,8 +51,6 @@
#include <QTextBrowser>
#include <QBoxLayout>
-#include <private/qpixmapdata_p.h>
-
extern QPixmap cached(const QString &img);
ArthurFrame::ArthurFrame(QWidget *parent)
@@ -83,11 +81,6 @@ ArthurFrame::ArthurFrame(QWidget *parent)
// QPalette pal = palette();
// pal.setBrush(backgroundRole(), m_tile);
// setPalette(pal);
-
-#ifdef Q_WS_X11
- QPixmap xRenderPixmap(1, 1);
- m_prefer_image = xRenderPixmap.pixmapData()->classId() == QPixmapData::X11Class && !xRenderPixmap.x11PictureHandle();
-#endif
}
diff --git a/examples/painting/shared/hoverpoints.h b/examples/painting/shared/hoverpoints.h
index aff5d2ac75..af755a2a50 100644
--- a/examples/painting/shared/hoverpoints.h
+++ b/examples/painting/shared/hoverpoints.h
@@ -42,7 +42,7 @@
#ifndef HOVERPOINTS_H
#define HOVERPOINTS_H
-#include <QtGui>
+#include <QtWidgets>
QT_FORWARD_DECLARE_CLASS(QBypassWidget)
diff --git a/examples/painting/shared/shared.pro b/examples/painting/shared/shared.pro
index e996956880..8fc58ae814 100644
--- a/examples/painting/shared/shared.pro
+++ b/examples/painting/shared/shared.pro
@@ -3,7 +3,7 @@ CONFIG += static
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
DEFINES += QT_OPENGL_SUPPORT
- QT += opengl
+ QT += opengl widgets
}
build_all:!build_pass {
@@ -11,7 +11,7 @@ build_all:!build_pass {
CONFIG += release
}
TARGET = demo_shared
-QT += gui-private
+QT += widgets
SOURCES += \
arthurstyle.cpp\
diff --git a/examples/painting/transformations/renderarea.cpp b/examples/painting/transformations/renderarea.cpp
index 568cfde287..04a6eb511f 100644
--- a/examples/painting/transformations/renderarea.cpp
+++ b/examples/painting/transformations/renderarea.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "renderarea.h"
diff --git a/examples/painting/transformations/transformations.pro b/examples/painting/transformations/transformations.pro
index d9b0215c66..2e76a13c5f 100644
--- a/examples/painting/transformations/transformations.pro
+++ b/examples/painting/transformations/transformations.pro
@@ -14,6 +14,7 @@ symbian {
TARGET.UID3 = 0xA000A64D
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/painting/transformations/window.cpp b/examples/painting/transformations/window.cpp
index fc3bcb856d..24d0a6f5ce 100644
--- a/examples/painting/transformations/window.cpp
+++ b/examples/painting/transformations/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/qmake/precompile/precompile.pro b/examples/qmake/precompile/precompile.pro
index 6360f06f07..828e912aec 100644
--- a/examples/qmake/precompile/precompile.pro
+++ b/examples/qmake/precompile/precompile.pro
@@ -20,3 +20,4 @@ SOURCES = main.cpp \
util.cpp
FORMS = mydialog.ui
#! [0]
+QT += widgets
diff --git a/examples/qpa/qpa.pro b/examples/qpa/qpa.pro
new file mode 100644
index 0000000000..b1b4428c23
--- /dev/null
+++ b/examples/qpa/qpa.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = windows
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qpa
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qpa.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qpa
+INSTALLS += target sources
diff --git a/examples/qpa/windows/main.cpp b/examples/qpa/windows/main.cpp
new file mode 100644
index 0000000000..e4cd14398c
--- /dev/null
+++ b/examples/qpa/windows/main.cpp
@@ -0,0 +1,31 @@
+#include <QGuiApplication>
+#include <QScreen>
+
+#include "window.h"
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ Window a;
+ a.setVisible(true);
+
+ Window b;
+ b.setVisible(true);
+
+ Window child(&b);
+ child.setVisible(true);
+
+ // create one window on each additional screen as well
+
+ QList<QScreen *> screens = app.screens();
+ foreach (QScreen *screen, screens) {
+ if (screen == app.primaryScreen())
+ continue;
+ Window *window = new Window(screen);
+ window->setVisible(true);
+ window->setWindowTitle(screen->name());
+ }
+
+ return app.exec();
+}
diff --git a/examples/qpa/windows/window.cpp b/examples/qpa/windows/window.cpp
new file mode 100644
index 0000000000..fecc22034a
--- /dev/null
+++ b/examples/qpa/windows/window.cpp
@@ -0,0 +1,158 @@
+#include "window.h"
+
+#include <private/qguiapplication_p.h>
+
+#include <QBackingStore>
+#include <QPainter>
+
+static int colorIndexId = 0;
+
+QColor colorTable[] =
+{
+ QColor("#f09f8f"),
+ QColor("#a2bff2"),
+ QColor("#c0ef8f")
+};
+
+Window::Window(QScreen *screen)
+ : QWindow(screen)
+ , m_backgroundColorIndex(colorIndexId++)
+{
+ initialize();
+}
+
+Window::Window(QWindow *parent)
+ : QWindow(parent)
+ , m_backgroundColorIndex(colorIndexId++)
+{
+ initialize();
+}
+
+void Window::initialize()
+{
+ if (parent())
+ setGeometry(QRect(160, 120, 320, 240));
+ else {
+ setGeometry(QRect(10, 10, 640, 480));
+
+ setSizeIncrement(QSize(10, 10));
+ setBaseSize(QSize(640, 480));
+ setMinimumSize(QSize(240, 160));
+ setMaximumSize(QSize(800, 600));
+ }
+
+ create();
+ m_backingStore = new QBackingStore(this);
+
+ m_image = QImage(geometry().size(), QImage::Format_RGB32);
+ m_image.fill(colorTable[m_backgroundColorIndex % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());
+
+ m_lastPos = QPoint(-1, -1);
+ m_renderTimer = 0;
+}
+
+void Window::mousePressEvent(QMouseEvent *event)
+{
+ m_lastPos = event->pos();
+}
+
+void Window::mouseMoveEvent(QMouseEvent *event)
+{
+ if (m_lastPos != QPoint(-1, -1)) {
+ QPainter p(&m_image);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.drawLine(m_lastPos, event->pos());
+ m_lastPos = event->pos();
+ }
+
+ scheduleRender();
+}
+
+void Window::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (m_lastPos != QPoint(-1, -1)) {
+ QPainter p(&m_image);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.drawLine(m_lastPos, event->pos());
+ m_lastPos = QPoint(-1, -1);
+ }
+
+ scheduleRender();
+}
+
+void Window::exposeEvent(QExposeEvent *)
+{
+ scheduleRender();
+}
+
+void Window::resizeEvent(QResizeEvent *)
+{
+ QImage old = m_image;
+
+ int width = qMax(geometry().width(), old.width());
+ int height = qMax(geometry().height(), old.height());
+
+ if (width > old.width() || height > old.height()) {
+ m_image = QImage(width, height, QImage::Format_RGB32);
+ m_image.fill(colorTable[(m_backgroundColorIndex) % (sizeof(colorTable) / sizeof(colorTable[0]))].rgba());
+
+ QPainter p(&m_image);
+ p.drawImage(0, 0, old);
+ }
+
+ render();
+}
+
+void Window::keyPressEvent(QKeyEvent *event)
+{
+ switch (event->key()) {
+ case Qt::Key_Backspace:
+ m_text.chop(1);
+ break;
+ case Qt::Key_Enter:
+ case Qt::Key_Return:
+ m_text.append('\n');
+ break;
+ default:
+ m_text.append(event->text());
+ break;
+ }
+ scheduleRender();
+}
+
+void Window::scheduleRender()
+{
+ if (!m_renderTimer)
+ m_renderTimer = startTimer(1);
+}
+
+void Window::timerEvent(QTimerEvent *)
+{
+ render();
+ killTimer(m_renderTimer);
+ m_renderTimer = 0;
+}
+
+void Window::render()
+{
+ QRect rect(QPoint(), geometry().size());
+ m_backingStore->resize(rect.size());
+
+ m_backingStore->beginPaint(rect);
+
+ QPaintDevice *device = m_backingStore->paintDevice();
+
+ QPainter p(device);
+ p.drawImage(0, 0, m_image);
+
+ QFont font;
+ font.setPixelSize(32);
+
+ p.setFont(font);
+ p.drawText(rect, 0, m_text);
+
+ m_backingStore->endPaint();
+ m_backingStore->flush(rect);
+}
+
+
diff --git a/examples/qpa/windows/window.h b/examples/qpa/windows/window.h
new file mode 100644
index 0000000000..bf664d148e
--- /dev/null
+++ b/examples/qpa/windows/window.h
@@ -0,0 +1,33 @@
+#include <QWindow>
+#include <QImage>
+
+class Window : public QWindow
+{
+public:
+ Window(QWindow *parent = 0);
+ Window(QScreen *screen);
+
+protected:
+ void mousePressEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+
+ void keyPressEvent(QKeyEvent *);
+
+ void exposeEvent(QExposeEvent *);
+ void resizeEvent(QResizeEvent *);
+
+ void timerEvent(QTimerEvent *);
+
+private:
+ void render();
+ void scheduleRender();
+ void initialize();
+
+ QString m_text;
+ QImage m_image;
+ QPoint m_lastPos;
+ int m_backgroundColorIndex;
+ QBackingStore *m_backingStore;
+ int m_renderTimer;
+};
diff --git a/examples/qpa/windows/windows.pro b/examples/qpa/windows/windows.pro
new file mode 100644
index 0000000000..ab59f28a3e
--- /dev/null
+++ b/examples/qpa/windows/windows.pro
@@ -0,0 +1,15 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Apr 27 16:40:46 2011
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG+=console
+QT += gui-private
+QT += core-private
+
+# Input
+HEADERS += window.h
+SOURCES += window.cpp main.cpp
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.h b/examples/qtconcurrent/imagescaling/imagescaling.h
index 096e880b1b..5bc9187dea 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.h
+++ b/examples/qtconcurrent/imagescaling/imagescaling.h
@@ -40,7 +40,7 @@
#ifndef IMAGESCALING_H
#define IMAGESCALING_H
-#include <QtGui>
+#include <QtWidgets>
#ifndef QT_NO_CONCURRENT
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro
index ba1cc04d4f..cb931c7bfb 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.pro
+++ b/examples/qtconcurrent/imagescaling/imagescaling.pro
@@ -15,6 +15,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/imagescaling/main.cpp b/examples/qtconcurrent/imagescaling/main.cpp
index d6ca7e57f0..963422fcb7 100644
--- a/examples/qtconcurrent/imagescaling/main.cpp
+++ b/examples/qtconcurrent/imagescaling/main.cpp
@@ -37,7 +37,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#ifndef QT_NO_CONCURRENT
diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro
index 715df396f3..b5976d6273 100644
--- a/examples/qtconcurrent/map/map.pro
+++ b/examples/qtconcurrent/map/map.pro
@@ -14,6 +14,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/map
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp
index d302366380..8473d05716 100644
--- a/examples/qtconcurrent/progressdialog/main.cpp
+++ b/examples/qtconcurrent/progressdialog/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#ifndef QT_NO_CONCURRENT
diff --git a/examples/qtconcurrent/progressdialog/progressdialog.pro b/examples/qtconcurrent/progressdialog/progressdialog.pro
index afeadd4b27..506a572aa3 100644
--- a/examples/qtconcurrent/progressdialog/progressdialog.pro
+++ b/examples/qtconcurrent/progressdialog/progressdialog.pro
@@ -13,6 +13,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/progressdialog
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro
index 0d5d0c5983..a1594a26a9 100644
--- a/examples/qtconcurrent/qtconcurrent.pro
+++ b/examples/qtconcurrent/qtconcurrent.pro
@@ -15,4 +15,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro
index ae87ffe839..80495e1db2 100644
--- a/examples/qtconcurrent/runfunction/runfunction.pro
+++ b/examples/qtconcurrent/runfunction/runfunction.pro
@@ -13,6 +13,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/runfunction
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro
index 1596e9c1eb..2980792da1 100644
--- a/examples/qtconcurrent/wordcount/wordcount.pro
+++ b/examples/qtconcurrent/wordcount/wordcount.pro
@@ -13,6 +13,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/wordcount
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtestlib/qtestlib.pro b/examples/qtestlib/qtestlib.pro
index a1331bbca0..025c2b5b9e 100644
--- a/examples/qtestlib/qtestlib.pro
+++ b/examples/qtestlib/qtestlib.pro
@@ -8,4 +8,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/qtestlib/tutorial1/tutorial1.pro b/examples/qtestlib/tutorial1/tutorial1.pro
index 54817c0562..ee3d12a1b0 100644
--- a/examples/qtestlib/tutorial1/tutorial1.pro
+++ b/examples/qtestlib/tutorial1/tutorial1.pro
@@ -11,6 +11,7 @@ symbian {
TARGET.UID3 = 0xA000C60B
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/qtestlib/tutorial2/tutorial2.pro b/examples/qtestlib/tutorial2/tutorial2.pro
index 3bb540db8f..d19be2e243 100644
--- a/examples/qtestlib/tutorial2/tutorial2.pro
+++ b/examples/qtestlib/tutorial2/tutorial2.pro
@@ -11,6 +11,7 @@ symbian {
TARGET.UID3 = 0xA000C60C
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/qtestlib/tutorial3/testgui.cpp b/examples/qtestlib/tutorial3/testgui.cpp
index 74b25a8e02..6618d86c14 100644
--- a/examples/qtestlib/tutorial3/testgui.cpp
+++ b/examples/qtestlib/tutorial3/testgui.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
//! [0]
-#include <QtGui>
+#include <QtWidgets>
#include <QtTest/QtTest>
class TestGui: public QObject
diff --git a/examples/qtestlib/tutorial3/tutorial3.pro b/examples/qtestlib/tutorial3/tutorial3.pro
index 2997767543..344b97f481 100644
--- a/examples/qtestlib/tutorial3/tutorial3.pro
+++ b/examples/qtestlib/tutorial3/tutorial3.pro
@@ -11,6 +11,7 @@ symbian {
TARGET.UID3 = 0xA000C60D
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/qtestlib/tutorial4/testgui.cpp b/examples/qtestlib/tutorial4/testgui.cpp
index a1fbbb7d71..66a6cbe7c5 100644
--- a/examples/qtestlib/tutorial4/testgui.cpp
+++ b/examples/qtestlib/tutorial4/testgui.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtTest/QtTest>
//! [0]
diff --git a/examples/qtestlib/tutorial4/tutorial4.pro b/examples/qtestlib/tutorial4/tutorial4.pro
index 9a804369b5..17fa04cf83 100644
--- a/examples/qtestlib/tutorial4/tutorial4.pro
+++ b/examples/qtestlib/tutorial4/tutorial4.pro
@@ -11,6 +11,7 @@ symbian {
TARGET.UID3 = 0xA000C60E
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/qtestlib/tutorial5/benchmarking.cpp b/examples/qtestlib/tutorial5/benchmarking.cpp
index 604eb20a50..f844c2e66c 100644
--- a/examples/qtestlib/tutorial5/benchmarking.cpp
+++ b/examples/qtestlib/tutorial5/benchmarking.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <qtest.h>
class TestBenchmark : public QObject
diff --git a/examples/qtestlib/tutorial5/tutorial5.pro b/examples/qtestlib/tutorial5/tutorial5.pro
index 92b4d683a4..42afe4204c 100644
--- a/examples/qtestlib/tutorial5/tutorial5.pro
+++ b/examples/qtestlib/tutorial5/tutorial5.pro
@@ -11,6 +11,7 @@ symbian {
TARGET.UID3 = 0xA000C60F
CONFIG += qt_example
}
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/qws/dbscreen/dbscreen.pro b/examples/qws/dbscreen/dbscreen.pro
index 61fab76a7b..08d6c41e96 100644
--- a/examples/qws/dbscreen/dbscreen.pro
+++ b/examples/qws/dbscreen/dbscreen.pro
@@ -9,6 +9,7 @@ HEADERS = dbscreen.h
SOURCES = dbscreendriverplugin.cpp \
dbscreen.cpp
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/qws/framebuffer/framebuffer.pro b/examples/qws/framebuffer/framebuffer.pro
index 2dd2c67db7..1d3235087f 100644
--- a/examples/qws/framebuffer/framebuffer.pro
+++ b/examples/qws/framebuffer/framebuffer.pro
@@ -9,6 +9,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/framebuffer
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS framebuffer.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/framebuffer
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/qws/mousecalibration/mousecalibration.pro b/examples/qws/mousecalibration/mousecalibration.pro
index e8f1b6243a..5637e735bc 100644
--- a/examples/qws/mousecalibration/mousecalibration.pro
+++ b/examples/qws/mousecalibration/mousecalibration.pro
@@ -9,6 +9,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/mousecalibration
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/mousecalibration
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/qws/qws.pro b/examples/qws/qws.pro
index 7736625cbe..06e3aa8eba 100644
--- a/examples/qws/qws.pro
+++ b/examples/qws/qws.pro
@@ -7,3 +7,4 @@ SUBDIRS += mousecalibration simpledecoration
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws
INSTALLS += sources
+QT += widgets
diff --git a/examples/qws/simpledecoration/analogclock.cpp b/examples/qws/simpledecoration/analogclock.cpp
index 4a91e0dc0a..c922c9fe18 100644
--- a/examples/qws/simpledecoration/analogclock.cpp
+++ b/examples/qws/simpledecoration/analogclock.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "analogclock.h"
diff --git a/examples/qws/simpledecoration/mydecoration.cpp b/examples/qws/simpledecoration/mydecoration.cpp
index 32db90596e..907fd6d8c2 100644
--- a/examples/qws/simpledecoration/mydecoration.cpp
+++ b/examples/qws/simpledecoration/mydecoration.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mydecoration.h"
/* XPM */
diff --git a/examples/qws/simpledecoration/simpledecoration.pro b/examples/qws/simpledecoration/simpledecoration.pro
index 92f41561f7..e26ffd5ad0 100644
--- a/examples/qws/simpledecoration/simpledecoration.pro
+++ b/examples/qws/simpledecoration/simpledecoration.pro
@@ -10,6 +10,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/simpledecoration
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/simpledecoration
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/qws/svgalib/svgalib.pro b/examples/qws/svgalib/svgalib.pro
index fde16666eb..7d21b181dd 100644
--- a/examples/qws/svgalib/svgalib.pro
+++ b/examples/qws/svgalib/svgalib.pro
@@ -17,6 +17,7 @@ SOURCES = svgalibscreen.cpp \
svgalibpaintdevice.cpp \
svgalibplugin.cpp
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/richtext/calendar/calendar.pro b/examples/richtext/calendar/calendar.pro
index 834b2c1a7e..265e0e94f6 100644
--- a/examples/richtext/calendar/calendar.pro
+++ b/examples/richtext/calendar/calendar.pro
@@ -12,4 +12,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/calendar
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/richtext/calendar/main.cpp b/examples/richtext/calendar/main.cpp
index 9c1141f0d1..fa94aa3ff2 100644
--- a/examples/richtext/calendar/main.cpp
+++ b/examples/richtext/calendar/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/richtext/calendar/mainwindow.cpp b/examples/richtext/calendar/mainwindow.cpp
index 60d7c51595..ff65b7e890 100644
--- a/examples/richtext/calendar/mainwindow.cpp
+++ b/examples/richtext/calendar/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/richtext/orderform/detailsdialog.cpp b/examples/richtext/orderform/detailsdialog.cpp
index b12de14d30..8f54bb2615 100644
--- a/examples/richtext/orderform/detailsdialog.cpp
+++ b/examples/richtext/orderform/detailsdialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "detailsdialog.h"
diff --git a/examples/richtext/orderform/main.cpp b/examples/richtext/orderform/main.cpp
index a89aa76015..7aff81d6ad 100644
--- a/examples/richtext/orderform/main.cpp
+++ b/examples/richtext/orderform/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/richtext/orderform/mainwindow.cpp b/examples/richtext/orderform/mainwindow.cpp
index e08f3ba9d3..e94d4e6316 100644
--- a/examples/richtext/orderform/mainwindow.cpp
+++ b/examples/richtext/orderform/mainwindow.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "detailsdialog.h"
#include "mainwindow.h"
diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro
index a455500bc5..729f66c873 100644
--- a/examples/richtext/orderform/orderform.pro
+++ b/examples/richtext/orderform/orderform.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/orderform
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets printsupport
maemo5: CONFIG += qt_example
diff --git a/examples/richtext/richtext.pro b/examples/richtext/richtext.pro
index 7e2720a2c6..8b36c4ba42 100644
--- a/examples/richtext/richtext.pro
+++ b/examples/richtext/richtext.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/richtext/syntaxhighlighter/highlighter.cpp b/examples/richtext/syntaxhighlighter/highlighter.cpp
index b51aa873a6..d14d0241fe 100644
--- a/examples/richtext/syntaxhighlighter/highlighter.cpp
+++ b/examples/richtext/syntaxhighlighter/highlighter.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "highlighter.h"
diff --git a/examples/richtext/syntaxhighlighter/mainwindow.cpp b/examples/richtext/syntaxhighlighter/mainwindow.cpp
index 0d64489993..298ba3c472 100644
--- a/examples/richtext/syntaxhighlighter/mainwindow.cpp
+++ b/examples/richtext/syntaxhighlighter/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
index c3de7c8baf..9abd82f40a 100644
--- a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
+++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
@@ -17,5 +17,6 @@ wince*: {
addFiles.path = .
DEPLOYMENT += addFiles
}
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/richtext/textedit/textedit.h b/examples/richtext/textedit/textedit.h
index 6436178ab5..ed2057214e 100644
--- a/examples/richtext/textedit/textedit.h
+++ b/examples/richtext/textedit/textedit.h
@@ -52,6 +52,7 @@ QT_FORWARD_DECLARE_CLASS(QFontComboBox)
QT_FORWARD_DECLARE_CLASS(QTextEdit)
QT_FORWARD_DECLARE_CLASS(QTextCharFormat)
QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QPrinter)
class TextEdit : public QMainWindow
{
diff --git a/examples/richtext/textedit/textedit.pro b/examples/richtext/textedit/textedit.pro
index 328de6e51e..b364a00f98 100644
--- a/examples/richtext/textedit/textedit.pro
+++ b/examples/richtext/textedit/textedit.pro
@@ -19,4 +19,5 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.doc images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/textedit
INSTALLS += target sources
+QT += widgets printsupport
symbian: CONFIG += qt_example
diff --git a/examples/scroller/graphicsview/graphicsview.pro b/examples/scroller/graphicsview/graphicsview.pro
index b0b8405293..ccfb82d0ca 100644
--- a/examples/scroller/graphicsview/graphicsview.pro
+++ b/examples/scroller/graphicsview/graphicsview.pro
@@ -6,3 +6,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/scroller/graphicsview
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS graphicsview.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/scroller/graphicsview
INSTALLS += target sources
+QT += widgets
diff --git a/examples/scroller/graphicsview/main.cpp b/examples/scroller/graphicsview/main.cpp
index 738a824269..8f0019a82e 100644
--- a/examples/scroller/graphicsview/main.cpp
+++ b/examples/scroller/graphicsview/main.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#define NUM_ITEMS 100
#define NUM_LISTS 10
diff --git a/examples/scroller/scroller.pro b/examples/scroller/scroller.pro
index bac3f26554..993977d538 100644
--- a/examples/scroller/scroller.pro
+++ b/examples/scroller/scroller.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS += graphicsview
+QT += widgets
diff --git a/examples/sql/books/bookdelegate.cpp b/examples/sql/books/bookdelegate.cpp
index 566dd81928..a4cf5d3a26 100644
--- a/examples/sql/books/bookdelegate.cpp
+++ b/examples/sql/books/bookdelegate.cpp
@@ -41,7 +41,7 @@
#include "bookdelegate.h"
-#include <QtGui>
+#include <QtWidgets>
BookDelegate::BookDelegate(QObject *parent)
: QSqlRelationalDelegate(parent), star(QPixmap(":images/star.png"))
diff --git a/examples/sql/books/books.pro b/examples/sql/books/books.pro
index 42bb2c2ea3..316e2d9372 100644
--- a/examples/sql/books/books.pro
+++ b/examples/sql/books/books.pro
@@ -6,7 +6,7 @@ RESOURCES = books.qrc
SOURCES = bookdelegate.cpp main.cpp bookwindow.cpp
FORMS = bookwindow.ui
-QT += sql
+QT += sql widgets widgets
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/books
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images
diff --git a/examples/sql/books/bookwindow.h b/examples/sql/books/bookwindow.h
index 4cd609650d..781a2f8bb3 100644
--- a/examples/sql/books/bookwindow.h
+++ b/examples/sql/books/bookwindow.h
@@ -42,7 +42,7 @@
#ifndef BOOKWINDOW_H
#define BOOKWINDOW_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include "ui_bookwindow.h"
diff --git a/examples/sql/books/main.cpp b/examples/sql/books/main.cpp
index 45aa8f87cf..e08fb156c3 100644
--- a/examples/sql/books/main.cpp
+++ b/examples/sql/books/main.cpp
@@ -41,7 +41,7 @@
#include "bookwindow.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char * argv[])
{
diff --git a/examples/sql/cachedtable/cachedtable.pro b/examples/sql/cachedtable/cachedtable.pro
index a51dc951a1..9b89a910d8 100644
--- a/examples/sql/cachedtable/cachedtable.pro
+++ b/examples/sql/cachedtable/cachedtable.pro
@@ -2,7 +2,7 @@ HEADERS = ../connection.h \
tableeditor.h
SOURCES = main.cpp \
tableeditor.cpp
-QT += sql
+QT += sql widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/cachedtable
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp
index 083e5abb82..4f90de12e5 100644
--- a/examples/sql/cachedtable/tableeditor.cpp
+++ b/examples/sql/cachedtable/tableeditor.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include "tableeditor.h"
diff --git a/examples/sql/drilldown/drilldown.pro b/examples/sql/drilldown/drilldown.pro
index 272336eb75..8209dd5bd5 100644
--- a/examples/sql/drilldown/drilldown.pro
+++ b/examples/sql/drilldown/drilldown.pro
@@ -7,7 +7,7 @@ SOURCES = imageitem.cpp \
informationwindow.cpp \
main.cpp \
view.cpp
-QT += sql
+QT += sql widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/drilldown
diff --git a/examples/sql/drilldown/imageitem.h b/examples/sql/drilldown/imageitem.h
index 13d99c3846..f2bd27bc9e 100644
--- a/examples/sql/drilldown/imageitem.h
+++ b/examples/sql/drilldown/imageitem.h
@@ -42,7 +42,7 @@
#define IMAGEITEM_H
#include <QtCore>
-#include <QtGui/QGraphicsPixmapItem>
+#include <QtWidgets/QGraphicsPixmapItem>
//! [0]
class ImageItem : public QObject, public QGraphicsPixmapItem
diff --git a/examples/sql/drilldown/informationwindow.h b/examples/sql/drilldown/informationwindow.h
index 354823f152..b5cf25a8e0 100644
--- a/examples/sql/drilldown/informationwindow.h
+++ b/examples/sql/drilldown/informationwindow.h
@@ -41,7 +41,7 @@
#ifndef INFORMATIONWINDOW_H
#define INFORMATIONWINDOW_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
//! [0]
diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp
index 9bfa57cbc9..462eb0face 100644
--- a/examples/sql/drilldown/main.cpp
+++ b/examples/sql/drilldown/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../connection.h"
#include "view.h"
diff --git a/examples/sql/drilldown/view.h b/examples/sql/drilldown/view.h
index 3efe6bb8ce..98855350bd 100644
--- a/examples/sql/drilldown/view.h
+++ b/examples/sql/drilldown/view.h
@@ -41,7 +41,7 @@
#ifndef VIEW_H
#define VIEW_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
class ImageItem;
diff --git a/examples/sql/masterdetail/dialog.h b/examples/sql/masterdetail/dialog.h
index 5495a115b3..e311554597 100644
--- a/examples/sql/masterdetail/dialog.h
+++ b/examples/sql/masterdetail/dialog.h
@@ -41,7 +41,7 @@
#ifndef DIALOG_H
#define DIALOG_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include <QtXml>
diff --git a/examples/sql/masterdetail/main.cpp b/examples/sql/masterdetail/main.cpp
index 55151ebba8..582910873f 100644
--- a/examples/sql/masterdetail/main.cpp
+++ b/examples/sql/masterdetail/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "database.h"
#include "mainwindow.h"
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index 522ee6ce02..77b869e17c 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -41,7 +41,7 @@
#include "mainwindow.h"
#include "dialog.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include <QtXml>
diff --git a/examples/sql/masterdetail/masterdetail.pro b/examples/sql/masterdetail/masterdetail.pro
index 3f00d750a3..fcbc642bed 100644
--- a/examples/sql/masterdetail/masterdetail.pro
+++ b/examples/sql/masterdetail/masterdetail.pro
@@ -6,8 +6,8 @@ SOURCES = dialog.cpp \
main.cpp \
mainwindow.cpp
-QT += sql
-QT += xml
+QT += sql widgets
+QT += xml widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/masterdetail
diff --git a/examples/sql/querymodel/customsqlmodel.cpp b/examples/sql/querymodel/customsqlmodel.cpp
index 5b09dd634b..534707e8e1 100644
--- a/examples/sql/querymodel/customsqlmodel.cpp
+++ b/examples/sql/querymodel/customsqlmodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "customsqlmodel.h"
diff --git a/examples/sql/querymodel/main.cpp b/examples/sql/querymodel/main.cpp
index ac1a33f781..d001fda866 100644
--- a/examples/sql/querymodel/main.cpp
+++ b/examples/sql/querymodel/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../connection.h"
#include "customsqlmodel.h"
diff --git a/examples/sql/querymodel/querymodel.pro b/examples/sql/querymodel/querymodel.pro
index 8b9923197f..8e3db2a768 100644
--- a/examples/sql/querymodel/querymodel.pro
+++ b/examples/sql/querymodel/querymodel.pro
@@ -4,7 +4,7 @@ HEADERS = ../connection.h \
SOURCES = customsqlmodel.cpp \
editablesqlmodel.cpp \
main.cpp
-QT += sql
+QT += sql widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/querymodel
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.cpp b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
index 8b8ceff4d2..3d8d106ed9 100644
--- a/examples/sql/relationaltablemodel/relationaltablemodel.cpp
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include "../connection.h"
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.pro b/examples/sql/relationaltablemodel/relationaltablemodel.pro
index a85bc0fbd7..a8bc4fc7a0 100644
--- a/examples/sql/relationaltablemodel/relationaltablemodel.pro
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.pro
@@ -1,6 +1,6 @@
HEADERS = ../connection.h
SOURCES = relationaltablemodel.cpp
-QT += sql
+QT += sql widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/relationaltablemodel
diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro
index 43f15e57eb..68b54e42ca 100644
--- a/examples/sql/sql.pro
+++ b/examples/sql/sql.pro
@@ -24,4 +24,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql
INSTALLS += sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/sql/sqlbrowser/browser.cpp b/examples/sql/sqlbrowser/browser.cpp
index 1c53743059..67ceefd20b 100644
--- a/examples/sql/sqlbrowser/browser.cpp
+++ b/examples/sql/sqlbrowser/browser.cpp
@@ -42,7 +42,7 @@
#include "browser.h"
#include "qsqlconnectiondialog.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
Browser::Browser(QWidget *parent)
diff --git a/examples/sql/sqlbrowser/connectionwidget.cpp b/examples/sql/sqlbrowser/connectionwidget.cpp
index 936f32f29f..b68a20b309 100644
--- a/examples/sql/sqlbrowser/connectionwidget.cpp
+++ b/examples/sql/sqlbrowser/connectionwidget.cpp
@@ -41,7 +41,7 @@
#include "connectionwidget.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
ConnectionWidget::ConnectionWidget(QWidget *parent)
diff --git a/examples/sql/sqlbrowser/main.cpp b/examples/sql/sqlbrowser/main.cpp
index dc006176b7..6e0b129445 100644
--- a/examples/sql/sqlbrowser/main.cpp
+++ b/examples/sql/sqlbrowser/main.cpp
@@ -42,7 +42,7 @@
#include "browser.h"
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
void addConnectionsFromCommandline(const QStringList &args, Browser *browser)
diff --git a/examples/sql/sqlbrowser/sqlbrowser.pro b/examples/sql/sqlbrowser/sqlbrowser.pro
index 9ec26900ad..73a17b28e7 100644
--- a/examples/sql/sqlbrowser/sqlbrowser.pro
+++ b/examples/sql/sqlbrowser/sqlbrowser.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = sqlbrowser
-QT += sql
+QT += sql widgets
HEADERS = browser.h connectionwidget.h qsqlconnectiondialog.h
SOURCES = main.cpp browser.cpp connectionwidget.cpp qsqlconnectiondialog.cpp
diff --git a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
index a0615bea97..6d2f028d66 100644
--- a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
+++ b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
@@ -1,7 +1,7 @@
HEADERS = window.h
SOURCES = main.cpp \
window.cpp
-QT += sql
+QT += sql widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/sqlwidgetmapper
diff --git a/examples/sql/sqlwidgetmapper/window.cpp b/examples/sql/sqlwidgetmapper/window.cpp
index 23954c95c7..4370f50869 100644
--- a/examples/sql/sqlwidgetmapper/window.cpp
+++ b/examples/sql/sqlwidgetmapper/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include "window.h"
diff --git a/examples/sql/tablemodel/tablemodel.cpp b/examples/sql/tablemodel/tablemodel.cpp
index a107da07b0..e1a11d140f 100644
--- a/examples/sql/tablemodel/tablemodel.cpp
+++ b/examples/sql/tablemodel/tablemodel.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtSql>
#include "../connection.h"
diff --git a/examples/sql/tablemodel/tablemodel.pro b/examples/sql/tablemodel/tablemodel.pro
index 273a428f38..b59507db07 100644
--- a/examples/sql/tablemodel/tablemodel.pro
+++ b/examples/sql/tablemodel/tablemodel.pro
@@ -1,6 +1,6 @@
HEADERS = ../connection.h
SOURCES = tablemodel.cpp
-QT += sql
+QT += sql widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/tablemodel
diff --git a/examples/statemachine/eventtransitions/eventtransitions.pro b/examples/statemachine/eventtransitions/eventtransitions.pro
index 21b2655dd6..374ef3a72f 100644
--- a/examples/statemachine/eventtransitions/eventtransitions.pro
+++ b/examples/statemachine/eventtransitions/eventtransitions.pro
@@ -5,6 +5,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS eventtransitions.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/statemachine/eventtransitions/main.cpp b/examples/statemachine/eventtransitions/main.cpp
index 5c0eb8218b..291c1d441d 100644
--- a/examples/statemachine/eventtransitions/main.cpp
+++ b/examples/statemachine/eventtransitions/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
//! [0]
class Window : public QWidget
diff --git a/examples/statemachine/rogue/main.cpp b/examples/statemachine/rogue/main.cpp
index dc8783c67e..2939e4a7c5 100644
--- a/examples/statemachine/rogue/main.cpp
+++ b/examples/statemachine/rogue/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/statemachine/rogue/movementtransition.h b/examples/statemachine/rogue/movementtransition.h
index be15e38647..f2dcde3375 100644
--- a/examples/statemachine/rogue/movementtransition.h
+++ b/examples/statemachine/rogue/movementtransition.h
@@ -41,7 +41,7 @@
#ifndef MOVEMENTTRANSITION_H
#define MOVEMENTTRANSITION_H
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/examples/statemachine/rogue/rogue.pro b/examples/statemachine/rogue/rogue.pro
index 3596f173ed..001f3e44a3 100644
--- a/examples/statemachine/rogue/rogue.pro
+++ b/examples/statemachine/rogue/rogue.pro
@@ -9,6 +9,7 @@ sources.files = $$SOURCES $$HEADERS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/rogue
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/statemachine/rogue/window.cpp b/examples/statemachine/rogue/window.cpp
index f40b7a020e..fa62362ecc 100644
--- a/examples/statemachine/rogue/window.cpp
+++ b/examples/statemachine/rogue/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
#include "movementtransition.h"
diff --git a/examples/statemachine/statemachine.pro b/examples/statemachine/statemachine.pro
index e5b8b75705..a049316e08 100644
--- a/examples/statemachine/statemachine.pro
+++ b/examples/statemachine/statemachine.pro
@@ -16,3 +16,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS statemachine.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine
INSTALLS += target sources
+QT += widgets
diff --git a/examples/statemachine/trafficlight/main.cpp b/examples/statemachine/trafficlight/main.cpp
index c20e05926f..353dfb721e 100644
--- a/examples/statemachine/trafficlight/main.cpp
+++ b/examples/statemachine/trafficlight/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
//! [0]
class LightWidget : public QWidget
diff --git a/examples/statemachine/trafficlight/trafficlight.pro b/examples/statemachine/trafficlight/trafficlight.pro
index 6ac90991ea..9ea94f75f0 100644
--- a/examples/statemachine/trafficlight/trafficlight.pro
+++ b/examples/statemachine/trafficlight/trafficlight.pro
@@ -5,6 +5,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/trafficlight
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS trafficlight.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/trafficlight
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/statemachine/twowaybutton/main.cpp b/examples/statemachine/twowaybutton/main.cpp
index 47343ce494..3956c2e1c4 100644
--- a/examples/statemachine/twowaybutton/main.cpp
+++ b/examples/statemachine/twowaybutton/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
//! [0]
int main(int argc, char **argv)
diff --git a/examples/statemachine/twowaybutton/twowaybutton.pro b/examples/statemachine/twowaybutton/twowaybutton.pro
index 7dd560a743..3b37be7d9e 100644
--- a/examples/statemachine/twowaybutton/twowaybutton.pro
+++ b/examples/statemachine/twowaybutton/twowaybutton.pro
@@ -5,6 +5,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/twowaybutton
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS twowaybutton.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/twowaybutton
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro
index d0fb4993af..0e053af072 100644
--- a/examples/threads/mandelbrot/mandelbrot.pro
+++ b/examples/threads/mandelbrot/mandelbrot.pro
@@ -13,4 +13,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/mandelbrot
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
index 47eb473425..7cee70f547 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/threads/mandelbrot/renderthread.cpp b/examples/threads/mandelbrot/renderthread.cpp
index da89f99e5c..d4f3b8ad50 100644
--- a/examples/threads/mandelbrot/renderthread.cpp
+++ b/examples/threads/mandelbrot/renderthread.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/threads/queuedcustomtype/queuedcustomtype.pro b/examples/threads/queuedcustomtype/queuedcustomtype.pro
index 3b1097b177..415f4f14dd 100644
--- a/examples/threads/queuedcustomtype/queuedcustomtype.pro
+++ b/examples/threads/queuedcustomtype/queuedcustomtype.pro
@@ -5,6 +5,7 @@ SOURCES = main.cpp \
block.cpp \
renderthread.cpp \
window.cpp
+QT += widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
diff --git a/examples/threads/queuedcustomtype/window.cpp b/examples/threads/queuedcustomtype/window.cpp
index 367b75818f..26a78af969 100644
--- a/examples/threads/queuedcustomtype/window.cpp
+++ b/examples/threads/queuedcustomtype/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
//! [Window constructor start]
diff --git a/examples/threads/threads.pro b/examples/threads/threads.pro
index 7b5eec6851..9bdf900f5b 100644
--- a/examples/threads/threads.pro
+++ b/examples/threads/threads.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/codecs/codecs.pro b/examples/tools/codecs/codecs.pro
index 2e2c9031ed..b906190e0f 100644
--- a/examples/tools/codecs/codecs.pro
+++ b/examples/tools/codecs/codecs.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/codecs
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/codecs/mainwindow.cpp b/examples/tools/codecs/mainwindow.cpp
index 25eda1d2ba..bad23e9531 100644
--- a/examples/tools/codecs/mainwindow.cpp
+++ b/examples/tools/codecs/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "previewform.h"
diff --git a/examples/tools/codecs/previewform.cpp b/examples/tools/codecs/previewform.cpp
index 523be6cb0f..1fc87c978d 100644
--- a/examples/tools/codecs/previewform.cpp
+++ b/examples/tools/codecs/previewform.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "previewform.h"
diff --git a/examples/tools/completer/completer.pro b/examples/tools/completer/completer.pro
index fd288f3b16..2077ebd750 100644
--- a/examples/tools/completer/completer.pro
+++ b/examples/tools/completer/completer.pro
@@ -12,6 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/completer
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/completer/mainwindow.cpp b/examples/tools/completer/mainwindow.cpp
index 8c848615dc..d56ed01108 100644
--- a/examples/tools/completer/mainwindow.cpp
+++ b/examples/tools/completer/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "fsmodel.h"
#include "mainwindow.h"
diff --git a/examples/tools/contiguouscache/contiguouscache.pro b/examples/tools/contiguouscache/contiguouscache.pro
index 1787582a3c..c26f32e3d6 100644
--- a/examples/tools/contiguouscache/contiguouscache.pro
+++ b/examples/tools/contiguouscache/contiguouscache.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/contiguouscache
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS contiguouscache.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/contiguouscache
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tools/customcompleter/customcompleter.pro b/examples/tools/customcompleter/customcompleter.pro
index b28272e2a7..fe417185b9 100644
--- a/examples/tools/customcompleter/customcompleter.pro
+++ b/examples/tools/customcompleter/customcompleter.pro
@@ -12,6 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/customcompleter
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/customcompleter/mainwindow.cpp b/examples/tools/customcompleter/mainwindow.cpp
index c4a7c76e3b..ecb246f15b 100644
--- a/examples/tools/customcompleter/mainwindow.cpp
+++ b/examples/tools/customcompleter/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "textedit.h"
diff --git a/examples/tools/customtype/customtype.pro b/examples/tools/customtype/customtype.pro
index 6ea320f9c3..6542cf5473 100644
--- a/examples/tools/customtype/customtype.pro
+++ b/examples/tools/customtype/customtype.pro
@@ -1,6 +1,7 @@
HEADERS = message.h
SOURCES = main.cpp \
message.cpp
+QT += widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
diff --git a/examples/tools/customtypesending/customtypesending.pro b/examples/tools/customtypesending/customtypesending.pro
index 6bf7d6e74e..4d11497f0b 100644
--- a/examples/tools/customtypesending/customtypesending.pro
+++ b/examples/tools/customtypesending/customtypesending.pro
@@ -3,6 +3,7 @@ HEADERS = message.h \
SOURCES = main.cpp \
message.cpp \
window.cpp
+QT += widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
diff --git a/examples/tools/customtypesending/window.cpp b/examples/tools/customtypesending/window.cpp
index 24845a4279..813fea9b1d 100644
--- a/examples/tools/customtypesending/window.cpp
+++ b/examples/tools/customtypesending/window.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
//! [Window constructor]
diff --git a/examples/tools/echoplugin/echoplugin.pro b/examples/tools/echoplugin/echoplugin.pro
index c59f17d782..66a268f4a0 100644
--- a/examples/tools/echoplugin/echoplugin.pro
+++ b/examples/tools/echoplugin/echoplugin.pro
@@ -11,4 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/echoplugin/echowindow/echowindow.cpp b/examples/tools/echoplugin/echowindow/echowindow.cpp
index 9e6460a3f7..75e9f161b1 100644
--- a/examples/tools/echoplugin/echowindow/echowindow.cpp
+++ b/examples/tools/echoplugin/echowindow/echowindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "echowindow.h"
diff --git a/examples/tools/echoplugin/echowindow/echowindow.pro b/examples/tools/echoplugin/echowindow/echowindow.pro
index c2e9a31ec7..65aa594b99 100644
--- a/examples/tools/echoplugin/echowindow/echowindow.pro
+++ b/examples/tools/echoplugin/echowindow/echowindow.pro
@@ -19,6 +19,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin/echowindow
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/echoplugin/echowindow/main.cpp b/examples/tools/echoplugin/echowindow/main.cpp
index 585c8da6e7..c4659d8813 100644
--- a/examples/tools/echoplugin/echowindow/main.cpp
+++ b/examples/tools/echoplugin/echowindow/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "echowindow.h"
#include "echointerface.h"
diff --git a/examples/tools/echoplugin/plugin/echoplugin.cpp b/examples/tools/echoplugin/plugin/echoplugin.cpp
index 099ab81cb1..daa95aa63c 100644
--- a/examples/tools/echoplugin/plugin/echoplugin.cpp
+++ b/examples/tools/echoplugin/plugin/echoplugin.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "echoplugin.h"
diff --git a/examples/tools/echoplugin/plugin/plugin.pro b/examples/tools/echoplugin/plugin/plugin.pro
index 76bfebeafa..1d98c67698 100644
--- a/examples/tools/echoplugin/plugin/plugin.pro
+++ b/examples/tools/echoplugin/plugin/plugin.pro
@@ -19,6 +19,9 @@ symbian {
TARGET.EPOCALLOWDLLDATA = 1
}
+symbian:TARGET.EPOCALLOWDLLDATA = 1
+QT += widgets
+symbian:TARGET.EPOCALLOWDLLDATA = 1
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)
diff --git a/examples/tools/i18n/i18n.pro b/examples/tools/i18n/i18n.pro
index 366bc4c327..e315c981cc 100644
--- a/examples/tools/i18n/i18n.pro
+++ b/examples/tools/i18n/i18n.pro
@@ -26,6 +26,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/i18n
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/i18n/languagechooser.cpp b/examples/tools/i18n/languagechooser.cpp
index 888e6aca83..1c03453793 100644
--- a/examples/tools/i18n/languagechooser.cpp
+++ b/examples/tools/i18n/languagechooser.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "languagechooser.h"
#include "mainwindow.h"
diff --git a/examples/tools/i18n/mainwindow.cpp b/examples/tools/i18n/mainwindow.cpp
index 8e1b14160f..34fd99d868 100644
--- a/examples/tools/i18n/mainwindow.cpp
+++ b/examples/tools/i18n/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/tools/inputpanel/inputpanel.pro b/examples/tools/inputpanel/inputpanel.pro
index f51dad41ba..370ac5da54 100644
--- a/examples/tools/inputpanel/inputpanel.pro
+++ b/examples/tools/inputpanel/inputpanel.pro
@@ -15,6 +15,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/inputpanel
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/inputpanel/main.cpp b/examples/tools/inputpanel/main.cpp
index 2760e98d79..9d0c350faa 100644
--- a/examples/tools/inputpanel/main.cpp
+++ b/examples/tools/inputpanel/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QWidget>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
//! [main]
#include "myinputpanelcontext.h"
diff --git a/examples/tools/inputpanel/myinputpanel.h b/examples/tools/inputpanel/myinputpanel.h
index c1d5d1ff25..0d11e9c038 100644
--- a/examples/tools/inputpanel/myinputpanel.h
+++ b/examples/tools/inputpanel/myinputpanel.h
@@ -41,7 +41,7 @@
#ifndef MYINPUTPANEL_H
#define MYINPUTPANEL_H
-#include <QtGui>
+#include <QtWidgets>
#include <QtCore>
#include "ui_myinputpanelform.h"
diff --git a/examples/tools/inputpanel/myinputpanelcontext.h b/examples/tools/inputpanel/myinputpanelcontext.h
index bb40e211a7..e69a496040 100644
--- a/examples/tools/inputpanel/myinputpanelcontext.h
+++ b/examples/tools/inputpanel/myinputpanelcontext.h
@@ -41,7 +41,7 @@
#ifndef MYINPUTPANELCONTEXT_H
#define MYINPUTPANELCONTEXT_H
-#include <QtGui/QInputContext>
+#include <QtWidgets/QInputContext>
#include "myinputpanel.h"
diff --git a/examples/tools/plugandpaint/plugandpaint.pro b/examples/tools/plugandpaint/plugandpaint.pro
index e2966de5a3..d2ab1bad45 100644
--- a/examples/tools/plugandpaint/plugandpaint.pro
+++ b/examples/tools/plugandpaint/plugandpaint.pro
@@ -26,6 +26,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaint
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/plugandpaintplugins/basictools/basictools.pro b/examples/tools/plugandpaintplugins/basictools/basictools.pro
index 7289522cbe..2b2f45ae60 100644
--- a/examples/tools/plugandpaintplugins/basictools/basictools.pro
+++ b/examples/tools/plugandpaintplugins/basictools/basictools.pro
@@ -15,4 +15,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins/basictoo
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
index a35dae7ab9..3e0af26efa 100644
--- a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
+++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
#include <stdlib.h>
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
index 88bf7b1aa3..434de1a5e3 100644
--- a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
@@ -17,4 +17,5 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
symbian:TARGET.EPOCALLOWDLLDATA = 1
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
index 9f8ca48650..e58fde2205 100644
--- a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
#include <stdlib.h>
diff --git a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
index eda965fe95..deda635b89 100644
--- a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
+++ b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/regexp/regexp.pro b/examples/tools/regexp/regexp.pro
index 0e84510305..62ae570ef1 100644
--- a/examples/tools/regexp/regexp.pro
+++ b/examples/tools/regexp/regexp.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/regexp
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/regexp/regexpdialog.cpp b/examples/tools/regexp/regexpdialog.cpp
index 583c384bdd..b9468bd49f 100644
--- a/examples/tools/regexp/regexpdialog.cpp
+++ b/examples/tools/regexp/regexpdialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "regexpdialog.h"
diff --git a/examples/tools/settingseditor/locationdialog.cpp b/examples/tools/settingseditor/locationdialog.cpp
index 6ebf56682c..dcf190363a 100644
--- a/examples/tools/settingseditor/locationdialog.cpp
+++ b/examples/tools/settingseditor/locationdialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "locationdialog.h"
diff --git a/examples/tools/settingseditor/mainwindow.cpp b/examples/tools/settingseditor/mainwindow.cpp
index 4b8bc4e2b8..6b875f3a24 100644
--- a/examples/tools/settingseditor/mainwindow.cpp
+++ b/examples/tools/settingseditor/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "locationdialog.h"
#include "mainwindow.h"
diff --git a/examples/tools/settingseditor/settingseditor.pro b/examples/tools/settingseditor/settingseditor.pro
index ca9e2cae19..788b4def0b 100644
--- a/examples/tools/settingseditor/settingseditor.pro
+++ b/examples/tools/settingseditor/settingseditor.pro
@@ -15,6 +15,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/settingseditor
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/settingseditor/settingstree.cpp b/examples/tools/settingseditor/settingstree.cpp
index 1fd80d756b..892cb30590 100644
--- a/examples/tools/settingseditor/settingstree.cpp
+++ b/examples/tools/settingseditor/settingstree.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "settingstree.h"
#include "variantdelegate.h"
diff --git a/examples/tools/settingseditor/variantdelegate.cpp b/examples/tools/settingseditor/variantdelegate.cpp
index 5827b8447f..e4b532f9fe 100644
--- a/examples/tools/settingseditor/variantdelegate.cpp
+++ b/examples/tools/settingseditor/variantdelegate.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "variantdelegate.h"
diff --git a/examples/tools/styleplugin/plugin/plugin.pro b/examples/tools/styleplugin/plugin/plugin.pro
index cdcac47591..55ea4e4bba 100644
--- a/examples/tools/styleplugin/plugin/plugin.pro
+++ b/examples/tools/styleplugin/plugin/plugin.pro
@@ -23,4 +23,5 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
symbian:TARGET.EPOCALLOWDLLDATA = 1
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/styleplugin/plugin/simplestyle.cpp b/examples/tools/styleplugin/plugin/simplestyle.cpp
index ea672166e2..d897f3a39b 100644
--- a/examples/tools/styleplugin/plugin/simplestyle.cpp
+++ b/examples/tools/styleplugin/plugin/simplestyle.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "simplestyle.h"
diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
index 28dbe5c857..d5acd08206 100644
--- a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
+++ b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "simplestyleplugin.h"
#include "simplestyle.h"
diff --git a/examples/tools/styleplugin/styleplugin.pro b/examples/tools/styleplugin/styleplugin.pro
index 90a36b8c50..6d8c09ffbb 100644
--- a/examples/tools/styleplugin/styleplugin.pro
+++ b/examples/tools/styleplugin/styleplugin.pro
@@ -9,4 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/styleplugin/stylewindow/main.cpp b/examples/tools/styleplugin/stylewindow/main.cpp
index 1cf42aa86d..da6e218000 100644
--- a/examples/tools/styleplugin/stylewindow/main.cpp
+++ b/examples/tools/styleplugin/stylewindow/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "stylewindow.h"
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.cpp b/examples/tools/styleplugin/stylewindow/stylewindow.cpp
index eb2e3c3007..3a4da98494 100644
--- a/examples/tools/styleplugin/stylewindow/stylewindow.cpp
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "stylewindow.h"
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.pro b/examples/tools/styleplugin/stylewindow/stylewindow.pro
index 556bc1de75..cdbe9f6553 100644
--- a/examples/tools/styleplugin/stylewindow/stylewindow.pro
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.pro
@@ -17,4 +17,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin/stylewindow
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro
index c6e0250934..cfab2f9def 100644
--- a/examples/tools/tools.pro
+++ b/examples/tools/tools.pro
@@ -25,4 +25,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp
index 3f832fa6ec..6d8c7aec80 100644
--- a/examples/tools/treemodelcompleter/mainwindow.cpp
+++ b/examples/tools/treemodelcompleter/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "treemodelcompleter.h"
#include "mainwindow.h"
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.pro b/examples/tools/treemodelcompleter/treemodelcompleter.pro
index fbb4d7cfd7..c64b44be8f 100644
--- a/examples/tools/treemodelcompleter/treemodelcompleter.pro
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.pro
@@ -12,6 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/treemodelcompleter
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tools/undo/undo.pro b/examples/tools/undo/undo.pro
index 0c7c40dd5f..ace6e49e8a 100644
--- a/examples/tools/undo/undo.pro
+++ b/examples/tools/undo/undo.pro
@@ -15,4 +15,5 @@ sources.files = $$SOURCES $$HEADERS *.pro icons $$RESOURCES $$FORMS
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/undo
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
diff --git a/examples/tools/undoframework/commands.cpp b/examples/tools/undoframework/commands.cpp
index ff7b0b7f1d..03f8b98d74 100644
--- a/examples/tools/undoframework/commands.cpp
+++ b/examples/tools/undoframework/commands.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "commands.h"
#include "diagramitem.h"
diff --git a/examples/tools/undoframework/diagramitem.cpp b/examples/tools/undoframework/diagramitem.cpp
index 3e896f3926..815c8dd69e 100644
--- a/examples/tools/undoframework/diagramitem.cpp
+++ b/examples/tools/undoframework/diagramitem.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "diagramitem.h"
diff --git a/examples/tools/undoframework/diagramscene.cpp b/examples/tools/undoframework/diagramscene.cpp
index 7ffd2db3ac..c60ccc915b 100644
--- a/examples/tools/undoframework/diagramscene.cpp
+++ b/examples/tools/undoframework/diagramscene.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "diagramscene.h"
#include "diagramitem.h"
diff --git a/examples/tools/undoframework/main.cpp b/examples/tools/undoframework/main.cpp
index abfa0aa462..385311cb1d 100644
--- a/examples/tools/undoframework/main.cpp
+++ b/examples/tools/undoframework/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
index 72c9cc14f4..52a2cffac3 100644
--- a/examples/tools/undoframework/mainwindow.cpp
+++ b/examples/tools/undoframework/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "diagramscene.h"
diff --git a/examples/tools/undoframework/undoframework.pro b/examples/tools/undoframework/undoframework.pro
index f8f127c8ce..a356ce935e 100644
--- a/examples/tools/undoframework/undoframework.pro
+++ b/examples/tools/undoframework/undoframework.pro
@@ -16,6 +16,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/undoframework
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/touch/dials/dials.pro b/examples/touch/dials/dials.pro
index 30377c76f1..0836c741ab 100644
--- a/examples/touch/dials/dials.pro
+++ b/examples/touch/dials/dials.pro
@@ -6,6 +6,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/dials
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dials.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/dials
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/touch/fingerpaint/fingerpaint.pro b/examples/touch/fingerpaint/fingerpaint.pro
index 2b0d9c5ac1..2d11eb7da7 100644
--- a/examples/touch/fingerpaint/fingerpaint.pro
+++ b/examples/touch/fingerpaint/fingerpaint.pro
@@ -9,6 +9,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fingerpaint.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
INSTALLS += target sources
+QT += widgets printsupport
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/touch/fingerpaint/mainwindow.cpp b/examples/touch/fingerpaint/mainwindow.cpp
index 37b7ed73f4..8388522432 100644
--- a/examples/touch/fingerpaint/mainwindow.cpp
+++ b/examples/touch/fingerpaint/mainwindow.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
#include "scribblearea.h"
diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp
index f66e61cfd3..a83a9f3f1d 100644
--- a/examples/touch/fingerpaint/scribblearea.cpp
+++ b/examples/touch/fingerpaint/scribblearea.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
+#include <QPrinter>
+#include <QPrintDialog>
#include "scribblearea.h"
diff --git a/examples/touch/knobs/knobs.pro b/examples/touch/knobs/knobs.pro
index f53a9d2a1b..caa3af098c 100644
--- a/examples/touch/knobs/knobs.pro
+++ b/examples/touch/knobs/knobs.pro
@@ -6,6 +6,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/knobs
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS knobs.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/knobs
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/touch/pinchzoom/main.cpp b/examples/touch/pinchzoom/main.cpp
index defe0028af..bf8528c1e4 100644
--- a/examples/touch/pinchzoom/main.cpp
+++ b/examples/touch/pinchzoom/main.cpp
@@ -41,7 +41,7 @@
#include "graphicsview.h"
#include "mouse.h"
-#include <QtGui>
+#include <QtWidgets>
#include <math.h>
diff --git a/examples/touch/pinchzoom/pinchzoom.pro b/examples/touch/pinchzoom/pinchzoom.pro
index e038456aa7..f4145dbdfd 100644
--- a/examples/touch/pinchzoom/pinchzoom.pro
+++ b/examples/touch/pinchzoom/pinchzoom.pro
@@ -14,6 +14,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/pinchzoom
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS pinchzoom.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/pinchzoom
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/touch/touch.pro b/examples/touch/touch.pro
index d5983eb581..515b480f86 100644
--- a/examples/touch/touch.pro
+++ b/examples/touch/touch.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = pinchzoom fingerpaint knobs dials
+QT += widgets
diff --git a/examples/tutorials/addressbook-fr/addressbook-fr.pro b/examples/tutorials/addressbook-fr/addressbook-fr.pro
index 279998b5ad..0ee8387437 100644
--- a/examples/tutorials/addressbook-fr/addressbook-fr.pro
+++ b/examples/tutorials/addressbook-fr/addressbook-fr.pro
@@ -6,4 +6,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook-fr
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS addressbook-fr.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook-fr
INSTALLS += target sources
+QT += widgets
diff --git a/examples/tutorials/addressbook-fr/part1/addressbook.cpp b/examples/tutorials/addressbook-fr/part1/addressbook.cpp
index 7ff4c9ea79..372aa43ed0 100644
--- a/examples/tutorials/addressbook-fr/part1/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part1/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
//! [constructor and input fields]
diff --git a/examples/tutorials/addressbook-fr/part1/main.cpp b/examples/tutorials/addressbook-fr/part1/main.cpp
index 970921d537..a17c894a4b 100644
--- a/examples/tutorials/addressbook-fr/part1/main.cpp
+++ b/examples/tutorials/addressbook-fr/part1/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
//! [main function]
diff --git a/examples/tutorials/addressbook-fr/part1/part1.pro b/examples/tutorials/addressbook-fr/part1/part1.pro
index 1b1bd7b0f4..9d99ec6852 100644
--- a/examples/tutorials/addressbook-fr/part1/part1.pro
+++ b/examples/tutorials/addressbook-fr/part1/part1.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.cpp b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
index 36023c850a..04d4b2c693 100644
--- a/examples/tutorials/addressbook-fr/part2/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part2/main.cpp b/examples/tutorials/addressbook-fr/part2/main.cpp
index 970921d537..a17c894a4b 100644
--- a/examples/tutorials/addressbook-fr/part2/main.cpp
+++ b/examples/tutorials/addressbook-fr/part2/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
//! [main function]
diff --git a/examples/tutorials/addressbook-fr/part2/part2.pro b/examples/tutorials/addressbook-fr/part2/part2.pro
index 204cc2db58..faa54f8b51 100644
--- a/examples/tutorials/addressbook-fr/part2/part2.pro
+++ b/examples/tutorials/addressbook-fr/part2/part2.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part2.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
index 47d312e7ac..ee57b19b08 100644
--- a/examples/tutorials/addressbook-fr/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part3/main.cpp b/examples/tutorials/addressbook-fr/part3/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook-fr/part3/main.cpp
+++ b/examples/tutorials/addressbook-fr/part3/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook-fr/part3/part3.pro b/examples/tutorials/addressbook-fr/part3/part3.pro
index 10193b8b30..1f01b8ac29 100644
--- a/examples/tutorials/addressbook-fr/part3/part3.pro
+++ b/examples/tutorials/addressbook-fr/part3/part3.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part3.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.cpp b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
index e88ab6a8e2..047bc6e05c 100644
--- a/examples/tutorials/addressbook-fr/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part4/main.cpp b/examples/tutorials/addressbook-fr/part4/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook-fr/part4/main.cpp
+++ b/examples/tutorials/addressbook-fr/part4/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook-fr/part4/part4.pro b/examples/tutorials/addressbook-fr/part4/part4.pro
index 82765821c6..312f183c74 100644
--- a/examples/tutorials/addressbook-fr/part4/part4.pro
+++ b/examples/tutorials/addressbook-fr/part4/part4.pro
@@ -7,6 +7,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part4.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.cpp b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
index 471ffa3663..3f381766c6 100644
--- a/examples/tutorials/addressbook-fr/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part5/finddialog.cpp b/examples/tutorials/addressbook-fr/part5/finddialog.cpp
index 03d4abf1ac..5bba3afd94 100644
--- a/examples/tutorials/addressbook-fr/part5/finddialog.cpp
+++ b/examples/tutorials/addressbook-fr/part5/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
//! [constructor]
diff --git a/examples/tutorials/addressbook-fr/part5/main.cpp b/examples/tutorials/addressbook-fr/part5/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook-fr/part5/main.cpp
+++ b/examples/tutorials/addressbook-fr/part5/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook-fr/part5/part5.pro b/examples/tutorials/addressbook-fr/part5/part5.pro
index efb36fa907..34f9b56d7f 100644
--- a/examples/tutorials/addressbook-fr/part5/part5.pro
+++ b/examples/tutorials/addressbook-fr/part5/part5.pro
@@ -9,6 +9,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part5.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.cpp b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
index a085ab3bed..354b482742 100644
--- a/examples/tutorials/addressbook-fr/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part6/finddialog.cpp b/examples/tutorials/addressbook-fr/part6/finddialog.cpp
index 9e4342a590..86d4df9227 100644
--- a/examples/tutorials/addressbook-fr/part6/finddialog.cpp
+++ b/examples/tutorials/addressbook-fr/part6/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
FindDialog::FindDialog(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part6/main.cpp b/examples/tutorials/addressbook-fr/part6/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook-fr/part6/main.cpp
+++ b/examples/tutorials/addressbook-fr/part6/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook-fr/part6/part6.pro b/examples/tutorials/addressbook-fr/part6/part6.pro
index 4ece4d7280..81ec20fffe 100644
--- a/examples/tutorials/addressbook-fr/part6/part6.pro
+++ b/examples/tutorials/addressbook-fr/part6/part6.pro
@@ -9,6 +9,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part6.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
index 68a4b4cc85..73ec3dcf23 100644
--- a/examples/tutorials/addressbook-fr/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part7/finddialog.cpp b/examples/tutorials/addressbook-fr/part7/finddialog.cpp
index 9e4342a590..86d4df9227 100644
--- a/examples/tutorials/addressbook-fr/part7/finddialog.cpp
+++ b/examples/tutorials/addressbook-fr/part7/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
FindDialog::FindDialog(QWidget *parent)
diff --git a/examples/tutorials/addressbook-fr/part7/main.cpp b/examples/tutorials/addressbook-fr/part7/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook-fr/part7/main.cpp
+++ b/examples/tutorials/addressbook-fr/part7/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook-fr/part7/part7.pro b/examples/tutorials/addressbook-fr/part7/part7.pro
index 9ba980755b..921c313654 100644
--- a/examples/tutorials/addressbook-fr/part7/part7.pro
+++ b/examples/tutorials/addressbook-fr/part7/part7.pro
@@ -9,6 +9,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part7.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
INSTALLS += target sources
+QT += widgets
symbian: CONFIG += qt_example
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook/addressbook.pro b/examples/tutorials/addressbook/addressbook.pro
index e549844be6..09972a92cc 100644
--- a/examples/tutorials/addressbook/addressbook.pro
+++ b/examples/tutorials/addressbook/addressbook.pro
@@ -8,4 +8,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook/part1/addressbook.cpp b/examples/tutorials/addressbook/part1/addressbook.cpp
index 7ff4c9ea79..372aa43ed0 100644
--- a/examples/tutorials/addressbook/part1/addressbook.cpp
+++ b/examples/tutorials/addressbook/part1/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
//! [constructor and input fields]
diff --git a/examples/tutorials/addressbook/part1/main.cpp b/examples/tutorials/addressbook/part1/main.cpp
index 970921d537..a17c894a4b 100644
--- a/examples/tutorials/addressbook/part1/main.cpp
+++ b/examples/tutorials/addressbook/part1/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
//! [main function]
diff --git a/examples/tutorials/addressbook/part1/part1.pro b/examples/tutorials/addressbook/part1/part1.pro
index 1b1bd7b0f4..ba236a146d 100644
--- a/examples/tutorials/addressbook/part1/part1.pro
+++ b/examples/tutorials/addressbook/part1/part1.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/addressbook/part2/addressbook.cpp b/examples/tutorials/addressbook/part2/addressbook.cpp
index 5fccd12b8e..a7d50017c6 100644
--- a/examples/tutorials/addressbook/part2/addressbook.cpp
+++ b/examples/tutorials/addressbook/part2/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part2/main.cpp b/examples/tutorials/addressbook/part2/main.cpp
index 970921d537..a17c894a4b 100644
--- a/examples/tutorials/addressbook/part2/main.cpp
+++ b/examples/tutorials/addressbook/part2/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
//! [main function]
diff --git a/examples/tutorials/addressbook/part2/part2.pro b/examples/tutorials/addressbook/part2/part2.pro
index 204cc2db58..fc8ba7b148 100644
--- a/examples/tutorials/addressbook/part2/part2.pro
+++ b/examples/tutorials/addressbook/part2/part2.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index 72ca52b199..b539c01776 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part3/main.cpp b/examples/tutorials/addressbook/part3/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook/part3/main.cpp
+++ b/examples/tutorials/addressbook/part3/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook/part3/part3.pro b/examples/tutorials/addressbook/part3/part3.pro
index 10193b8b30..38c1d6ea4b 100644
--- a/examples/tutorials/addressbook/part3/part3.pro
+++ b/examples/tutorials/addressbook/part3/part3.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index bbb5e03987..d82dda74c4 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part4/main.cpp b/examples/tutorials/addressbook/part4/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook/part4/main.cpp
+++ b/examples/tutorials/addressbook/part4/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook/part4/part4.pro b/examples/tutorials/addressbook/part4/part4.pro
index 82765821c6..9ca4efb124 100644
--- a/examples/tutorials/addressbook/part4/part4.pro
+++ b/examples/tutorials/addressbook/part4/part4.pro
@@ -9,6 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
index 7489e7c9db..6342db3f8d 100644
--- a/examples/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part5/finddialog.cpp b/examples/tutorials/addressbook/part5/finddialog.cpp
index 03d4abf1ac..5bba3afd94 100644
--- a/examples/tutorials/addressbook/part5/finddialog.cpp
+++ b/examples/tutorials/addressbook/part5/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
//! [constructor]
diff --git a/examples/tutorials/addressbook/part5/main.cpp b/examples/tutorials/addressbook/part5/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook/part5/main.cpp
+++ b/examples/tutorials/addressbook/part5/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook/part5/part5.pro b/examples/tutorials/addressbook/part5/part5.pro
index efb36fa907..7d6279557f 100644
--- a/examples/tutorials/addressbook/part5/part5.pro
+++ b/examples/tutorials/addressbook/part5/part5.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
index c7dc8e219b..20425d15c2 100644
--- a/examples/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part6/finddialog.cpp b/examples/tutorials/addressbook/part6/finddialog.cpp
index 9e4342a590..86d4df9227 100644
--- a/examples/tutorials/addressbook/part6/finddialog.cpp
+++ b/examples/tutorials/addressbook/part6/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
FindDialog::FindDialog(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part6/main.cpp b/examples/tutorials/addressbook/part6/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook/part6/main.cpp
+++ b/examples/tutorials/addressbook/part6/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook/part6/part6.pro b/examples/tutorials/addressbook/part6/part6.pro
index 4ece4d7280..c9fcb87d91 100644
--- a/examples/tutorials/addressbook/part6/part6.pro
+++ b/examples/tutorials/addressbook/part6/part6.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
index 501ad31c5c..88847f2ea0 100644
--- a/examples/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
AddressBook::AddressBook(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part7/finddialog.cpp b/examples/tutorials/addressbook/part7/finddialog.cpp
index 9e4342a590..86d4df9227 100644
--- a/examples/tutorials/addressbook/part7/finddialog.cpp
+++ b/examples/tutorials/addressbook/part7/finddialog.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "finddialog.h"
FindDialog::FindDialog(QWidget *parent)
diff --git a/examples/tutorials/addressbook/part7/main.cpp b/examples/tutorials/addressbook/part7/main.cpp
index 2c92e255b8..15991677c2 100644
--- a/examples/tutorials/addressbook/part7/main.cpp
+++ b/examples/tutorials/addressbook/part7/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "addressbook.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/addressbook/part7/part7.pro b/examples/tutorials/addressbook/part7/part7.pro
index 9ba980755b..a9183443ff 100644
--- a/examples/tutorials/addressbook/part7/part7.pro
+++ b/examples/tutorials/addressbook/part7/part7.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/gettingStarted/gettingStarted.pro b/examples/tutorials/gettingStarted/gettingStarted.pro
index 9d10f0f67a..4ab5f4e6dd 100644
--- a/examples/tutorials/gettingStarted/gettingStarted.pro
+++ b/examples/tutorials/gettingStarted/gettingStarted.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS +=
+QT += widgets
diff --git a/examples/tutorials/gettingStarted/gsQt/gsqt.pro b/examples/tutorials/gettingStarted/gsQt/gsqt.pro
index ee632f96ff..3dac79afce 100755
--- a/examples/tutorials/gettingStarted/gsQt/gsqt.pro
+++ b/examples/tutorials/gettingStarted/gsQt/gsqt.pro
@@ -11,3 +11,4 @@ sources.files = *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/gettingStarted/gsQt
INSTALLS += sources
+QT += widgets
diff --git a/examples/tutorials/gettingStarted/gsQt/part1/main.cpp b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
index eaf04256d9..5f5ac7384b 100755
--- a/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part1/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
int main(int argv, char **args)
diff --git a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
index 24b4d77abc..c2b94a3d0c 100755
--- a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
int main(int argv, char **args)
{
diff --git a/examples/tutorials/gettingStarted/gsQt/part3/main.cpp b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
index 59ff9c40ea..00fb70a4ab 100755
--- a/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part3/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class Notepad : public QWidget
{
diff --git a/examples/tutorials/gettingStarted/gsQt/part4/main.cpp b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
index ba18afb749..a8cefe5347 100755
--- a/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part4/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class Notepad : public QMainWindow
{
diff --git a/examples/tutorials/gettingStarted/gsQt/part5/main.cpp b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
index 4a6257d10e..f25bbd02c1 100755
--- a/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
+++ b/examples/tutorials/gettingStarted/gsQt/part5/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class Notepad : public QMainWindow
{
diff --git a/examples/tutorials/modelview/1_readonly/1_readonly.pro b/examples/tutorials/modelview/1_readonly/1_readonly.pro
index e99956a140..e794f192be 100755
--- a/examples/tutorials/modelview/1_readonly/1_readonly.pro
+++ b/examples/tutorials/modelview/1_readonly/1_readonly.pro
@@ -15,6 +15,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/1_readonly
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/1_readonly/main.cpp b/examples/tutorials/modelview/1_readonly/main.cpp
index fdde141b4c..fb1b670896 100755
--- a/examples/tutorials/modelview/1_readonly/main.cpp
+++ b/examples/tutorials/modelview/1_readonly/main.cpp
@@ -40,8 +40,8 @@
//! [Quoting ModelView Tutorial]
// main.cpp
-#include <QtGui/QApplication>
-#include <QtGui/QTableView>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QTableView>
#include "mymodel.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/2_formatting/2_formatting.pro b/examples/tutorials/modelview/2_formatting/2_formatting.pro
index c6416dc415..9065100a3c 100755
--- a/examples/tutorials/modelview/2_formatting/2_formatting.pro
+++ b/examples/tutorials/modelview/2_formatting/2_formatting.pro
@@ -14,6 +14,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/2_formatting
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/2_formatting/main.cpp b/examples/tutorials/modelview/2_formatting/main.cpp
index fdde141b4c..fb1b670896 100755
--- a/examples/tutorials/modelview/2_formatting/main.cpp
+++ b/examples/tutorials/modelview/2_formatting/main.cpp
@@ -40,8 +40,8 @@
//! [Quoting ModelView Tutorial]
// main.cpp
-#include <QtGui/QApplication>
-#include <QtGui/QTableView>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QTableView>
#include "mymodel.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
index e5a61fca0f..58070a5b57 100755
--- a/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
+++ b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
@@ -14,6 +14,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/3_changingmode
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/3_changingmodel/main.cpp b/examples/tutorials/modelview/3_changingmodel/main.cpp
index 8a4ab8f6ab..424c1dc438 100755
--- a/examples/tutorials/modelview/3_changingmodel/main.cpp
+++ b/examples/tutorials/modelview/3_changingmodel/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QTableView>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QTableView>
#include "mymodel.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/4_headers/4_headers.pro b/examples/tutorials/modelview/4_headers/4_headers.pro
index 16f907dc4b..819daabdfa 100755
--- a/examples/tutorials/modelview/4_headers/4_headers.pro
+++ b/examples/tutorials/modelview/4_headers/4_headers.pro
@@ -14,6 +14,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/4_headers
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/4_headers/main.cpp b/examples/tutorials/modelview/4_headers/main.cpp
index c89829ab42..9dadb071a7 100755
--- a/examples/tutorials/modelview/4_headers/main.cpp
+++ b/examples/tutorials/modelview/4_headers/main.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QTableView>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QTableView>
#include "mymodel.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/5_edit/5_edit.pro b/examples/tutorials/modelview/5_edit/5_edit.pro
index fadd0e2921..bab5d49bce 100755
--- a/examples/tutorials/modelview/5_edit/5_edit.pro
+++ b/examples/tutorials/modelview/5_edit/5_edit.pro
@@ -16,6 +16,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/5_edit
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/5_edit/main.cpp b/examples/tutorials/modelview/5_edit/main.cpp
index 75246f7dc7..2a78dd09e9 100755
--- a/examples/tutorials/modelview/5_edit/main.cpp
+++ b/examples/tutorials/modelview/5_edit/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/5_edit/mainwindow.h b/examples/tutorials/modelview/5_edit/mainwindow.h
index 37303f8293..7db37919e3 100755
--- a/examples/tutorials/modelview/5_edit/mainwindow.h
+++ b/examples/tutorials/modelview/5_edit/mainwindow.h
@@ -41,7 +41,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui/QMainWindow>
+#include <QtWidgets/QMainWindow>
QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code
class QTableView; //forward declaration
diff --git a/examples/tutorials/modelview/6_treeview/6_treeview.pro b/examples/tutorials/modelview/6_treeview/6_treeview.pro
index 94f301aeae..3dfc324512 100755
--- a/examples/tutorials/modelview/6_treeview/6_treeview.pro
+++ b/examples/tutorials/modelview/6_treeview/6_treeview.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/6_treeview
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/6_treeview/main.cpp b/examples/tutorials/modelview/6_treeview/main.cpp
index 75246f7dc7..2a78dd09e9 100755
--- a/examples/tutorials/modelview/6_treeview/main.cpp
+++ b/examples/tutorials/modelview/6_treeview/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h
index 6398485cda..4e35a3ffc4 100755
--- a/examples/tutorials/modelview/6_treeview/mainwindow.h
+++ b/examples/tutorials/modelview/6_treeview/mainwindow.h
@@ -41,7 +41,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui/QMainWindow>
+#include <QtWidgets/QMainWindow>
QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code
class QTreeView; //forward declarations
diff --git a/examples/tutorials/modelview/7_selections/7_selections.pro b/examples/tutorials/modelview/7_selections/7_selections.pro
index bbac7abc0a..1b666d2484 100755
--- a/examples/tutorials/modelview/7_selections/7_selections.pro
+++ b/examples/tutorials/modelview/7_selections/7_selections.pro
@@ -11,6 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/7_selections
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
symbian: warning(This example might not fully work on Symbian platform)
diff --git a/examples/tutorials/modelview/7_selections/main.cpp b/examples/tutorials/modelview/7_selections/main.cpp
index 75246f7dc7..2a78dd09e9 100755
--- a/examples/tutorials/modelview/7_selections/main.cpp
+++ b/examples/tutorials/modelview/7_selections/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
diff --git a/examples/tutorials/modelview/7_selections/mainwindow.h b/examples/tutorials/modelview/7_selections/mainwindow.h
index 0a30dab085..e78befbbc0 100755
--- a/examples/tutorials/modelview/7_selections/mainwindow.h
+++ b/examples/tutorials/modelview/7_selections/mainwindow.h
@@ -41,7 +41,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui/QMainWindow>
+#include <QtWidgets/QMainWindow>
QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code
class QTreeView; //forward declarations
diff --git a/examples/tutorials/modelview/modelview.pro b/examples/tutorials/modelview/modelview.pro
index 3dc4bcc01b..10ac8ae77f 100755
--- a/examples/tutorials/modelview/modelview.pro
+++ b/examples/tutorials/modelview/modelview.pro
@@ -14,4 +14,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/threads/clock/clock.pro b/examples/tutorials/threads/clock/clock.pro
index 5c817b1473..f59413346d 100755
--- a/examples/tutorials/threads/clock/clock.pro
+++ b/examples/tutorials/threads/clock/clock.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
diff --git a/examples/tutorials/threads/clock/clockthread.cpp b/examples/tutorials/threads/clock/clockthread.cpp
index 01d3f1f697..f4721d8ed4 100644
--- a/examples/tutorials/threads/clock/clockthread.cpp
+++ b/examples/tutorials/threads/clock/clockthread.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "clockthread.h"
//This class starts another thread where it emits a signal for every new second.
diff --git a/examples/tutorials/threads/clock/main.cpp b/examples/tutorials/threads/clock/main.cpp
index a0f86d6bc7..99cbd4e693 100755
--- a/examples/tutorials/threads/clock/main.cpp
+++ b/examples/tutorials/threads/clock/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "clockthread.h"
//A clock that does time formatting in another thread
diff --git a/examples/tutorials/threads/movedobject/movedobject.pro b/examples/tutorials/threads/movedobject/movedobject.pro
index e2aa2d1dbb..f40ab0c012 100755
--- a/examples/tutorials/threads/movedobject/movedobject.pro
+++ b/examples/tutorials/threads/movedobject/movedobject.pro
@@ -16,3 +16,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/threads/movedobject
INSTALLS += target sources
symbian: CONFIG += qt_example
+QT += widgets
diff --git a/examples/tutorials/threads/movedobject/thread.cpp b/examples/tutorials/threads/movedobject/thread.cpp
index 6dfe8ff159..d8a17eefe6 100644
--- a/examples/tutorials/threads/movedobject/thread.cpp
+++ b/examples/tutorials/threads/movedobject/thread.cpp
@@ -43,7 +43,7 @@
/*
* 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)
@@ -68,7 +68,6 @@ void Thread::launchWorker(QObject *worker)
{
worker