summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp66
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp44
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp85
-rw-r--r--examples/examples.pro2
-rw-r--r--mkspecs/features/default_post.prf27
-rw-r--r--src/concurrent/concurrent.pro3
-rw-r--r--src/concurrent/doc/qtconcurrent.qdocconf92
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qfuture.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp)0
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qfuturesynchronizer.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp)0
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qfuturewatcher.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp)0
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentexception.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp)0
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentfilter.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp)0
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp)0
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentrun.cpp (renamed from doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp)0
-rw-r--r--src/concurrent/qfuture.cpp6
-rw-r--r--src/concurrent/qfuturesynchronizer.cpp2
-rw-r--r--src/concurrent/qfuturewatcher.cpp2
-rw-r--r--src/concurrent/qtconcurrentexception.cpp8
-rw-r--r--src/concurrent/qtconcurrentfilter.cpp28
-rw-r--r--src/concurrent/qtconcurrentmap.cpp32
-rw-r--r--src/concurrent/qtconcurrentrun.cpp14
-rw-r--r--src/corelib/corelib.pro4
-rw-r--r--src/corelib/doc/doc.pri3
-rw-r--r--src/corelib/doc/images/resources.png (renamed from doc/src/images/resources.png)bin49998 -> 49998 bytes
-rw-r--r--src/corelib/doc/snippets/code/doc_src_resources.cpp (renamed from doc/src/snippets/code/doc_src_resources.cpp)0
-rw-r--r--src/corelib/doc/snippets/code/doc_src_resources.qdoc (renamed from doc/src/snippets/code/doc_src_resources.qdoc)0
-rw-r--r--src/corelib/doc/src/io.qdoc39
-rw-r--r--src/corelib/doc/src/resource-system.qdoc (renamed from doc/src/network/files-and-resources/resources.qdoc)28
-rw-r--r--src/corelib/global/qlogging.cpp6
-rw-r--r--src/corelib/io/qfiledevice.cpp4
-rw-r--r--src/corelib/io/qurlquery.cpp2
-rw-r--r--src/corelib/tools/qhash.cpp2
-rw-r--r--src/corelib/tools/qstringlist.cpp8
-rw-r--r--src/dbus/dbus.pro3
-rw-r--r--src/dbus/doc/qtdbus.qdocconf92
-rw-r--r--src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc (renamed from doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp)10
-rw-r--r--src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp293
-rw-r--r--src/dbus/doc/snippets/code/doc_src_qtdbus.cpp43
-rw-r--r--src/dbus/doc/snippets/code/doc_src_qtdbus.pro3
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp (renamed from doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp (renamed from doc/src/snippets/code/src_qdbus_qdbusargument.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp (renamed from doc/src/snippets/code/src_qdbus_qdbuscontext.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp (renamed from doc/src/snippets/code/src_qdbus_qdbusinterface.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp (renamed from doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp (renamed from doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp (renamed from doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp)0
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp (renamed from doc/src/snippets/code/src_qdbus_qdbusreply.cpp)0
-rw-r--r--src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp (renamed from doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp)0
-rw-r--r--src/dbus/doc/src/dbus-adaptors.qdoc481
-rw-r--r--src/dbus/doc/src/dbus-intro.qdoc215
-rw-r--r--src/dbus/doc/src/qdbusxml2cpp.qdoc49
-rw-r--r--src/dbus/doc/src/qtdbus.qdoc (renamed from doc/src/dbus/qtdbus.qdoc)6
-rw-r--r--src/dbus/qdbusabstractinterface.cpp4
-rw-r--r--src/dbus/qdbusargument.cpp22
-rw-r--r--src/dbus/qdbuscontext.cpp2
-rw-r--r--src/dbus/qdbusextratypes.cpp4
-rw-r--r--src/dbus/qdbusinterface.cpp2
-rw-r--r--src/dbus/qdbusmetatype.cpp2
-rw-r--r--src/dbus/qdbuspendingcall.cpp4
-rw-r--r--src/dbus/qdbuspendingreply.cpp8
-rw-r--r--src/dbus/qdbusreply.cpp4
-rw-r--r--src/gui/accessible/qaccessible.cpp2
-rw-r--r--src/gui/doc/images/brush-outline.png (renamed from doc/src/images/brush-outline.png)bin452 -> 452 bytes
-rw-r--r--src/gui/doc/images/brush-styles.pngbin0 -> 13980 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-analogclock.png (renamed from doc/src/images/coordinatesystem-analogclock.png)bin9762 -> 9762 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-line-antialias.png (renamed from doc/src/images/coordinatesystem-line-antialias.png)bin17979 -> 17979 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-line-raster.png (renamed from doc/src/images/coordinatesystem-line-raster.png)bin18152 -> 18152 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-line.png (renamed from doc/src/images/coordinatesystem-line.png)bin26694 -> 26694 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-rect-antialias.png (renamed from doc/src/images/coordinatesystem-rect-antialias.png)bin19058 -> 19058 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-rect-raster.png (renamed from doc/src/images/coordinatesystem-rect-raster.png)bin18455 -> 18455 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-rect.png (renamed from doc/src/images/coordinatesystem-rect.png)bin32307 -> 32307 bytes
-rw-r--r--src/gui/doc/images/coordinatesystem-transformations.png (renamed from doc/src/images/coordinatesystem-transformations.png)bin59180 -> 59180 bytes
-rw-r--r--src/gui/doc/images/cursor-arrow.pngbin0 -> 171 bytes
-rw-r--r--src/gui/doc/images/cursor-busy.pngbin0 -> 201 bytes
-rw-r--r--src/gui/doc/images/cursor-closedhand.pngbin0 -> 147 bytes
-rw-r--r--src/gui/doc/images/cursor-cross.pngbin0 -> 130 bytes
-rw-r--r--src/gui/doc/images/cursor-forbidden.pngbin0 -> 199 bytes
-rw-r--r--src/gui/doc/images/cursor-hand.pngbin0 -> 159 bytes
-rw-r--r--src/gui/doc/images/cursor-hsplit.pngbin0 -> 155 bytes
-rw-r--r--src/gui/doc/images/cursor-ibeam.pngbin0 -> 124 bytes
-rw-r--r--src/gui/doc/images/cursor-openhand.pngbin0 -> 160 bytes
-rw-r--r--src/gui/doc/images/cursor-sizeall.pngbin0 -> 174 bytes
-rw-r--r--src/gui/doc/images/cursor-sizeb.pngbin0 -> 161 bytes
-rw-r--r--src/gui/doc/images/cursor-sizef.pngbin0 -> 161 bytes
-rw-r--r--src/gui/doc/images/cursor-sizeh.pngbin0 -> 145 bytes
-rw-r--r--src/gui/doc/images/cursor-sizev.pngbin0 -> 141 bytes
-rw-r--r--src/gui/doc/images/cursor-uparrow.pngbin0 -> 132 bytes
-rw-r--r--src/gui/doc/images/cursor-vsplit.pngbin0 -> 161 bytes
-rw-r--r--src/gui/doc/images/cursor-wait.pngbin0 -> 172 bytes
-rw-r--r--src/gui/doc/images/cursor-whatsthis.pngbin0 -> 191 bytes
-rw-r--r--src/gui/doc/images/hoverevents.png (renamed from doc/src/images/hoverevents.png)bin3210 -> 3210 bytes
-rw-r--r--src/gui/doc/images/paintsystem-antialiasing.png (renamed from doc/src/images/paintsystem-antialiasing.png)bin995 -> 995 bytes
-rw-r--r--src/gui/doc/images/paintsystem-core.png (renamed from doc/src/images/paintsystem-core.png)bin22101 -> 22101 bytes
-rw-r--r--src/gui/doc/images/paintsystem-devices.png (renamed from doc/src/images/paintsystem-devices.png)bin47404 -> 47404 bytes
-rw-r--r--src/gui/doc/images/paintsystem-fancygradient.png (renamed from doc/src/images/paintsystem-fancygradient.png)bin39213 -> 39213 bytes
-rw-r--r--src/gui/doc/images/paintsystem-gradients.png (renamed from doc/src/images/paintsystem-gradients.png)bin16931 -> 16931 bytes
-rw-r--r--src/gui/doc/images/paintsystem-icon.png (renamed from doc/src/images/paintsystem-icon.png)bin5458 -> 5458 bytes
-rw-r--r--src/gui/doc/images/paintsystem-movie.png (renamed from doc/src/images/paintsystem-movie.png)bin4992 -> 4992 bytes
-rw-r--r--src/gui/doc/images/paintsystem-painterpath.png (renamed from doc/src/images/paintsystem-painterpath.png)bin7503 -> 7503 bytes
-rw-r--r--src/gui/doc/images/paintsystem-stylepainter.png (renamed from doc/src/images/paintsystem-stylepainter.png)bin16572 -> 16572 bytes
-rw-r--r--src/gui/doc/images/paintsystem-svg.png (renamed from doc/src/images/paintsystem-svg.png)bin66692 -> 66692 bytes
-rw-r--r--src/gui/doc/images/qcolor-cmyk.png (renamed from doc/src/images/qcolor-cmyk.png)bin18878 -> 18878 bytes
-rw-r--r--src/gui/doc/images/qcolor-hsv.png (renamed from doc/src/images/qcolor-hsv.png)bin21046 -> 21046 bytes
-rw-r--r--src/gui/doc/images/qcolor-hue.png (renamed from doc/src/images/qcolor-hue.png)bin26820 -> 26820 bytes
-rw-r--r--src/gui/doc/images/qcolor-rgb.png (renamed from doc/src/images/qcolor-rgb.png)bin17798 -> 17798 bytes
-rw-r--r--src/gui/doc/images/qcolor-saturation.png (renamed from doc/src/images/qcolor-saturation.png)bin2150 -> 2150 bytes
-rw-r--r--src/gui/doc/images/qcolor-value.png (renamed from doc/src/images/qcolor-value.png)bin1241 -> 1241 bytes
-rw-r--r--src/gui/doc/images/qconicalgradient.png (renamed from doc/src/images/qconicalgradient.png)bin52823 -> 52823 bytes
-rw-r--r--src/gui/doc/images/qgradient-conical.png (renamed from doc/src/images/qgradient-conical.png)bin3995 -> 3995 bytes
-rw-r--r--src/gui/doc/images/qgradient-linear.png (renamed from doc/src/images/qgradient-linear.png)bin714 -> 714 bytes
-rw-r--r--src/gui/doc/images/qgradient-radial.png (renamed from doc/src/images/qgradient-radial.png)bin2352 -> 2352 bytes
-rw-r--r--src/gui/doc/images/qimage-32bit_scaled.png (renamed from doc/src/images/qimage-32bit_scaled.png)bin25098 -> 25098 bytes
-rw-r--r--src/gui/doc/images/qimage-8bit_scaled.png (renamed from doc/src/images/qimage-8bit_scaled.png)bin24761 -> 24761 bytes
-rw-r--r--src/gui/doc/images/qimage-scaling.pngbin0 -> 34785 bytes
-rw-r--r--src/gui/doc/images/qlineargradient-pad.png (renamed from doc/src/images/qlineargradient-pad.png)bin2260 -> 2260 bytes
-rw-r--r--src/gui/doc/images/qlineargradient-reflect.png (renamed from doc/src/images/qlineargradient-reflect.png)bin2746 -> 2746 bytes
-rw-r--r--src/gui/doc/images/qlineargradient-repeat.png (renamed from doc/src/images/qlineargradient-repeat.png)bin2590 -> 2590 bytes
-rw-r--r--src/gui/doc/images/qmatrix-combinedtransformation.png (renamed from doc/src/images/qmatrix-combinedtransformation.png)bin1707 -> 1707 bytes
-rw-r--r--src/gui/doc/images/qmatrix-representation.png (renamed from doc/src/images/qmatrix-representation.png)bin10410 -> 10410 bytes
-rw-r--r--src/gui/doc/images/qmatrix-simpletransformation.png (renamed from doc/src/images/qmatrix-simpletransformation.png)bin2047 -> 2047 bytes
-rw-r--r--src/gui/doc/images/qpainter-affinetransformations.png (renamed from doc/src/images/qpainter-affinetransformations.png)bin66241 -> 66241 bytes
-rw-r--r--src/gui/doc/images/qpainter-arc.png (renamed from doc/src/images/qpainter-arc.png)bin635 -> 635 bytes
-rw-r--r--src/gui/doc/images/qpainter-basicdrawing.png (renamed from doc/src/images/qpainter-basicdrawing.png)bin18164 -> 18164 bytes
-rw-r--r--src/gui/doc/images/qpainter-chord.png (renamed from doc/src/images/qpainter-chord.png)bin632 -> 632 bytes
-rw-r--r--src/gui/doc/images/qpainter-clock.png (renamed from doc/src/images/qpainter-clock.png)bin3128 -> 3128 bytes
-rw-r--r--src/gui/doc/images/qpainter-compositiondemo.png (renamed from doc/src/images/qpainter-compositiondemo.png)bin61015 -> 61015 bytes
-rw-r--r--src/gui/doc/images/qpainter-compositionmode1.png (renamed from doc/src/images/qpainter-compositionmode1.png)bin2418 -> 2418 bytes
-rw-r--r--src/gui/doc/images/qpainter-compositionmode2.png (renamed from doc/src/images/qpainter-compositionmode2.png)bin2131 -> 2131 bytes
-rw-r--r--src/gui/doc/images/qpainter-concentriccircles.png (renamed from doc/src/images/qpainter-concentriccircles.png)bin31294 -> 31294 bytes
-rw-r--r--src/gui/doc/images/qpainter-ellipse.png (renamed from doc/src/images/qpainter-ellipse.png)bin1022 -> 1022 bytes
-rw-r--r--src/gui/doc/images/qpainter-gradients.png (renamed from doc/src/images/qpainter-gradients.png)bin24231 -> 24231 bytes
-rw-r--r--src/gui/doc/images/qpainter-line.png (renamed from doc/src/images/qpainter-line.png)bin759 -> 759 bytes
-rw-r--r--src/gui/doc/images/qpainter-painterpaths.png (renamed from doc/src/images/qpainter-painterpaths.png)bin31985 -> 31985 bytes
-rw-r--r--src/gui/doc/images/qpainter-path.png (renamed from doc/src/images/qpainter-path.png)bin963 -> 963 bytes
-rw-r--r--src/gui/doc/images/qpainter-pathstroking.png (renamed from doc/src/images/qpainter-pathstroking.png)bin30794 -> 30794 bytes
-rw-r--r--src/gui/doc/images/qpainter-pie.png (renamed from doc/src/images/qpainter-pie.png)bin1018 -> 1018 bytes
-rw-r--r--src/gui/doc/images/qpainter-polygon.png (renamed from doc/src/images/qpainter-polygon.png)bin699 -> 699 bytes
-rw-r--r--src/gui/doc/images/qpainter-rectangle.png (renamed from doc/src/images/qpainter-rectangle.png)bin194 -> 194 bytes
-rw-r--r--src/gui/doc/images/qpainter-rotation.png (renamed from doc/src/images/qpainter-rotation.png)bin3768 -> 3768 bytes
-rw-r--r--src/gui/doc/images/qpainter-roundrect.png (renamed from doc/src/images/qpainter-roundrect.png)bin433 -> 433 bytes
-rw-r--r--src/gui/doc/images/qpainter-scale.png (renamed from doc/src/images/qpainter-scale.png)bin2828 -> 2828 bytes
-rw-r--r--src/gui/doc/images/qpainter-text.png (renamed from doc/src/images/qpainter-text.png)bin1391 -> 1391 bytes
-rw-r--r--src/gui/doc/images/qpainter-translation.png (renamed from doc/src/images/qpainter-translation.png)bin3909 -> 3909 bytes
-rw-r--r--src/gui/doc/images/qpainter-vectordeformation.png (renamed from doc/src/images/qpainter-vectordeformation.png)bin30591 -> 30591 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-addellipse.png (renamed from doc/src/images/qpainterpath-addellipse.png)bin3509 -> 3509 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-addpolygon.png (renamed from doc/src/images/qpainterpath-addpolygon.png)bin7625 -> 7625 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-addrectangle.png (renamed from doc/src/images/qpainterpath-addrectangle.png)bin1839 -> 1839 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-addtext.png (renamed from doc/src/images/qpainterpath-addtext.png)bin7406 -> 7406 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-arcto.png (renamed from doc/src/images/qpainterpath-arcto.png)bin5063 -> 5063 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-construction.png (renamed from doc/src/images/qpainterpath-construction.png)bin2523 -> 2523 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-cubicto.png (renamed from doc/src/images/qpainterpath-cubicto.png)bin4749 -> 4749 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-demo.png (renamed from doc/src/images/qpainterpath-demo.png)bin51334 -> 51334 bytes
-rw-r--r--src/gui/doc/images/qpainterpath-example.png (renamed from doc/src/images/qpainterpath-example.png)bin38746 -> 38746 bytes
-rw-r--r--src/gui/doc/images/qpen-bevel.pngbin0 -> 11527 bytes
-rw-r--r--src/gui/doc/images/qpen-custom.pngbin0 -> 6254 bytes
-rw-r--r--src/gui/doc/images/qpen-dash.pngbin0 -> 8221 bytes
-rw-r--r--src/gui/doc/images/qpen-dashdot.pngbin0 -> 5961 bytes
-rw-r--r--src/gui/doc/images/qpen-dashdotdot.pngbin0 -> 5999 bytes
-rw-r--r--src/gui/doc/images/qpen-dashpattern.png (renamed from doc/src/images/qpen-dashpattern.png)bin1605 -> 1605 bytes
-rw-r--r--src/gui/doc/images/qpen-demo.png (renamed from doc/src/images/qpen-demo.png)bin49784 -> 49784 bytes
-rw-r--r--src/gui/doc/images/qpen-dot.pngbin0 -> 5386 bytes
-rw-r--r--src/gui/doc/images/qpen-flat.pngbin0 -> 1885 bytes
-rw-r--r--src/gui/doc/images/qpen-miter.pngbin0 -> 11734 bytes
-rw-r--r--src/gui/doc/images/qpen-miterlimit.png (renamed from doc/src/images/qpen-miterlimit.png)bin24816 -> 24816 bytes
-rw-r--r--src/gui/doc/images/qpen-roundcap.pngbin0 -> 1920 bytes
-rw-r--r--src/gui/doc/images/qpen-roundjoin.pngbin0 -> 11878 bytes
-rw-r--r--src/gui/doc/images/qpen-solid.pngbin0 -> 7416 bytes
-rw-r--r--src/gui/doc/images/qpen-square.pngbin0 -> 2651 bytes
-rw-r--r--src/gui/doc/images/qradialgradient-pad.png (renamed from doc/src/images/qradialgradient-pad.png)bin11385 -> 11385 bytes
-rw-r--r--src/gui/doc/images/qradialgradient-reflect.png (renamed from doc/src/images/qradialgradient-reflect.png)bin33668 -> 33668 bytes
-rw-r--r--src/gui/doc/images/qradialgradient-repeat.png (renamed from doc/src/images/qradialgradient-repeat.png)bin40528 -> 40528 bytes
-rw-r--r--src/gui/doc/images/qrect-diagram-zero.pngbin0 -> 5198 bytes
-rw-r--r--src/gui/doc/images/qrectf-diagram-one.pngbin0 -> 9594 bytes
-rw-r--r--src/gui/doc/images/qrectf-diagram-three.pngbin0 -> 9392 bytes
-rw-r--r--src/gui/doc/images/qrectf-diagram-two.pngbin0 -> 9387 bytes
-rw-r--r--src/gui/doc/images/qstatustipevent-action.png (renamed from doc/src/images/qstatustipevent-action.png)bin10741 -> 10741 bytes
-rw-r--r--src/gui/doc/images/qstatustipevent-widget.png (renamed from doc/src/images/qstatustipevent-widget.png)bin9417 -> 9417 bytes
-rw-r--r--src/gui/doc/images/qt-fillrule-oddeven.png (renamed from doc/src/images/qt-fillrule-oddeven.png)bin7057 -> 7057 bytes
-rw-r--r--src/gui/doc/images/qt-fillrule-winding.png (renamed from doc/src/images/qt-fillrule-winding.png)bin7205 -> 7205 bytes
-rw-r--r--src/gui/doc/images/qtexttableformat-cell.png (renamed from doc/src/images/qtexttableformat-cell.png)bin24454 -> 24454 bytes
-rw-r--r--src/gui/doc/images/qtransform-combinedtransformation.png (renamed from doc/src/images/qtransform-combinedtransformation.png)bin935 -> 935 bytes
-rw-r--r--src/gui/doc/images/qtransform-combinedtransformation2.png (renamed from doc/src/images/qtransform-combinedtransformation2.png)bin930 -> 930 bytes
-rw-r--r--src/gui/doc/images/qtransform-representation.png (renamed from doc/src/images/qtransform-representation.png)bin17385 -> 17385 bytes
-rw-r--r--src/gui/doc/images/qtransform-simpletransformation.png (renamed from doc/src/images/qtransform-simpletransformation.png)bin1201 -> 1201 bytes
-rw-r--r--src/gui/doc/images/texttable-merge.png (renamed from doc/src/images/texttable-merge.png)bin746 -> 746 bytes
-rw-r--r--src/gui/doc/images/texttable-split.png (renamed from doc/src/images/texttable-split.png)bin753 -> 753 bytes
-rw-r--r--src/gui/doc/qtgui.qdocconf92
-rw-r--r--src/gui/doc/snippets/brush/brush.cpp (renamed from doc/src/snippets/brush/brush.cpp)0
-rw-r--r--src/gui/doc/snippets/brush/gradientcreationsnippet.cpp (renamed from doc/src/snippets/brush/gradientcreationsnippet.cpp)0
-rw-r--r--src/gui/doc/snippets/code/doc_src_coordsys.cpp (renamed from doc/src/snippets/code/doc_src_coordsys.cpp)0
-rw-r--r--src/gui/doc/snippets/code/doc_src_qtgui.pro (renamed from doc/src/snippets/code/doc_src_qtgui.pro)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp (renamed from doc/src/snippets/code/src_gui_accessible_qaccessible.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qimage.cpp (renamed from doc/src/snippets/code/src_gui_image_qimage.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp (renamed from doc/src/snippets/code/src_gui_image_qimagereader.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp (renamed from doc/src/snippets/code/src_gui_image_qimagewriter.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qmovie.cpp (renamed from doc/src/snippets/code/src_gui_image_qmovie.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp (renamed from doc/src/snippets/code/src_gui_image_qpixmap.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp (renamed from doc/src/snippets/code/src_gui_image_qpixmapcache.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qapplication.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qapplication_x11.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qclipboard.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qevent.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp (renamed from doc/src/snippets/code/src_gui_painting_qbrush.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp (renamed from doc/src/snippets/code/src_gui_painting_qcolor.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp (renamed from doc/src/snippets/code/src_gui_painting_qmatrix.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp (renamed from doc/src/snippets/code/src_gui_painting_qpainter.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp (renamed from doc/src/snippets/code/src_gui_painting_qpainterpath.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpen.cpp (renamed from doc/src/snippets/code/src_gui_painting_qpen.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qregion.cpp (renamed from doc/src/snippets/code/src_gui_painting_qregion.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp (renamed from doc/src/snippets/code/src_gui_painting_qregion_unix.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp (renamed from doc/src/snippets/code/src_gui_painting_qtransform.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp (renamed from doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qfont.cpp (renamed from doc/src/snippets/code/src_gui_text_qfont.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp (renamed from doc/src/snippets/code/src_gui_text_qfontmetrics.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp (renamed from doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp (renamed from doc/src/snippets/code/src_gui_text_qtextcursor.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp (renamed from doc/src/snippets/code/src_gui_text_qtextdocument.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp (renamed from doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp (renamed from doc/src/snippets/code/src_gui_text_qtextlayout.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp (renamed from doc/src/snippets/code/src_gui_util_qdesktopservices.cpp)0
-rw-r--r--src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qvalidator.cpp)0
-rw-r--r--src/gui/doc/snippets/dragging/mainwindow.cpp (renamed from doc/src/snippets/dragging/mainwindow.cpp)0
-rw-r--r--src/gui/doc/snippets/droparea.cpp (renamed from doc/src/snippets/droparea.cpp)0
-rw-r--r--src/gui/doc/snippets/image/image.cpp (renamed from doc/src/snippets/image/image.cpp)0
-rw-r--r--src/gui/doc/snippets/image/supportedformat.cpp (renamed from doc/src/snippets/image/supportedformat.cpp)0
-rw-r--r--src/gui/doc/snippets/matrix/matrix.cpp (renamed from doc/src/snippets/matrix/matrix.cpp)0
-rw-r--r--src/gui/doc/snippets/picture/picture.cpp (renamed from doc/src/snippets/picture/picture.cpp)0
-rw-r--r--src/gui/doc/snippets/polygon/polygon.cpp (renamed from doc/src/snippets/polygon/polygon.cpp)0
-rw-r--r--src/gui/doc/snippets/qfontdatabase/main.cpp (renamed from doc/src/snippets/qfontdatabase/main.cpp)0
-rw-r--r--src/gui/doc/snippets/qstatustipevent/main.cpp (renamed from doc/src/snippets/qstatustipevent/main.cpp)0
-rw-r--r--src/gui/doc/snippets/separations/finalwidget.cpp (renamed from doc/src/snippets/separations/finalwidget.cpp)0
-rw-r--r--src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp (renamed from doc/src/snippets/textblock-fragments/xmlwriter.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-css/main.cpp (renamed from doc/src/snippets/textdocument-css/main.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/main.cpp (renamed from doc/src/snippets/textdocument-listitemstyles/main.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp (renamed from doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h (renamed from doc/src/snippets/textdocument-listitemstyles/mainwindow.h)0
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro (renamed from doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro)0
-rw-r--r--src/gui/doc/snippets/textdocument-lists/mainwindow.cpp (renamed from doc/src/snippets/textdocument-lists/mainwindow.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-resources/main.cpp (renamed from doc/src/snippets/textdocument-resources/main.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-resources/textdocument-resources.pro (renamed from doc/src/snippets/textdocument-resources/textdocument-resources.pro)0
-rw-r--r--src/gui/doc/snippets/textdocument-tables/mainwindow.cpp (renamed from doc/src/snippets/textdocument-tables/mainwindow.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocument-texttable/main.cpp (renamed from doc/src/snippets/textdocument-texttable/main.cpp)0
-rw-r--r--src/gui/doc/snippets/textdocumentendsnippet.cpp (renamed from doc/src/snippets/textdocumentendsnippet.cpp)0
-rw-r--r--src/gui/doc/snippets/transform/main.cpp (renamed from doc/src/snippets/transform/main.cpp)0
-rw-r--r--src/gui/doc/src/coordsys.qdoc (renamed from doc/src/gui/coordsys.qdoc)20
-rw-r--r--src/gui/doc/src/paintsystem.qdoc (renamed from doc/src/gui/paintsystem.qdoc)0
-rw-r--r--src/gui/doc/src/qtgui.qdoc (renamed from doc/src/gui/qtgui.qdoc)2
-rw-r--r--src/gui/gui.pro3
-rw-r--r--src/gui/image/qimage.cpp10
-rw-r--r--src/gui/image/qimagereader.cpp8
-rw-r--r--src/gui/image/qimagewriter.cpp6
-rw-r--r--src/gui/image/qmovie.cpp4
-rw-r--r--src/gui/image/qpicture.cpp18
-rw-r--r--src/gui/image/qpixmap.cpp8
-rw-r--r--src/gui/image/qpixmapcache.cpp4
-rw-r--r--src/gui/kernel/qclipboard.cpp6
-rw-r--r--src/gui/kernel/qdrag.cpp4
-rw-r--r--src/gui/kernel/qevent.cpp14
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
-rw-r--r--src/gui/kernel/qkeysequence.cpp44
-rw-r--r--src/gui/kernel/qpalette.cpp2
-rw-r--r--src/gui/kernel/qshortcutmap.cpp2
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp6
-rw-r--r--src/gui/painting/qbrush.cpp8
-rw-r--r--src/gui/painting/qcolor.cpp2
-rw-r--r--src/gui/painting/qmatrix.cpp14
-rw-r--r--src/gui/painting/qpainter.cpp44
-rw-r--r--src/gui/painting/qpainterpath.cpp14
-rw-r--r--src/gui/painting/qpen.cpp8
-rw-r--r--src/gui/painting/qpolygon.cpp14
-rw-r--r--src/gui/painting/qregion.cpp4
-rw-r--r--src/gui/painting/qtransform.cpp14
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qfont.cpp10
-rw-r--r--src/gui/text/qfontdatabase.cpp4
-rw-r--r--src/gui/text/qfontmetrics.cpp4
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp10
-rw-r--r--src/gui/text/qtextcursor.cpp10
-rw-r--r--src/gui/text/qtextdocument.cpp10
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp2
-rw-r--r--src/gui/text/qtextformat.cpp2
-rw-r--r--src/gui/text/qtextlayout.cpp4
-rw-r--r--src/gui/text/qtextlist.cpp2
-rw-r--r--src/gui/text/qtextobject.cpp4
-rw-r--r--src/gui/text/qtexttable.cpp8
-rw-r--r--src/gui/util/qdesktopservices.cpp6
-rw-r--r--src/gui/util/qvalidator.cpp10
-rw-r--r--src/network/access/qftp.cpp8
-rw-r--r--src/network/access/qhttpmultipart.cpp8
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp12
-rw-r--r--src/network/access/qnetworkdiskcache.cpp6
-rw-r--r--src/network/access/qnetworkreply.cpp2
-rw-r--r--src/network/access/qnetworkrequest.cpp2
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp2
-rw-r--r--src/network/doc/doc.pri3
-rw-r--r--src/network/doc/images/roaming-states.png (renamed from doc/src/images/roaming-states.png)bin9527 -> 9527 bytes
-rw-r--r--src/network/doc/images/tcpstream.png (renamed from doc/src/images/tcpstream.png)bin11470 -> 11470 bytes
-rw-r--r--src/network/doc/images/udppackets.png (renamed from doc/src/images/udppackets.png)bin24707 -> 24707 bytes
-rw-r--r--src/network/doc/qtnetwork.qdocconf2
-rw-r--r--src/network/doc/snippets/code/doc_src_qtnetwork.cpp (renamed from doc/src/snippets/code/doc_src_qtnetwork.cpp)0
-rw-r--r--src/network/doc/snippets/code/doc_src_qtnetwork.pro (renamed from doc/src/snippets/code/doc_src_qtnetwork.pro)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qftp.cpp (renamed from doc/src/snippets/code/src_network_access_qftp.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qhttpmultipart.cpp (renamed from doc/src/snippets/code/src_network_access_qhttpmultipart.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qhttppart.cpp (renamed from doc/src/snippets/code/src_network_access_qhttppart.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp (renamed from doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp (renamed from doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qnetworkreply.cpp (renamed from doc/src/snippets/code/src_network_access_qnetworkreply.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_access_qnetworkrequest.cpp (renamed from doc/src/snippets/code/src_network_access_qnetworkrequest.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp (renamed from doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_kernel_qdnslookup.cpp (renamed from doc/src/snippets/code/src_network_kernel_qdnslookup.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_kernel_qhostaddress.cpp (renamed from doc/src/snippets/code/src_network_kernel_qhostaddress.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp (renamed from doc/src/snippets/code/src_network_kernel_qhostinfo.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_kernel_qnetworkproxy.cpp (renamed from doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_socket_qabstractsocket.cpp (renamed from doc/src/snippets/code/src_network_socket_qabstractsocket.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_socket_qlocalsocket_unix.cpp (renamed from doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_socket_qnativesocketengine.cpp (renamed from doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_socket_qtcpserver.cpp (renamed from doc/src/snippets/code/src_network_socket_qtcpserver.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_socket_qudpsocket.cpp (renamed from doc/src/snippets/code/src_network_socket_qudpsocket.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp (renamed from doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp (renamed from doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp)0
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp (renamed from doc/src/snippets/code/src_network_ssl_qsslsocket.cpp)0
-rw-r--r--src/network/doc/snippets/network/tcpwait.cpp (renamed from doc/src/snippets/network/tcpwait.cpp)0
-rw-r--r--src/network/doc/src/bearermanagement.qdoc (renamed from doc/src/network/network-programming/bearermanagement.qdoc)0
-rw-r--r--src/network/doc/src/network-programming.qdoc (renamed from doc/src/network/network-programming/qtnetwork.qdoc)0
-rw-r--r--src/network/doc/src/qtnetwork.qdoc (renamed from doc/src/network/qtnetwork.qdoc)4
-rw-r--r--src/network/doc/src/ssl.qdoc (renamed from doc/src/network/network-programming/ssl.qdoc)0
-rw-r--r--src/network/kernel/qdnslookup.cpp4
-rw-r--r--src/network/kernel/qhostaddress.cpp2
-rw-r--r--src/network/kernel/qhostinfo.cpp12
-rw-r--r--src/network/kernel/qnetworkproxy.cpp6
-rw-r--r--src/network/network.pro4
-rw-r--r--src/network/socket/qabstractsocket.cpp10
-rw-r--r--src/network/socket/qlocalsocket.cpp4
-rw-r--r--src/network/socket/qnativesocketengine.cpp4
-rw-r--r--src/network/socket/qtcpserver.cpp2
-rw-r--r--src/network/socket/qudpsocket.cpp2
-rw-r--r--src/network/ssl/qsslcertificate.cpp2
-rw-r--r--src/network/ssl/qsslconfiguration.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp14
-rw-r--r--src/opengl/doc/qtopengl.qdocconf92
-rw-r--r--src/opengl/doc/snippets/code/doc_src_qtopengl.cpp43
-rw-r--r--src/opengl/doc/snippets/code/doc_src_qtopengl.pro3
-rw-r--r--src/opengl/doc/snippets/code/src_opengl_qgl.cpp (renamed from doc/src/snippets/code/src_opengl_qgl.cpp)0
-rw-r--r--src/opengl/doc/snippets/code/src_opengl_qglcolormap.cpp (renamed from doc/src/snippets/code/src_opengl_qglcolormap.cpp)0
-rw-r--r--src/opengl/doc/snippets/code/src_opengl_qglpixelbuffer.cpp (renamed from doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp)0
-rw-r--r--src/opengl/doc/snippets/code/src_opengl_qglshaderprogram.cpp (renamed from doc/src/snippets/code/src_opengl_qglshaderprogram.cpp)0
-rw-r--r--src/opengl/doc/src/qtopengl.qdoc70
-rw-r--r--src/opengl/opengl.pro3
-rw-r--r--src/opengl/qgl.cpp18
-rw-r--r--src/opengl/qglcolormap.cpp2
-rw-r--r--src/opengl/qglpixelbuffer.cpp4
-rw-r--r--src/opengl/qglshaderprogram.cpp6
-rw-r--r--src/printsupport/dialogs/qabstractprintdialog.cpp2
-rw-r--r--src/printsupport/doc/images/plastique-printdialog-properties.pngbin0 -> 27720 bytes
-rw-r--r--src/printsupport/doc/images/plastique-printdialog.pngbin0 -> 44150 bytes
-rw-r--r--src/printsupport/doc/images/printer-rects.pngbin0 -> 30319 bytes
-rw-r--r--src/printsupport/doc/qtprintsupport.qdocconf92
-rw-r--r--src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp43
-rw-r--r--src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro3
-rw-r--r--src/printsupport/doc/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp (renamed from doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp)0
-rw-r--r--src/printsupport/doc/snippets/printing-qprinter/errors.cpp (renamed from doc/src/snippets/printing-qprinter/errors.cpp)0
-rw-r--r--src/printsupport/doc/snippets/printing-qprinter/object.cpp (renamed from doc/src/snippets/printing-qprinter/object.cpp)0
-rw-r--r--src/printsupport/doc/snippets/widgetprinting.cpp (renamed from doc/src/snippets/widgetprinting.cpp)0
-rw-r--r--src/printsupport/doc/src/printing.qdoc (renamed from doc/src/printsupport/printing.qdoc)6
-rw-r--r--src/printsupport/doc/src/qtprintsupport.qdoc (renamed from doc/src/printsupport/qtprintsupport.qdoc)4
-rw-r--r--src/printsupport/kernel/qprinter.cpp2
-rw-r--r--src/printsupport/printsupport.pro3
-rw-r--r--src/sql/doc/doc.pri3
-rw-r--r--src/sql/sql.pro4
-rw-r--r--src/testlib/doc/qttest.qdocconf92
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp (renamed from doc/src/snippets/code/doc_src_qsignalspy.cpp)0
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qtestevent.cpp (renamed from doc/src/snippets/code/doc_src_qtestevent.cpp)0
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qtestlib.cpp88
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qtestlib.pro7
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc87
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qttest.cpp43
-rw-r--r--src/testlib/doc/snippets/code/doc_src_qttest.pro3
-rw-r--r--src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp (renamed from doc/src/snippets/code/src_qtestlib_qtestcase.cpp)0
-rw-r--r--src/testlib/doc/src/qttest.qdoc54
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc840
-rw-r--r--src/testlib/qsignalspy.qdoc10
-rw-r--r--src/testlib/qtestcase.cpp54
-rw-r--r--src/testlib/qtestevent.qdoc2
-rw-r--r--src/testlib/testlib.pro3
-rw-r--r--src/tools/bootstrap/bootstrap.pro3
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp21
-rw-r--r--src/tools/qdoc/qdoc.pro6
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp8
-rw-r--r--src/widgets/dialogs/qdialog.cpp14
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp28
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp6
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp30
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp32
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp24
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp8
-rw-r--r--src/widgets/dialogs/qwizard.cpp208
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part1-labeled-layout.png (renamed from doc/src/images/addressbook-tutorial-part1-labeled-layout.png)bin19114 -> 19114 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part1-labeled-screenshot.png (renamed from doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png)bin23223 -> 23223 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part1-screenshot.png (renamed from doc/src/images/addressbook-tutorial-part1-screenshot.png)bin9872 -> 9872 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part2-add-contact.png (renamed from doc/src/images/addressbook-tutorial-part2-add-contact.png)bin12936 -> 12936 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part2-add-flowchart.png (renamed from doc/src/images/addressbook-tutorial-part2-add-flowchart.png)bin23533 -> 23533 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part2-add-successful.png (renamed from doc/src/images/addressbook-tutorial-part2-add-successful.png)bin10825 -> 10825 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part2-labeled-layout.png (renamed from doc/src/images/addressbook-tutorial-part2-labeled-layout.png)bin27103 -> 27103 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part2-signals-and-slots.png (renamed from doc/src/images/addressbook-tutorial-part2-signals-and-slots.png)bin9968 -> 9968 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part2-stretch-effects.png (renamed from doc/src/images/addressbook-tutorial-part2-stretch-effects.png)bin12268 -> 12268 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part3-labeled-layout.png (renamed from doc/src/images/addressbook-tutorial-part3-labeled-layout.png)bin27467 -> 27467 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part3-linkedlist.png (renamed from doc/src/images/addressbook-tutorial-part3-linkedlist.png)bin10209 -> 10209 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part3-screenshot.png (renamed from doc/src/images/addressbook-tutorial-part3-screenshot.png)bin14041 -> 14041 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part4-remove.png (renamed from doc/src/images/addressbook-tutorial-part4-remove.png)bin22248 -> 22248 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part5-finddialog.png (renamed from doc/src/images/addressbook-tutorial-part5-finddialog.png)bin10046 -> 10046 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part5-notfound.png (renamed from doc/src/images/addressbook-tutorial-part5-notfound.png)bin10789 -> 10789 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part5-screenshot.png (renamed from doc/src/images/addressbook-tutorial-part5-screenshot.png)bin15849 -> 15849 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part5-signals-and-slots.png (renamed from doc/src/images/addressbook-tutorial-part5-signals-and-slots.png)bin5542 -> 5542 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part6-load.png (renamed from doc/src/images/addressbook-tutorial-part6-load.png)bin24797 -> 24797 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part6-save.png (renamed from doc/src/images/addressbook-tutorial-part6-save.png)bin24747 -> 24747 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part6-screenshot.png (renamed from doc/src/images/addressbook-tutorial-part6-screenshot.png)bin16819 -> 16819 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-part7-screenshot.png (renamed from doc/src/images/addressbook-tutorial-part7-screenshot.png)bin18369 -> 18369 bytes
-rw-r--r--src/widgets/doc/images/addressbook-tutorial-screenshot.png (renamed from doc/src/images/addressbook-tutorial-screenshot.png)bin15275 -> 15275 bytes
-rw-r--r--src/widgets/doc/images/assistant-toolbar.pngbin0 -> 6532 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-gnomelayout-horizontal.pngbin0 -> 4188 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-gnomelayout-vertical.pngbin0 -> 5027 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-kdelayout-horizontal.pngbin0 -> 2862 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-kdelayout-vertical.pngbin0 -> 3298 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-mac-modeless-horizontal.pngbin0 -> 4123 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-mac-modeless-vertical.pngbin0 -> 5177 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-maclayout-horizontal.pngbin0 -> 5409 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-maclayout-vertical.pngbin0 -> 7340 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-winlayout-horizontal.pngbin0 -> 2780 bytes
-rw-r--r--src/widgets/doc/images/buttonbox-winlayout-vertical.pngbin0 -> 3184 bytes
-rw-r--r--src/widgets/doc/images/cde-calendarwidget.png (renamed from doc/src/images/cde-calendarwidget.png)bin10187 -> 10187 bytes
-rw-r--r--src/widgets/doc/images/cde-checkbox.png (renamed from doc/src/images/cde-checkbox.png)bin1331 -> 1331 bytes
-rw-r--r--src/widgets/doc/images/cde-combobox.png (renamed from doc/src/images/cde-combobox.png)bin1269 -> 1269 bytes
-rw-r--r--src/widgets/doc/images/cde-dateedit.png (renamed from doc/src/images/cde-dateedit.png)bin1183 -> 1183 bytes
-rw-r--r--src/widgets/doc/images/cde-datetimeedit.png (renamed from doc/src/images/cde-datetimeedit.png)bin1701 -> 1701 bytes
-rw-r--r--src/widgets/doc/images/cde-dial.png (renamed from doc/src/images/cde-dial.png)bin4481 -> 4481 bytes
-rw-r--r--src/widgets/doc/images/cde-doublespinbox.png (renamed from doc/src/images/cde-doublespinbox.png)bin1007 -> 1007 bytes
-rw-r--r--src/widgets/doc/images/cde-fontcombobox.png (renamed from doc/src/images/cde-fontcombobox.png)bin1603 -> 1603 bytes
-rw-r--r--src/widgets/doc/images/cde-frame.png (renamed from doc/src/images/cde-frame.png)bin2976 -> 2976 bytes
-rw-r--r--src/widgets/doc/images/cde-groupbox.png (renamed from doc/src/images/cde-groupbox.png)bin2592 -> 2592 bytes
-rw-r--r--src/widgets/doc/images/cde-horizontalscrollbar.png (renamed from doc/src/images/cde-horizontalscrollbar.png)bin569 -> 569 bytes
-rw-r--r--src/widgets/doc/images/cde-label.png (renamed from doc/src/images/cde-label.png)bin1043 -> 1043 bytes
-rw-r--r--src/widgets/doc/images/cde-lcdnumber.png (renamed from doc/src/images/cde-lcdnumber.png)bin538 -> 538 bytes
-rw-r--r--src/widgets/doc/images/cde-lineedit.png (renamed from doc/src/images/cde-lineedit.png)bin1355 -> 1355 bytes
-rw-r--r--src/widgets/doc/images/cde-listview.png (renamed from doc/src/images/cde-listview.png)bin5166 -> 5166 bytes
-rw-r--r--src/widgets/doc/images/cde-progressbar.png (renamed from doc/src/images/cde-progressbar.png)bin934 -> 934 bytes
-rw-r--r--src/widgets/doc/images/cde-pushbutton.png (renamed from doc/src/images/cde-pushbutton.png)bin1099 -> 1099 bytes
-rw-r--r--src/widgets/doc/images/cde-radiobutton.png (renamed from doc/src/images/cde-radiobutton.png)bin1562 -> 1562 bytes
-rw-r--r--src/widgets/doc/images/cde-slider.png (renamed from doc/src/images/cde-slider.png)bin526 -> 526 bytes
-rw-r--r--src/widgets/doc/images/cde-spinbox.png (renamed from doc/src/images/cde-spinbox.png)bin863 -> 863 bytes
-rw-r--r--src/widgets/doc/images/cde-tableview.png (renamed from doc/src/images/cde-tableview.png)bin2467 -> 2467 bytes
-rw-r--r--src/widgets/doc/images/cde-tabwidget.png (renamed from doc/src/images/cde-tabwidget.png)bin2483 -> 2483 bytes
-rw-r--r--src/widgets/doc/images/cde-textedit.png (renamed from doc/src/images/cde-textedit.png)bin7374 -> 7374 bytes
-rw-r--r--src/widgets/doc/images/cde-timeedit.png (renamed from doc/src/images/cde-timeedit.png)bin1248 -> 1248 bytes
-rw-r--r--src/widgets/doc/images/cde-toolbox.png (renamed from doc/src/images/cde-toolbox.png)bin1813 -> 1813 bytes
-rw-r--r--src/widgets/doc/images/cde-toolbutton.png (renamed from doc/src/images/cde-toolbutton.png)bin1169 -> 1169 bytes
-rw-r--r--src/widgets/doc/images/cde-treeview.png (renamed from doc/src/images/cde-treeview.png)bin6703 -> 6703 bytes
-rw-r--r--src/widgets/doc/images/checkboxes-exclusive.pngbin0 -> 5079 bytes
-rw-r--r--src/widgets/doc/images/checkboxes-non-exclusive.pngbin0 -> 5614 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-calendarwidget.png (renamed from doc/src/images/cleanlooks-calendarwidget.png)bin9748 -> 9748 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-checkbox.png (renamed from doc/src/images/cleanlooks-checkbox.png)bin1416 -> 1416 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-combobox.png (renamed from doc/src/images/cleanlooks-combobox.png)bin2348 -> 2348 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-dateedit.png (renamed from doc/src/images/cleanlooks-dateedit.png)bin1369 -> 1369 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-datetimeedit.png (renamed from doc/src/images/cleanlooks-datetimeedit.png)bin1892 -> 1892 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-dial.png (renamed from doc/src/images/cleanlooks-dial.png)bin4297 -> 4297 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-doublespinbox.png (renamed from doc/src/images/cleanlooks-doublespinbox.png)bin1141 -> 1141 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-fontcombobox.png (renamed from doc/src/images/cleanlooks-fontcombobox.png)bin1835 -> 1835 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-frame.png (renamed from doc/src/images/cleanlooks-frame.png)bin2989 -> 2989 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-groupbox.png (renamed from doc/src/images/cleanlooks-groupbox.png)bin2630 -> 2630 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-horizontalscrollbar.png (renamed from doc/src/images/cleanlooks-horizontalscrollbar.png)bin837 -> 837 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-label.png (renamed from doc/src/images/cleanlooks-label.png)bin1043 -> 1043 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-lcdnumber.png (renamed from doc/src/images/cleanlooks-lcdnumber.png)bin538 -> 538 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-lineedit.png (renamed from doc/src/images/cleanlooks-lineedit.png)bin1406 -> 1406 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-listview.png (renamed from doc/src/images/cleanlooks-listview.png)bin5559 -> 5559 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-progressbar.png (renamed from doc/src/images/cleanlooks-progressbar.png)bin1292 -> 1292 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-pushbutton-menu.pngbin0 -> 3177 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-pushbutton.png (renamed from doc/src/images/cleanlooks-pushbutton.png)bin1332 -> 1332 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-radiobutton.png (renamed from doc/src/images/cleanlooks-radiobutton.png)bin1782 -> 1782 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-slider.png (renamed from doc/src/images/cleanlooks-slider.png)bin671 -> 671 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-spinbox.png (renamed from doc/src/images/cleanlooks-spinbox.png)bin983 -> 983 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-tableview.png (renamed from doc/src/images/cleanlooks-tableview.png)bin2465 -> 2465 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-tabwidget.png (renamed from doc/src/images/cleanlooks-tabwidget.png)bin5007 -> 5007 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-textedit.png (renamed from doc/src/images/cleanlooks-textedit.png)bin7560 -> 7560 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-timeedit.png (renamed from doc/src/images/cleanlooks-timeedit.png)bin1388 -> 1388 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-toolbox.png (renamed from doc/src/images/cleanlooks-toolbox.png)bin1445 -> 1445 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-toolbutton.png (renamed from doc/src/images/cleanlooks-toolbutton.png)bin1469 -> 1469 bytes
-rw-r--r--src/widgets/doc/images/cleanlooks-treeview.png (renamed from doc/src/images/cleanlooks-treeview.png)bin6981 -> 6981 bytes
-rw-r--r--src/widgets/doc/images/clock.png (renamed from doc/src/images/clock.png)bin16514 -> 16514 bytes
-rw-r--r--src/widgets/doc/images/columnview.pngbin0 -> 3480 bytes
-rw-r--r--src/widgets/doc/images/designer-stylesheet-options.png (renamed from doc/src/images/designer-stylesheet-options.png)bin18914 -> 18914 bytes
-rw-r--r--src/widgets/doc/images/designer-stylesheet-usage.png (renamed from doc/src/images/designer-stylesheet-usage.png)bin8128 -> 8128 bytes
-rw-r--r--src/widgets/doc/images/designer-validator-highlighter.png (renamed from doc/src/images/designer-validator-highlighter.png)bin27153 -> 27153 bytes
-rw-r--r--src/widgets/doc/images/dummy_tree.png (renamed from doc/src/images/dummy_tree.png)bin20189 -> 20189 bytes
-rw-r--r--src/widgets/doc/images/example_model.png (renamed from doc/src/images/example_model.png)bin16577 -> 16577 bytes
-rw-r--r--src/widgets/doc/images/filedialogurls.png (renamed from doc/src/images/filedialogurls.png)bin29132 -> 29132 bytes
-rw-r--r--src/widgets/doc/images/frames.png (renamed from doc/src/images/frames.png)bin25735 -> 25735 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-ellipseitem-pie.pngbin0 -> 6683 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-ellipseitem.pngbin0 -> 5801 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-items.png (renamed from doc/src/images/graphicsview-items.png)bin62593 -> 62593 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-pathitem.png (renamed from doc/src/images/graphicsview-pathitem.png)bin5710 -> 5710 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-pixmapitem.png (renamed from doc/src/images/graphicsview-pixmapitem.png)bin10764 -> 10764 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-polygonitem.png (renamed from doc/src/images/graphicsview-polygonitem.png)bin5829 -> 5829 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-rectitem.png (renamed from doc/src/images/graphicsview-rectitem.png)bin3305 -> 3305 bytes
-rw-r--r--src/widgets/doc/images/graphicsview-zorder.png (renamed from doc/src/images/graphicsview-zorder.png)bin6724 -> 6724 bytes
-rw-r--r--src/widgets/doc/images/gridlayout.png (renamed from doc/src/images/gridlayout.png)bin1445 -> 1445 bytes
-rw-r--r--src/widgets/doc/images/gtk-calendarwidget.png (renamed from doc/src/images/gtk-calendarwidget.png)bin16761 -> 16761 bytes
-rw-r--r--src/widgets/doc/images/gtk-checkbox.png (renamed from doc/src/images/gtk-checkbox.png)bin2323 -> 2323 bytes
-rw-r--r--src/widgets/doc/images/gtk-combobox.png (renamed from doc/src/images/gtk-combobox.png)bin2730 -> 2730 bytes
-rw-r--r--src/widgets/doc/images/gtk-dateedit.png (renamed from doc/src/images/gtk-dateedit.png)bin2163 -> 2163 bytes
-rw-r--r--src/widgets/doc/images/gtk-datetimeedit.png (renamed from doc/src/images/gtk-datetimeedit.png)bin2923 -> 2923 bytes
-rw-r--r--src/widgets/doc/images/gtk-dial.png (renamed from doc/src/images/gtk-dial.png)bin7221 -> 7221 bytes
-rw-r--r--src/widgets/doc/images/gtk-doublespinbox.png (renamed from doc/src/images/gtk-doublespinbox.png)bin2325 -> 2325 bytes
-rw-r--r--src/widgets/doc/images/gtk-fontcombobox.png (renamed from doc/src/images/gtk-fontcombobox.png)bin3022 -> 3022 bytes
-rw-r--r--src/widgets/doc/images/gtk-frame.png (renamed from doc/src/images/gtk-frame.png)bin2340 -> 2340 bytes
-rw-r--r--src/widgets/doc/images/gtk-groupbox.png (renamed from doc/src/images/gtk-groupbox.png)bin6650 -> 6650 bytes
-rw-r--r--src/widgets/doc/images/gtk-horizontalscrollbar.png (renamed from doc/src/images/gtk-horizontalscrollbar.png)bin1701 -> 1701 bytes
-rw-r--r--src/widgets/doc/images/gtk-label.png (renamed from doc/src/images/gtk-label.png)bin1582 -> 1582 bytes
-rw-r--r--src/widgets/doc/images/gtk-lcdnumber.png (renamed from doc/src/images/gtk-lcdnumber.png)bin1193 -> 1193 bytes
-rw-r--r--src/widgets/doc/images/gtk-lineedit.png (renamed from doc/src/images/gtk-lineedit.png)bin2528 -> 2528 bytes
-rw-r--r--src/widgets/doc/images/gtk-listview.png (renamed from doc/src/images/gtk-listview.png)bin8493 -> 8493 bytes
-rw-r--r--src/widgets/doc/images/gtk-progressbar.png (renamed from doc/src/images/gtk-progressbar.png)bin2228 -> 2228 bytes
-rw-r--r--src/widgets/doc/images/gtk-pushbutton.png (renamed from doc/src/images/gtk-pushbutton.png)bin2153 -> 2153 bytes
-rw-r--r--src/widgets/doc/images/gtk-radiobutton.png (renamed from doc/src/images/gtk-radiobutton.png)bin3142 -> 3142 bytes
-rw-r--r--src/widgets/doc/images/gtk-slider.png (renamed from doc/src/images/gtk-slider.png)bin1359 -> 1359 bytes
-rw-r--r--src/widgets/doc/images/gtk-spinbox.png (renamed from doc/src/images/gtk-spinbox.png)bin2078 -> 2078 bytes
-rw-r--r--src/widgets/doc/images/gtk-tableview.png (renamed from doc/src/images/gtk-tableview.png)bin8364 -> 8364 bytes
-rw-r--r--src/widgets/doc/images/gtk-tabwidget.png (renamed from doc/src/images/gtk-tabwidget.png)bin8179 -> 8179 bytes
-rw-r--r--src/widgets/doc/images/gtk-textedit.png (renamed from doc/src/images/gtk-textedit.png)bin12641 -> 12641 bytes
-rw-r--r--src/widgets/doc/images/gtk-timeedit.png (renamed from doc/src/images/gtk-timeedit.png)bin2621 -> 2621 bytes
-rw-r--r--src/widgets/doc/images/gtk-toolbox.png (renamed from doc/src/images/gtk-toolbox.png)bin4240 -> 4240 bytes
-rw-r--r--src/widgets/doc/images/gtk-toolbutton.png (renamed from doc/src/images/gtk-toolbutton.png)bin2260 -> 2260 bytes
-rw-r--r--src/widgets/doc/images/gtk-treeview.png (renamed from doc/src/images/gtk-treeview.png)bin9722 -> 9722 bytes
-rw-r--r--src/widgets/doc/images/javastyle/branchindicatorimage.png (renamed from doc/src/images/javastyle/branchindicatorimage.png)bin18867 -> 18867 bytes
-rw-r--r--src/widgets/doc/images/javastyle/button.png (renamed from doc/src/images/javastyle/button.png)bin5475 -> 5475 bytes
-rw-r--r--src/widgets/doc/images/javastyle/checkbox.png (renamed from doc/src/images/javastyle/checkbox.png)bin3634 -> 3634 bytes
-rw-r--r--src/widgets/doc/images/javastyle/checkboxexample.png (renamed from doc/src/images/javastyle/checkboxexample.png)bin911 -> 911 bytes
-rw-r--r--src/widgets/doc/images/javastyle/combobox.png (renamed from doc/src/images/javastyle/combobox.png)bin3537 -> 3537 bytes
-rw-r--r--src/widgets/doc/images/javastyle/comboboximage.png (renamed from doc/src/images/javastyle/comboboximage.png)bin6527 -> 6527 bytes
-rw-r--r--src/widgets/doc/images/javastyle/conceptualpushbuttontree.png (renamed from doc/src/images/javastyle/conceptualpushbuttontree.png)bin3590 -> 3590 bytes
-rw-r--r--src/widgets/doc/images/javastyle/dockwidget.png (renamed from doc/src/images/javastyle/dockwidget.png)bin7181 -> 7181 bytes
-rw-r--r--src/widgets/doc/images/javastyle/dockwidgetimage.png (renamed from doc/src/images/javastyle/dockwidgetimage.png)bin21774 -> 21774 bytes
-rw-r--r--src/widgets/doc/images/javastyle/groupbox.png (renamed from doc/src/images/javastyle/groupbox.png)bin2010 -> 2010 bytes
-rw-r--r--src/widgets/doc/images/javastyle/groupboximage.png (renamed from doc/src/images/javastyle/groupboximage.png)bin7067 -> 7067 bytes
-rw-r--r--src/widgets/doc/images/javastyle/header.png (renamed from doc/src/images/javastyle/header.png)bin4399 -> 4399 bytes
-rw-r--r--src/widgets/doc/images/javastyle/headerimage.png (renamed from doc/src/images/javastyle/headerimage.png)bin6474 -> 6474 bytes
-rw-r--r--src/widgets/doc/images/javastyle/menu.png (renamed from doc/src/images/javastyle/menu.png)bin6508 -> 6508 bytes
-rw-r--r--src/widgets/doc/images/javastyle/menubar.png (renamed from doc/src/images/javastyle/menubar.png)bin4315 -> 4315 bytes
-rw-r--r--src/widgets/doc/images/javastyle/menubarimage.png (renamed from doc/src/images/javastyle/menubarimage.png)bin4487 -> 4487 bytes
-rw-r--r--src/widgets/doc/images/javastyle/menuimage.png (renamed from doc/src/images/javastyle/menuimage.png)bin5584 -> 5584 bytes
-rw-r--r--src/widgets/doc/images/javastyle/progressbar.png (renamed from doc/src/images/javastyle/progressbar.png)bin4493 -> 4493 bytes
-rw-r--r--src/widgets/doc/images/javastyle/progressbarimage.png (renamed from doc/src/images/javastyle/progressbarimage.png)bin6921 -> 6921 bytes
-rw-r--r--src/widgets/doc/images/javastyle/pushbutton.png (renamed from doc/src/images/javastyle/pushbutton.png)bin6820 -> 6820 bytes
-rw-r--r--src/widgets/doc/images/javastyle/rubberband.png (renamed from doc/src/images/javastyle/rubberband.png)bin765 -> 765 bytes
-rw-r--r--src/widgets/doc/images/javastyle/rubberbandimage.png (renamed from doc/src/images/javastyle/rubberbandimage.png)bin6452 -> 6452 bytes
-rw-r--r--src/widgets/doc/images/javastyle/scrollbar.png (renamed from doc/src/images/javastyle/scrollbar.png)bin7199 -> 7199 bytes
-rw-r--r--src/widgets/doc/images/javastyle/scrollbarimage.png (renamed from doc/src/images/javastyle/scrollbarimage.png)bin6196 -> 6196 bytes
-rw-r--r--src/widgets/doc/images/javastyle/sizegrip.png (renamed from doc/src/images/javastyle/sizegrip.png)bin708 -> 708 bytes
-rw-r--r--src/widgets/doc/images/javastyle/sizegripimage.png (renamed from doc/src/images/javastyle/sizegripimage.png)bin1793 -> 1793 bytes
-rw-r--r--src/widgets/doc/images/javastyle/slider.png (renamed from doc/src/images/javastyle/slider.png)bin2844 -> 2844 bytes
-rw-r--r--src/widgets/doc/images/javastyle/sliderimage.png (renamed from doc/src/images/javastyle/sliderimage.png)bin3442 -> 3442 bytes
-rw-r--r--src/widgets/doc/images/javastyle/spinbox.png (renamed from doc/src/images/javastyle/spinbox.png)bin2864 -> 2864 bytes
-rw-r--r--src/widgets/doc/images/javastyle/spinboximage.png (renamed from doc/src/images/javastyle/spinboximage.png)bin4544 -> 4544 bytes
-rw-r--r--src/widgets/doc/images/javastyle/tab.png (renamed from doc/src/images/javastyle/tab.png)bin12176 -> 12176 bytes
-rw-r--r--src/widgets/doc/images/javastyle/tabwidget.png (renamed from doc/src/images/javastyle/tabwidget.png)bin4725 -> 4725 bytes
-rw-r--r--src/widgets/doc/images/javastyle/titlebar.png (renamed from doc/src/images/javastyle/titlebar.png)bin2609 -> 2609 bytes
-rw-r--r--src/widgets/doc/images/javastyle/titlebarimage.png (renamed from doc/src/images/javastyle/titlebarimage.png)bin6882 -> 6882 bytes
-rw-r--r--src/widgets/doc/images/javastyle/toolbar.png (renamed from doc/src/images/javastyle/toolbar.png)bin6303 -> 6303 bytes
-rw-r--r--src/widgets/doc/images/javastyle/toolbarimage.png (renamed from doc/src/images/javastyle/toolbarimage.png)bin8245 -> 8245 bytes
-rw-r--r--src/widgets/doc/images/javastyle/toolbox.png (renamed from doc/src/images/javastyle/toolbox.png)bin3211 -> 3211 bytes
-rw-r--r--src/widgets/doc/images/javastyle/toolboximage.png (renamed from doc/src/images/javastyle/toolboximage.png)bin5580 -> 5580 bytes
-rw-r--r--src/widgets/doc/images/javastyle/toolbutton.png (renamed from doc/src/images/javastyle/toolbutton.png)bin4487 -> 4487 bytes
-rw-r--r--src/widgets/doc/images/javastyle/toolbuttonimage.png (renamed from doc/src/images/javastyle/toolbuttonimage.png)bin5124 -> 5124 bytes
-rw-r--r--src/widgets/doc/images/javastyle/windowstabimage.png (renamed from doc/src/images/javastyle/windowstabimage.png)bin6898 -> 6898 bytes
-rw-r--r--src/widgets/doc/images/licensewizard-flow.png (renamed from doc/src/images/licensewizard-flow.png)bin15306 -> 15306 bytes
-rw-r--r--src/widgets/doc/images/list_table_tree.png (renamed from doc/src/images/list_table_tree.png)bin85530 -> 85530 bytes
-rwxr-xr-xsrc/widgets/doc/images/listview.pngbin0 -> 9695 bytes
-rw-r--r--src/widgets/doc/images/macintosh-calendarwidget.png (renamed from doc/src/images/macintosh-calendarwidget.png)bin13560 -> 13560 bytes
-rw-r--r--src/widgets/doc/images/macintosh-checkbox.png (renamed from doc/src/images/macintosh-checkbox.png)bin2473 -> 2473 bytes
-rw-r--r--src/widgets/doc/images/macintosh-combobox.png (renamed from doc/src/images/macintosh-combobox.png)bin3273 -> 3273 bytes
-rw-r--r--src/widgets/doc/images/macintosh-dateedit.png (renamed from doc/src/images/macintosh-dateedit.png)bin1703 -> 1703 bytes
-rw-r--r--src/widgets/doc/images/macintosh-datetimeedit.png (renamed from doc/src/images/macintosh-datetimeedit.png)bin2633 -> 2633 bytes
-rw-r--r--src/widgets/doc/images/macintosh-dial.png (renamed from doc/src/images/macintosh-dial.png)bin2563 -> 2563 bytes
-rw-r--r--src/widgets/doc/images/macintosh-doublespinbox.png (renamed from doc/src/images/macintosh-doublespinbox.png)bin2306 -> 2306 bytes
-rw-r--r--src/widgets/doc/images/macintosh-fontcombobox.png (renamed from doc/src/images/macintosh-fontcombobox.png)bin2967 -> 2967 bytes
-rw-r--r--src/widgets/doc/images/macintosh-frame.png (renamed from doc/src/images/macintosh-frame.png)bin6187 -> 6187 bytes
-rw-r--r--src/widgets/doc/images/macintosh-groupbox.png (renamed from doc/src/images/macintosh-groupbox.png)bin6469 -> 6469 bytes
-rw-r--r--src/widgets/doc/images/macintosh-horizontalscrollbar.png (renamed from doc/src/images/macintosh-horizontalscrollbar.png)bin2242 -> 2242 bytes
-rw-r--r--src/widgets/doc/images/macintosh-label.png (renamed from doc/src/images/macintosh-label.png)bin1450 -> 1450 bytes
-rw-r--r--src/widgets/doc/images/macintosh-lcdnumber.png (renamed from doc/src/images/macintosh-lcdnumber.png)bin492 -> 492 bytes
-rw-r--r--src/widgets/doc/images/macintosh-lineedit.png (renamed from doc/src/images/macintosh-lineedit.png)bin1854 -> 1854 bytes
-rw-r--r--src/widgets/doc/images/macintosh-listview.png (renamed from doc/src/images/macintosh-listview.png)bin9987 -> 9987 bytes
-rw-r--r--src/widgets/doc/images/macintosh-menu.pngbin0 -> 6891 bytes
-rw-r--r--src/widgets/doc/images/macintosh-progressbar.png (renamed from doc/src/images/macintosh-progressbar.png)bin1127 -> 1127 bytes
-rw-r--r--src/widgets/doc/images/macintosh-pushbutton.png (renamed from doc/src/images/macintosh-pushbutton.png)bin2966 -> 2966 bytes
-rw-r--r--src/widgets/doc/images/macintosh-radiobutton.png (renamed from doc/src/images/macintosh-radiobutton.png)bin2914 -> 2914 bytes
-rw-r--r--src/widgets/doc/images/macintosh-slider.png (renamed from doc/src/images/macintosh-slider.png)bin1694 -> 1694 bytes
-rw-r--r--src/widgets/doc/images/macintosh-spinbox.png (renamed from doc/src/images/macintosh-spinbox.png)bin1964 -> 1964 bytes
-rw-r--r--src/widgets/doc/images/macintosh-tableview.png (renamed from doc/src/images/macintosh-tableview.png)bin10024 -> 10024 bytes
-rw-r--r--src/widgets/doc/images/macintosh-tabwidget.png (renamed from doc/src/images/macintosh-tabwidget.png)bin9562 -> 9562 bytes
-rw-r--r--src/widgets/doc/images/macintosh-textedit.png (renamed from doc/src/images/macintosh-textedit.png)bin7845 -> 7845 bytes
-rw-r--r--src/widgets/doc/images/macintosh-timeedit.png (renamed from doc/src/images/macintosh-timeedit.png)bin2244 -> 2244 bytes
-rw-r--r--src/widgets/doc/images/macintosh-toolbox.png (renamed from doc/src/images/macintosh-toolbox.png)bin2576 -> 2576 bytes
-rw-r--r--src/widgets/doc/images/macintosh-toolbutton.png (renamed from doc/src/images/macintosh-toolbutton.png)bin2003 -> 2003 bytes
-rw-r--r--src/widgets/doc/images/macintosh-treeview.png (renamed from doc/src/images/macintosh-treeview.png)bin11728 -> 11728 bytes
-rw-r--r--src/widgets/doc/images/mainwindow-docks-example.png (renamed from doc/src/images/mainwindow-docks-example.png)bin14427 -> 14427 bytes
-rw-r--r--src/widgets/doc/images/mainwindow-docks.png (renamed from doc/src/images/mainwindow-docks.png)bin37240 -> 37240 bytes
-rw-r--r--src/widgets/doc/images/mainwindowlayout.png (renamed from doc/src/images/mainwindowlayout.png)bin6782 -> 6782 bytes
-rw-r--r--src/widgets/doc/images/mdi-cascade.pngbin0 -> 14590 bytes
-rw-r--r--src/widgets/doc/images/mdi-tile.pngbin0 -> 31624 bytes
-rwxr-xr-xsrc/widgets/doc/images/modelview-combobox.pngbin0 -> 5022 bytes
-rw-r--r--src/widgets/doc/images/modelview-header.png (renamed from doc/src/images/modelview-header.png)bin30302 -> 30302 bytes
-rw-r--r--src/widgets/doc/images/modelview-models.pngbin0 -> 20540 bytes
-rw-r--r--src/widgets/doc/images/modelview-overview.pngbin0 -> 15042 bytes
-rw-r--r--src/widgets/doc/images/modelview-roles.pngbin0 -> 24954 bytes
-rw-r--r--src/widgets/doc/images/modelview-tablemodel.pngbin0 -> 12256 bytes
-rw-r--r--src/widgets/doc/images/modelview-treemodel.pngbin0 -> 9193 bytes
-rw-r--r--src/widgets/doc/images/modelview.png (renamed from doc/src/images/modelview.png)bin2887 -> 2887 bytes
-rw-r--r--src/widgets/doc/images/motif-calendarwidget.png (renamed from doc/src/images/motif-calendarwidget.png)bin9989 -> 9989 bytes
-rw-r--r--src/widgets/doc/images/motif-checkbox.png (renamed from doc/src/images/motif-checkbox.png)bin1284 -> 1284 bytes
-rw-r--r--src/widgets/doc/images/motif-combobox.png (renamed from doc/src/images/motif-combobox.png)bin1276 -> 1276 bytes
-rw-r--r--src/widgets/doc/images/motif-dateedit.png (renamed from doc/src/images/motif-dateedit.png)bin1214 -> 1214 bytes
-rw-r--r--src/widgets/doc/images/motif-datetimeedit.png (renamed from doc/src/images/motif-datetimeedit.png)bin1730 -> 1730 bytes
-rw-r--r--src/widgets/doc/images/motif-dial.png (renamed from doc/src/images/motif-dial.png)bin2017 -> 2017 bytes
-rw-r--r--src/widgets/doc/images/motif-doublespinbox.png (renamed from doc/src/images/motif-doublespinbox.png)bin1019 -> 1019 bytes
-rw-r--r--src/widgets/doc/images/motif-fontcombobox.png (renamed from doc/src/images/motif-fontcombobox.png)bin1633 -> 1633 bytes
-rw-r--r--src/widgets/doc/images/motif-frame.png (renamed from doc/src/images/motif-frame.png)bin5631 -> 5631 bytes
-rw-r--r--src/widgets/doc/images/motif-groupbox.png (renamed from doc/src/images/motif-groupbox.png)bin2514 -> 2514 bytes
-rw-r--r--src/widgets/doc/images/motif-horizontalscrollbar.png (renamed from doc/src/images/motif-horizontalscrollbar.png)bin628 -> 628 bytes
-rw-r--r--src/widgets/doc/images/motif-label.png (renamed from doc/src/images/motif-label.png)bin699 -> 699 bytes
-rw-r--r--src/widgets/doc/images/motif-lcdnumber.png (renamed from doc/src/images/motif-lcdnumber.png)bin538 -> 538 bytes
-rw-r--r--src/widgets/doc/images/motif-lineedit.png (renamed from doc/src/images/motif-lineedit.png)bin1360 -> 1360 bytes
-rw-r--r--src/widgets/doc/images/motif-listview.png (renamed from doc/src/images/motif-listview.png)bin5189 -> 5189 bytes
-rw-r--r--src/widgets/doc/images/motif-menubar.pngbin0 -> 1350 bytes
-rw-r--r--src/widgets/doc/images/motif-progressbar.png (renamed from doc/src/images/motif-progressbar.png)bin927 -> 927 bytes
-rw-r--r--src/widgets/doc/images/motif-pushbutton.png (renamed from doc/src/images/motif-pushbutton.png)bin1045 -> 1045 bytes
-rw-r--r--src/widgets/doc/images/motif-radiobutton.png (renamed from doc/src/images/motif-radiobutton.png)bin1545 -> 1545 bytes
-rw-r--r--src/widgets/doc/images/motif-slider.png (renamed from doc/src/images/motif-slider.png)bin543 -> 543 bytes
-rw-r--r--src/widgets/doc/images/motif-spinbox.png (renamed from doc/src/images/motif-spinbox.png)bin875 -> 875 bytes
-rw-r--r--src/widgets/doc/images/motif-tableview.png (renamed from doc/src/images/motif-tableview.png)bin3102 -> 3102 bytes
-rw-r--r--src/widgets/doc/images/motif-tabwidget.png (renamed from doc/src/images/motif-tabwidget.png)bin2490 -> 2490 bytes
-rw-r--r--src/widgets/doc/images/motif-textedit.png (renamed from doc/src/images/motif-textedit.png)bin7378 -> 7378 bytes
-rw-r--r--src/widgets/doc/images/motif-timeedit.png (renamed from doc/src/images/motif-timeedit.png)bin1280 -> 1280 bytes
-rw-r--r--src/widgets/doc/images/motif-toolbox.png (renamed from doc/src/images/motif-toolbox.png)bin1667 -> 1667 bytes
-rw-r--r--src/widgets/doc/images/motif-toolbutton.png (renamed from doc/src/images/motif-toolbutton.png)bin1152 -> 1152 bytes
-rw-r--r--src/widgets/doc/images/motif-treeview.png (renamed from doc/src/images/motif-treeview.png)bin6386 -> 6386 bytes
-rw-r--r--src/widgets/doc/images/msgbox1.png (renamed from doc/src/images/msgbox1.png)bin4529 -> 4529 bytes
-rw-r--r--src/widgets/doc/images/msgbox2.png (renamed from doc/src/images/msgbox2.png)bin9175 -> 9175 bytes
-rw-r--r--src/widgets/doc/images/msgbox3.png (renamed from doc/src/images/msgbox3.png)bin9589 -> 9589 bytes
-rw-r--r--src/widgets/doc/images/msgbox4.png (renamed from doc/src/images/msgbox4.png)bin17520 -> 17520 bytes
-rw-r--r--src/widgets/doc/images/pangesture.png (renamed from doc/src/images/pangesture.png)bin7153 -> 7153 bytes
-rw-r--r--src/widgets/doc/images/parent-child-widgets.png (renamed from doc/src/images/parent-child-widgets.png)bin47824 -> 47824 bytes
-rw-r--r--src/widgets/doc/images/pinchgesture.png (renamed from doc/src/images/pinchgesture.png)bin10094 -> 10094 bytes
-rw-r--r--src/widgets/doc/images/plastique-calendarwidget.png (renamed from doc/src/images/plastique-calendarwidget.png)bin9629 -> 9629 bytes
-rw-r--r--src/widgets/doc/images/plastique-checkbox.png (renamed from doc/src/images/plastique-checkbox.png)bin1069 -> 1069 bytes
-rw-r--r--src/widgets/doc/images/plastique-colordialog.png (renamed from doc/src/images/plastique-colordialog.png)bin22595 -> 22595 bytes
-rw-r--r--src/widgets/doc/images/plastique-combobox.png (renamed from doc/src/images/plastique-combobox.png)bin1714 -> 1714 bytes
-rw-r--r--src/widgets/doc/images/plastique-dateedit.png (renamed from doc/src/images/plastique-dateedit.png)bin1271 -> 1271 bytes
-rw-r--r--src/widgets/doc/images/plastique-datetimeedit.png (renamed from doc/src/images/plastique-datetimeedit.png)bin1771 -> 1771 bytes
-rw-r--r--src/widgets/doc/images/plastique-dial.png (renamed from doc/src/images/plastique-dial.png)bin2995 -> 2995 bytes
-rw-r--r--src/widgets/doc/images/plastique-doublespinbox.png (renamed from doc/src/images/plastique-doublespinbox.png)bin1102 -> 1102 bytes
-rw-r--r--src/widgets/doc/images/plastique-fontcombobox.png (renamed from doc/src/images/plastique-fontcombobox.png)bin1904 -> 1904 bytes
-rw-r--r--src/widgets/doc/images/plastique-fontdialog.png (renamed from doc/src/images/plastique-fontdialog.png)bin23835 -> 23835 bytes
-rw-r--r--src/widgets/doc/images/plastique-frame.png (renamed from doc/src/images/plastique-frame.png)bin5616 -> 5616 bytes
-rw-r--r--src/widgets/doc/images/plastique-groupbox.png (renamed from doc/src/images/plastique-groupbox.png)bin2704 -> 2704 bytes
-rw-r--r--src/widgets/doc/images/plastique-horizontalscrollbar.png (renamed from doc/src/images/plastique-horizontalscrollbar.png)bin868 -> 868 bytes
-rw-r--r--src/widgets/doc/images/plastique-label.png (renamed from doc/src/images/plastique-label.png)bin696 -> 696 bytes
-rw-r--r--src/widgets/doc/images/plastique-lcdnumber.png (renamed from doc/src/images/plastique-lcdnumber.png)bin470 -> 470 bytes
-rw-r--r--src/widgets/doc/images/plastique-lineedit.png (renamed from doc/src/images/plastique-lineedit.png)bin1015 -> 1015 bytes
-rw-r--r--src/widgets/doc/images/plastique-listview.png (renamed from doc/src/images/plastique-listview.png)bin4895 -> 4895 bytes
-rw-r--r--src/widgets/doc/images/plastique-menu.pngbin0 -> 3867 bytes
-rw-r--r--src/widgets/doc/images/plastique-menubar.pngbin0 -> 1030 bytes
-rw-r--r--src/widgets/doc/images/plastique-progressbar.png (renamed from doc/src/images/plastique-progressbar.png)bin1044 -> 1044 bytes
-rw-r--r--src/widgets/doc/images/plastique-progressdialog.png (renamed from doc/src/images/plastique-progressdialog.png)bin6311 -> 6311 bytes
-rw-r--r--src/widgets/doc/images/plastique-pushbutton-menu.pngbin0 -> 3354 bytes
-rw-r--r--src/widgets/doc/images/plastique-pushbutton.png (renamed from doc/src/images/plastique-pushbutton.png)bin1409 -> 1409 bytes
-rw-r--r--src/widgets/doc/images/plastique-radiobutton.png (renamed from doc/src/images/plastique-radiobutton.png)bin1667 -> 1667 bytes
-rw-r--r--src/widgets/doc/images/plastique-sizegrip.pngbin0 -> 8168 bytes
-rw-r--r--src/widgets/doc/images/plastique-slider.png (renamed from doc/src/images/plastique-slider.png)bin632 -> 632 bytes
-rw-r--r--src/widgets/doc/images/plastique-spinbox.png (renamed from doc/src/images/plastique-spinbox.png)bin968 -> 968 bytes
-rw-r--r--src/widgets/doc/images/plastique-statusbar.png (renamed from doc/src/images/plastique-statusbar.png)bin878 -> 878 bytes
-rw-r--r--src/widgets/doc/images/plastique-tabbar-truncated.pngbin0 -> 2986 bytes
-rw-r--r--src/widgets/doc/images/plastique-tabbar.pngbin0 -> 2721 bytes
-rw-r--r--src/widgets/doc/images/plastique-tableview.png (renamed from doc/src/images/plastique-tableview.png)bin6052 -> 6052 bytes
-rw-r--r--src/widgets/doc/images/plastique-tabwidget.png (renamed from doc/src/images/plastique-tabwidget.png)bin4705 -> 4705 bytes
-rw-r--r--src/widgets/doc/images/plastique-textedit.png (renamed from doc/src/images/plastique-textedit.png)bin5141 -> 5141 bytes
-rw-r--r--src/widgets/doc/images/plastique-timeedit.png (renamed from doc/src/images/plastique-timeedit.png)bin1336 -> 1336 bytes
-rw-r--r--src/widgets/doc/images/plastique-toolbox.png (renamed from doc/src/images/plastique-toolbox.png)bin1858 -> 1858 bytes
-rw-r--r--src/widgets/doc/images/plastique-toolbutton.png (renamed from doc/src/images/plastique-toolbutton.png)bin1254 -> 1254 bytes
-rw-r--r--src/widgets/doc/images/plastique-treeview.png (renamed from doc/src/images/plastique-treeview.png)bin8453 -> 8453 bytes
-rw-r--r--src/widgets/doc/images/progressBar-stylesheet.png (renamed from doc/src/images/progressBar-stylesheet.png)bin455 -> 455 bytes
-rw-r--r--src/widgets/doc/images/progressBar2-stylesheet.png (renamed from doc/src/images/progressBar2-stylesheet.png)bin494 -> 494 bytes
-rw-r--r--src/widgets/doc/images/propagation-custom.png (renamed from doc/src/images/propagation-custom.png)bin163413 -> 163413 bytes
-rw-r--r--src/widgets/doc/images/propagation-standard.png (renamed from doc/src/images/propagation-standard.png)bin83382 -> 83382 bytes
-rw-r--r--src/widgets/doc/images/qcalendarwidget-grid.png (renamed from doc/src/images/qcalendarwidget-grid.png)bin9601 -> 9601 bytes
-rw-r--r--src/widgets/doc/images/qcalendarwidget-maximum.png (renamed from doc/src/images/qcalendarwidget-maximum.png)bin9709 -> 9709 bytes
-rw-r--r--src/widgets/doc/images/qcalendarwidget-minimum.png (renamed from doc/src/images/qcalendarwidget-minimum.png)bin9770 -> 9770 bytes
-rw-r--r--src/widgets/doc/images/qcolumnview.png (renamed from doc/src/images/qcolumnview.png)bin3075 -> 3075 bytes
-rw-r--r--src/widgets/doc/images/qcompleter.png (renamed from doc/src/images/qcompleter.png)bin17017 -> 17017 bytes
-rw-r--r--src/widgets/doc/images/qdesktopwidget.png (renamed from doc/src/images/qdesktopwidget.png)bin42328 -> 42328 bytes
-rw-r--r--src/widgets/doc/images/qformlayout-kde.pngbin0 -> 1703 bytes
-rw-r--r--src/widgets/doc/images/qformlayout-mac.pngbin0 -> 1706 bytes
-rw-r--r--src/widgets/doc/images/qformlayout-qpe.pngbin0 -> 1764 bytes
-rw-r--r--src/widgets/doc/images/qformlayout-win.pngbin0 -> 1743 bytes
-rw-r--r--src/widgets/doc/images/qformlayout-with-6-children.png (renamed from doc/src/images/qformlayout-with-6-children.png)bin3264 -> 3264 bytes
-rw-r--r--src/widgets/doc/images/qgraphicsproxywidget-embed.png (renamed from doc/src/images/qgraphicsproxywidget-embed.png)bin2199 -> 2199 bytes
-rw-r--r--src/widgets/doc/images/qgridlayout-with-5-children.png (renamed from doc/src/images/qgridlayout-with-5-children.png)bin3201 -> 3201 bytes
-rw-r--r--src/widgets/doc/images/qhboxlayout-with-5-children.png (renamed from doc/src/images/qhboxlayout-with-5-children.png)bin2652 -> 2652 bytes
-rw-r--r--src/widgets/doc/images/qmdisubwindowlayout.png (renamed from doc/src/images/qmdisubwindowlayout.png)bin3153 -> 3153 bytes
-rw-r--r--src/widgets/doc/images/qscrollarea-noscrollbars.pngbin0 -> 54671 bytes
-rw-r--r--src/widgets/doc/images/qscrollarea-onescrollbar.pngbin0 -> 77476 bytes
-rw-r--r--src/widgets/doc/images/qscrollarea-twoscrollbars.pngbin0 -> 78046 bytes
-rw-r--r--src/widgets/doc/images/qscrollbar-picture.png (renamed from doc/src/images/qscrollbar-picture.png)bin6568 -> 6568 bytes
-rw-r--r--src/widgets/doc/images/qscrollbar-values.pngbin0 -> 15902 bytes
-rw-r--r--src/widgets/doc/images/qspinbox-plusminus.pngbin0 -> 375 bytes
-rw-r--r--src/widgets/doc/images/qspinbox-updown.pngbin0 -> 402 bytes
-rw-r--r--src/widgets/doc/images/qstyle-comboboxes.png (renamed from doc/src/images/qstyle-comboboxes.png)bin19437 -> 19437 bytes
-rw-r--r--src/widgets/doc/images/qstyleoptiontoolbar-position.png (renamed from doc/src/images/qstyleoptiontoolbar-position.png)bin13707 -> 13707 bytes
-rw-r--r--src/widgets/doc/images/qtableview-resized.pngbin0 -> 42232 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-aero1.pngbin0 -> 11749 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-aero2.pngbin0 -> 16560 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-classic1.pngbin0 -> 39640 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-classic2.pngbin0 -> 8616 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-mac1.pngbin0 -> 25478 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-mac2.pngbin0 -> 29591 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-macpage.png (renamed from doc/src/images/qtwizard-macpage.png)bin23095 -> 23095 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-modern1.pngbin0 -> 45093 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-modern2.pngbin0 -> 15081 bytes
-rw-r--r--src/widgets/doc/images/qtwizard-nonmacpage.png (renamed from doc/src/images/qtwizard-nonmacpage.png)bin26557 -> 26557 bytes
-rw-r--r--src/widgets/doc/images/qundoview.png (renamed from doc/src/images/qundoview.png)bin5993 -> 5993 bytes
-rw-r--r--src/widgets/doc/images/qvboxlayout-with-5-children.png (renamed from doc/src/images/qvboxlayout-with-5-children.png)bin2974 -> 2974 bytes
-rw-r--r--src/widgets/doc/images/readonlytable_role.png (renamed from doc/src/images/readonlytable_role.png)bin27467 -> 27467 bytes
-rw-r--r--src/widgets/doc/images/selected-items1.pngbin0 -> 31870 bytes
-rw-r--r--src/widgets/doc/images/selected-items2.pngbin0 -> 32025 bytes
-rw-r--r--src/widgets/doc/images/selected-items3.pngbin0 -> 32100 bytes
-rw-r--r--src/widgets/doc/images/selection-extended.pngbin0 -> 11401 bytes
-rw-r--r--src/widgets/doc/images/selection-multi.pngbin0 -> 13058 bytes
-rw-r--r--src/widgets/doc/images/selection-single.pngbin0 -> 7849 bytes
-rw-r--r--src/widgets/doc/images/selection2.png (renamed from doc/src/images/selection2.png)bin23784 -> 23784 bytes
-rw-r--r--src/widgets/doc/images/shareddirmodel.pngbin0 -> 45891 bytes
-rw-r--r--src/widgets/doc/images/sharedmodel-tableviews.pngbin0 -> 16811 bytes
-rw-r--r--src/widgets/doc/images/sharedselection-tableviews.pngbin0 -> 14212 bytes
-rw-r--r--src/widgets/doc/images/simpleanchorlayout-example.pngbin0 -> 13463 bytes
-rw-r--r--src/widgets/doc/images/spinboxdelegate-example.png (renamed from doc/src/images/spinboxdelegate-example.png)bin4762 -> 4762 bytes
-rw-r--r--src/widgets/doc/images/standard-views.pngbin0 -> 44495 bytes
-rw-r--r--src/widgets/doc/images/standardwidget.png (renamed from doc/src/images/standardwidget.png)bin1466 -> 1466 bytes
-rw-r--r--src/widgets/doc/images/stardelegate.png (renamed from doc/src/images/stardelegate.png)bin12230 -> 12230 bytes
-rw-r--r--src/widgets/doc/images/stringlistmodel.pngbin0 -> 4849 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-border-image-normal.png (renamed from doc/src/images/stylesheet-border-image-normal.png)bin5769 -> 5769 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-border-image-stretched.pngbin0 -> 12170 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-border-image-wrong.pngbin0 -> 12887 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-boxmodel.png (renamed from doc/src/images/stylesheet-boxmodel.png)bin18144 -> 18144 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-branch-closed.pngbin0 -> 334 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-branch-end.pngbin0 -> 182 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-branch-more.pngbin0 -> 136 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-branch-open.pngbin0 -> 346 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-coffee-cleanlooks.pngbin0 -> 14820 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-coffee-xp.pngbin0 -> 14200 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-pagefold-mac.pngbin0 -> 20618 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-pagefold.png (renamed from doc/src/images/stylesheet-pagefold.png)bin15989 -> 15989 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-redbutton1.png (renamed from doc/src/images/stylesheet-redbutton1.png)bin378 -> 378 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-redbutton2.png (renamed from doc/src/images/stylesheet-redbutton2.png)bin410 -> 410 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-redbutton3.png (renamed from doc/src/images/stylesheet-redbutton3.png)bin664 -> 664 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-scrollbar1.png (renamed from doc/src/images/stylesheet-scrollbar1.png)bin150 -> 150 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-scrollbar2.png (renamed from doc/src/images/stylesheet-scrollbar2.png)bin169 -> 169 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-treeview.png (renamed from doc/src/images/stylesheet-treeview.png)bin2412 -> 2412 bytes
-rw-r--r--src/widgets/doc/images/stylesheet-vline.pngbin0 -> 124 bytes
-rw-r--r--src/widgets/doc/images/swipegesture.png (renamed from doc/src/images/swipegesture.png)bin6864 -> 6864 bytes
-rw-r--r--src/widgets/doc/images/system-tray.png (renamed from doc/src/images/system-tray.png)bin6326 -> 6326 bytes
-rw-r--r--src/widgets/doc/images/tabWidget-stylesheet1.png (renamed from doc/src/images/tabWidget-stylesheet1.png)bin1321 -> 1321 bytes
-rw-r--r--src/widgets/doc/images/tabWidget-stylesheet2.png (renamed from doc/src/images/tabWidget-stylesheet2.png)bin1434 -> 1434 bytes
-rw-r--r--src/widgets/doc/images/tabWidget-stylesheet3.png (renamed from doc/src/images/tabWidget-stylesheet3.png)bin1206 -> 1206 bytes
-rw-r--r--src/widgets/doc/images/tableWidget-stylesheet.png (renamed from doc/src/images/tableWidget-stylesheet.png)bin3478 -> 3478 bytes
-rwxr-xr-xsrc/widgets/doc/images/tableview.pngbin0 -> 10102 bytes
-rw-r--r--src/widgets/doc/images/tree_2_with_algorithm.png (renamed from doc/src/images/tree_2_with_algorithm.png)bin16921 -> 16921 bytes
-rw-r--r--src/widgets/doc/images/treeview.png (renamed from doc/src/images/treeview.png)bin17173 -> 17173 bytes
-rw-r--r--src/widgets/doc/images/widgetdelegate.png (renamed from doc/src/images/widgetdelegate.png)bin7449 -> 7449 bytes
-rw-r--r--src/widgets/doc/images/widgetmapper.png (renamed from doc/src/images/widgetmapper.png)bin20145 -> 20145 bytes
-rw-r--r--src/widgets/doc/images/widgets-tutorial-childwidget.pngbin0 -> 8547 bytes
-rw-r--r--src/widgets/doc/images/widgets-tutorial-nestedlayouts.pngbin0 -> 23287 bytes
-rw-r--r--src/widgets/doc/images/widgets-tutorial-toplevel.pngbin0 -> 6087 bytes
-rw-r--r--src/widgets/doc/images/widgets-tutorial-windowlayout.pngbin0 -> 5849 bytes
-rw-r--r--src/widgets/doc/images/windows-calendarwidget.png (renamed from doc/src/images/windows-calendarwidget.png)bin5055 -> 5055 bytes
-rw-r--r--src/widgets/doc/images/windows-checkbox.png (renamed from doc/src/images/windows-checkbox.png)bin929 -> 929 bytes
-rw-r--r--src/widgets/doc/images/windows-combobox.png (renamed from doc/src/images/windows-combobox.png)bin1002 -> 1002 bytes
-rw-r--r--src/widgets/doc/images/windows-dateedit.png (renamed from doc/src/images/windows-dateedit.png)bin817 -> 817 bytes
-rw-r--r--src/widgets/doc/images/windows-datetimeedit.png (renamed from doc/src/images/windows-datetimeedit.png)bin1026 -> 1026 bytes
-rw-r--r--src/widgets/doc/images/windows-dial.png (renamed from doc/src/images/windows-dial.png)bin4598 -> 4598 bytes
-rw-r--r--src/widgets/doc/images/windows-doublespinbox.png (renamed from doc/src/images/windows-doublespinbox.png)bin762 -> 762 bytes
-rw-r--r--src/widgets/doc/images/windows-fontcombobox.png (renamed from doc/src/images/windows-fontcombobox.png)bin1022 -> 1022 bytes
-rw-r--r--src/widgets/doc/images/windows-frame.png (renamed from doc/src/images/windows-frame.png)bin1837 -> 1837 bytes
-rw-r--r--src/widgets/doc/images/windows-groupbox.png (renamed from doc/src/images/windows-groupbox.png)bin1617 -> 1617 bytes
-rw-r--r--src/widgets/doc/images/windows-horizontalscrollbar.png (renamed from doc/src/images/windows-horizontalscrollbar.png)bin566 -> 566 bytes
-rw-r--r--src/widgets/doc/images/windows-label.png (renamed from doc/src/images/windows-label.png)bin696 -> 696 bytes
-rw-r--r--src/widgets/doc/images/windows-lcdnumber.png (renamed from doc/src/images/windows-lcdnumber.png)bin491 -> 491 bytes
-rw-r--r--src/widgets/doc/images/windows-lineedit.png (renamed from doc/src/images/windows-lineedit.png)bin884 -> 884 bytes
-rw-r--r--src/widgets/doc/images/windows-listview.png (renamed from doc/src/images/windows-listview.png)bin2781 -> 2781 bytes
-rw-r--r--src/widgets/doc/images/windows-progressbar.png (renamed from doc/src/images/windows-progressbar.png)bin674 -> 674 bytes
-rw-r--r--src/widgets/doc/images/windows-pushbutton.png (renamed from doc/src/images/windows-pushbutton.png)bin722 -> 722 bytes
-rw-r--r--src/widgets/doc/images/windows-radiobutton.png (renamed from doc/src/images/windows-radiobutton.png)bin1005 -> 1005 bytes
-rw-r--r--src/widgets/doc/images/windows-slider.png (renamed from doc/src/images/windows-slider.png)bin485 -> 485 bytes
-rw-r--r--src/widgets/doc/images/windows-spinbox.png (renamed from doc/src/images/windows-spinbox.png)bin667 -> 667 bytes
-rw-r--r--src/widgets/doc/images/windows-tableview.png (renamed from doc/src/images/windows-tableview.png)bin1738 -> 1738 bytes
-rw-r--r--src/widgets/doc/images/windows-tabwidget.png (renamed from doc/src/images/windows-tabwidget.png)bin1707 -> 1707 bytes
-rw-r--r--src/widgets/doc/images/windows-textedit.png (renamed from doc/src/images/windows-textedit.png)bin3192 -> 3192 bytes
-rw-r--r--src/widgets/doc/images/windows-timeedit.png (renamed from doc/src/images/windows-timeedit.png)bin873 -> 873 bytes
-rw-r--r--src/widgets/doc/images/windows-toolbox.png (renamed from doc/src/images/windows-toolbox.png)bin925 -> 925 bytes
-rw-r--r--src/widgets/doc/images/windows-toolbutton.png (renamed from doc/src/images/windows-toolbutton.png)bin771 -> 771 bytes
-rw-r--r--src/widgets/doc/images/windows-treeview.png (renamed from doc/src/images/windows-treeview.png)bin2723 -> 2723 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-calendarwidget.png (renamed from doc/src/images/windowsvista-calendarwidget.png)bin5144 -> 5144 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-checkbox.png (renamed from doc/src/images/windowsvista-checkbox.png)bin1115 -> 1115 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-combobox.png (renamed from doc/src/images/windowsvista-combobox.png)bin1457 -> 1457 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-dateedit.png (renamed from doc/src/images/windowsvista-dateedit.png)bin855 -> 855 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-datetimeedit.png (renamed from doc/src/images/windowsvista-datetimeedit.png)bin1034 -> 1034 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-dial.png (renamed from doc/src/images/windowsvista-dial.png)bin2431 -> 2431 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-doublespinbox.png (renamed from doc/src/images/windowsvista-doublespinbox.png)bin852 -> 852 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-fontcombobox.png (renamed from doc/src/images/windowsvista-fontcombobox.png)bin919 -> 919 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-frame.png (renamed from doc/src/images/windowsvista-frame.png)bin1800 -> 1800 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-groupbox.png (renamed from doc/src/images/windowsvista-groupbox.png)bin1991 -> 1991 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-horizontalscrollbar.png (renamed from doc/src/images/windowsvista-horizontalscrollbar.png)bin1049 -> 1049 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-label.png (renamed from doc/src/images/windowsvista-label.png)bin599 -> 599 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-lcdnumber.png (renamed from doc/src/images/windowsvista-lcdnumber.png)bin491 -> 491 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-lineedit.png (renamed from doc/src/images/windowsvista-lineedit.png)bin873 -> 873 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-listview.png (renamed from doc/src/images/windowsvista-listview.png)bin6872 -> 6872 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-progressbar.png (renamed from doc/src/images/windowsvista-progressbar.png)bin1437 -> 1437 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-pushbutton.png (renamed from doc/src/images/windowsvista-pushbutton.png)bin1085 -> 1085 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-radiobutton.png (renamed from doc/src/images/windowsvista-radiobutton.png)bin1266 -> 1266 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-slider.png (renamed from doc/src/images/windowsvista-slider.png)bin624 -> 624 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-spinbox.png (renamed from doc/src/images/windowsvista-spinbox.png)bin767 -> 767 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-tableview.png (renamed from doc/src/images/windowsvista-tableview.png)bin3941 -> 3941 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-tabwidget.png (renamed from doc/src/images/windowsvista-tabwidget.png)bin3286 -> 3286 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-textedit.png (renamed from doc/src/images/windowsvista-textedit.png)bin3122 -> 3122 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-timeedit.png (renamed from doc/src/images/windowsvista-timeedit.png)bin764 -> 764 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-toolbox.png (renamed from doc/src/images/windowsvista-toolbox.png)bin891 -> 891 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-toolbutton.png (renamed from doc/src/images/windowsvista-toolbutton.png)bin981 -> 981 bytes
-rw-r--r--src/widgets/doc/images/windowsvista-treeview.png (renamed from doc/src/images/windowsvista-treeview.png)bin5760 -> 5760 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-calendarwidget.png (renamed from doc/src/images/windowsxp-calendarwidget.png)bin5009 -> 5009 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-checkbox.png (renamed from doc/src/images/windowsxp-checkbox.png)bin1006 -> 1006 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-combobox.png (renamed from doc/src/images/windowsxp-combobox.png)bin1450 -> 1450 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-dateedit.png (renamed from doc/src/images/windowsxp-dateedit.png)bin1107 -> 1107 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-datetimeedit.png (renamed from doc/src/images/windowsxp-datetimeedit.png)bin1321 -> 1321 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-dial.png (renamed from doc/src/images/windowsxp-dial.png)bin4598 -> 4598 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-doublespinbox.png (renamed from doc/src/images/windowsxp-doublespinbox.png)bin1065 -> 1065 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-fontcombobox.png (renamed from doc/src/images/windowsxp-fontcombobox.png)bin1408 -> 1408 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-frame.png (renamed from doc/src/images/windowsxp-frame.png)bin1837 -> 1837 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-groupbox.png (renamed from doc/src/images/windowsxp-groupbox.png)bin2016 -> 2016 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-horizontalscrollbar.png (renamed from doc/src/images/windowsxp-horizontalscrollbar.png)bin1498 -> 1498 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-label.png (renamed from doc/src/images/windowsxp-label.png)bin696 -> 696 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-lcdnumber.png (renamed from doc/src/images/windowsxp-lcdnumber.png)bin493 -> 493 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-lineedit.png (renamed from doc/src/images/windowsxp-lineedit.png)bin861 -> 861 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-listview.png (renamed from doc/src/images/windowsxp-listview.png)bin5391 -> 5391 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-menu.pngbin0 -> 1442 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-progressbar.png (renamed from doc/src/images/windowsxp-progressbar.png)bin1007 -> 1007 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-pushbutton.png (renamed from doc/src/images/windowsxp-pushbutton.png)bin1462 -> 1462 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-radiobutton.png (renamed from doc/src/images/windowsxp-radiobutton.png)bin1270 -> 1270 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-slider.png (renamed from doc/src/images/windowsxp-slider.png)bin732 -> 732 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-spinbox.png (renamed from doc/src/images/windowsxp-spinbox.png)bin974 -> 974 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-tableview.png (renamed from doc/src/images/windowsxp-tableview.png)bin3204 -> 3204 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-tabwidget.png (renamed from doc/src/images/windowsxp-tabwidget.png)bin5220 -> 5220 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-textedit.png (renamed from doc/src/images/windowsxp-textedit.png)bin3159 -> 3159 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-timeedit.png (renamed from doc/src/images/windowsxp-timeedit.png)bin1172 -> 1172 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-toolbox.png (renamed from doc/src/images/windowsxp-toolbox.png)bin925 -> 925 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-toolbutton.png (renamed from doc/src/images/windowsxp-toolbutton.png)bin1549 -> 1549 bytes
-rw-r--r--src/widgets/doc/images/windowsxp-treeview.png (renamed from doc/src/images/windowsxp-treeview.png)bin5795 -> 5795 bytes
-rw-r--r--src/widgets/doc/qtwidgets.qdocconf92
-rw-r--r--src/widgets/doc/snippets/code/doc_src_layout.cpp (renamed from doc/src/snippets/code/doc_src_layout.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/doc_src_model-view-programming.cpp76
-rw-r--r--src/widgets/doc/snippets/code/doc_src_qt4-mainwindow.cpp (renamed from doc/src/snippets/code/doc_src_qt4-mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/doc_src_qt4-styles.cpp (renamed from doc/src/snippets/code/doc_src_qt4-styles.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/doc_src_qtwidgets.cpp43
-rw-r--r--src/widgets/doc/snippets/code/doc_src_qtwidgets.pro3
-rw-r--r--src/widgets/doc/snippets/code/doc_src_styles.cpp (renamed from doc/src/snippets/code/doc_src_styles.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/doc_src_stylesheet.cpp (renamed from doc/src/snippets/code/doc_src_stylesheet.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc (renamed from doc/src/snippets/code/doc_src_stylesheet.qdoc)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp (renamed from doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_dialogs_qfontdialog.cpp (renamed from doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_dialogs_qmessagebox.cpp148
-rw-r--r--src/widgets/doc/snippets/code/src_gui_dialogs_qwizard.cpp (renamed from doc/src/snippets/code/src_gui_dialogs_qwizard.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_effects_qgraphicseffect.cpp (renamed from doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsview.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp (renamed from doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_image_qicon.cpp (renamed from doc/src/snippets/code/src_gui_image_qicon.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_image_qpixmapfilter.cpp (renamed from doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qabstractitemview.cpp (renamed from doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp (renamed from doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp (renamed from doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp (renamed from doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp (renamed from doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp (renamed from doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qaction.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qaction.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp183
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qformlayout.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qformlayout.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qlayout.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qshortcut.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qshortcut.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_kernel_qwidget.cpp (renamed from doc/src/snippets/code/src_gui_kernel_qwidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_painting_qdrawutil.cpp (renamed from doc/src/snippets/code/src_gui_painting_qdrawutil.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp (renamed from doc/src/snippets/code/src_gui_qproxystyle.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_styles_qstyle.cpp (renamed from doc/src/snippets/code/src_gui_styles_qstyle.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_styles_qstyleoption.cpp (renamed from doc/src/snippets/code/src_gui_styles_qstyleoption.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_util_qcompleter.cpp (renamed from doc/src/snippets/code/src_gui_util_qcompleter.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_util_qundostack.cpp (renamed from doc/src/snippets/code/src_gui_util_qundostack.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qabstractbutton.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qabstractspinbox.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qcalendarwidget.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qcheckbox.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qdatetimeedit.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qdockwidget.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qframe.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qframe.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qgroupbox.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qlabel.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qlabel.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qlineedit.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qlineedit.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qmainwindow.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qmenu.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qmenubar.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qplaintextedit.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qpushbutton.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qradiobutton.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qrubberband.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qrubberband.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qscrollarea.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qspinbox.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qspinbox.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qsplitter.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qsplitter.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qstatusbar.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qtextbrowser.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp)0
-rw-r--r--src/widgets/doc/snippets/code/src_gui_widgets_qtextedit.cpp (renamed from doc/src/snippets/code/src_gui_widgets_qtextedit.cpp)0
-rw-r--r--src/widgets/doc/snippets/customstyle/customstyle.cpp (renamed from doc/src/snippets/customstyle/customstyle.cpp)0
-rw-r--r--src/widgets/doc/snippets/customstyle/customstyle.h (renamed from doc/src/snippets/customstyle/customstyle.h)0
-rw-r--r--src/widgets/doc/snippets/customstyle/customstyle.pro2
-rw-r--r--src/widgets/doc/snippets/customstyle/main.cpp54
-rw-r--r--src/widgets/doc/snippets/customviewstyle.cpp (renamed from doc/src/snippets/customviewstyle.cpp)0
-rw-r--r--src/widgets/doc/snippets/dialogs/dialogs.cpp (renamed from doc/src/snippets/dialogs/dialogs.cpp)0
-rw-r--r--src/widgets/doc/snippets/dockwidgets/mainwindow.cpp (renamed from doc/src/snippets/dockwidgets/mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/filedialogurls.cpp (renamed from doc/src/snippets/filedialogurls.cpp)0
-rw-r--r--src/widgets/doc/snippets/graphicssceneadditemsnippet.cpp (renamed from doc/src/snippets/graphicssceneadditemsnippet.cpp)0
-rw-r--r--src/widgets/doc/snippets/itemselection/itemselection.pro3
-rw-r--r--src/widgets/doc/snippets/itemselection/main.cpp115
-rw-r--r--src/widgets/doc/snippets/itemselection/model.cpp238
-rw-r--r--src/widgets/doc/snippets/itemselection/model.h74
-rw-r--r--src/widgets/doc/snippets/javastyle.cpp (renamed from doc/src/snippets/javastyle.cpp)0
-rw-r--r--src/widgets/doc/snippets/layouts/layouts.cpp (renamed from doc/src/snippets/layouts/layouts.cpp)0
-rw-r--r--src/widgets/doc/snippets/mainwindowsnippet.cpp (renamed from doc/src/snippets/mainwindowsnippet.cpp)0
-rw-r--r--src/widgets/doc/snippets/mdiareasnippets.cpp (renamed from doc/src/snippets/mdiareasnippets.cpp)0
-rw-r--r--src/widgets/doc/snippets/myscrollarea.cpp (renamed from doc/src/snippets/myscrollarea.cpp)0
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/main.cpp51
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/mainwindow.cpp83
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/mainwindow.h (renamed from doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp)26
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/model.cpp167
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/model.h73
-rw-r--r--src/widgets/doc/snippets/qlistview-dnd/qlistview-dnd.pro5
-rw-r--r--src/widgets/doc/snippets/qlistwidget-dnd/main.cpp51
-rw-r--r--src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.cpp87
-rw-r--r--src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.h62
-rw-r--r--src/widgets/doc/snippets/qlistwidget-dnd/qlistwidget-dnd.pro3
-rw-r--r--src/widgets/doc/snippets/qlistwidget-using/mainwindow.cpp (renamed from doc/src/snippets/qlistwidget-using/mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/qmacnativewidget/main.mm (renamed from doc/src/snippets/qmacnativewidget/main.mm)0
-rw-r--r--src/widgets/doc/snippets/qsortfilterproxymodel/main.cpp77
-rw-r--r--src/widgets/doc/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro1
-rw-r--r--src/widgets/doc/snippets/qsplashscreen/main.cpp (renamed from doc/src/snippets/qsplashscreen/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/qstackedlayout/main.cpp (renamed from doc/src/snippets/qstackedlayout/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/qstackedwidget/main.cpp (renamed from doc/src/snippets/qstackedwidget/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/qstyleoption/main.cpp (renamed from doc/src/snippets/qstyleoption/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/qstyleplugin/main.cpp (renamed from doc/src/snippets/qstyleplugin/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp (renamed from doc/src/snippets/qtablewidget-resizing/mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/Images/cubed.pngbin0 -> 437 bytes
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/Images/squared.pngbin0 -> 440 bytes
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/images.qrc6
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/main.cpp51
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp (renamed from doc/src/snippets/qtablewidget-using/mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/mainwindow.h70
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/qtablewidget-using.pro4
-rw-r--r--src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp (renamed from doc/src/snippets/qtreewidget-using/mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/qtreewidgetitemiterator-using/mainwindow.cpp (renamed from doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp)0
-rw-r--r--src/widgets/doc/snippets/reading-selections/main.cpp59
-rw-r--r--src/widgets/doc/snippets/reading-selections/model.cpp238
-rw-r--r--src/widgets/doc/snippets/reading-selections/model.h74
-rw-r--r--src/widgets/doc/snippets/reading-selections/reading-selections.pro2
-rw-r--r--src/widgets/doc/snippets/reading-selections/window.cpp120
-rw-r--r--src/widgets/doc/snippets/reading-selections/window.h67
-rw-r--r--src/widgets/doc/snippets/shareddirmodel/main.cpp (renamed from doc/src/snippets/shareddirmodel/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/sharedtablemodel/main.cpp89
-rw-r--r--src/widgets/doc/snippets/sharedtablemodel/model.cpp236
-rw-r--r--src/widgets/doc/snippets/sharedtablemodel/model.h74
-rw-r--r--src/widgets/doc/snippets/sharedtablemodel/sharedtablemodel.pro2
-rw-r--r--src/widgets/doc/snippets/simplemodel-use/main.cpp95
-rw-r--r--src/widgets/doc/snippets/simplemodel-use/simplemodel-use.pro1
-rw-r--r--src/widgets/doc/snippets/splitter/splitter.cpp (renamed from doc/src/snippets/splitter/splitter.cpp)0
-rw-r--r--src/widgets/doc/snippets/splitterhandle/splitter.cpp (renamed from doc/src/snippets/splitterhandle/splitter.cpp)0
-rw-r--r--src/widgets/doc/snippets/splitterhandle/splitter.h (renamed from doc/src/snippets/splitterhandle/splitter.h)0
-rw-r--r--src/widgets/doc/snippets/stringlistmodel/main.cpp83
-rw-r--r--src/widgets/doc/snippets/stringlistmodel/model.cpp211
-rw-r--r--src/widgets/doc/snippets/stringlistmodel/model.h (renamed from doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp)57
-rw-r--r--src/widgets/doc/snippets/stringlistmodel/stringlistmodel.pro3
-rw-r--r--src/widgets/doc/snippets/styles/styles.cpp (renamed from doc/src/snippets/styles/styles.cpp)0
-rw-r--r--src/widgets/doc/snippets/stylesheet/common-mistakes.cpp (renamed from doc/src/snippets/stylesheet/common-mistakes.cpp)0
-rw-r--r--src/widgets/doc/snippets/textdocument-imagedrop/textedit.cpp (renamed from doc/src/snippets/textdocument-imagedrop/textedit.cpp)0
-rw-r--r--src/widgets/doc/snippets/timeline/main.cpp (renamed from doc/src/snippets/timeline/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/updating-selections/main.cpp59
-rw-r--r--src/widgets/doc/snippets/updating-selections/model.cpp236
-rw-r--r--src/widgets/doc/snippets/updating-selections/model.h74
-rw-r--r--src/widgets/doc/snippets/updating-selections/updating-selections.pro2
-rw-r--r--src/widgets/doc/snippets/updating-selections/window.cpp109
-rw-r--r--src/widgets/doc/snippets/updating-selections/window.h67
-rw-r--r--src/widgets/doc/snippets/whatsthis/whatsthis.cpp (renamed from doc/src/snippets/whatsthis/whatsthis.cpp)0
-rw-r--r--src/widgets/doc/snippets/widget-mask/main.cpp (renamed from doc/src/snippets/widget-mask/main.cpp)0
-rw-r--r--src/widgets/doc/snippets/widgetdelegate.cpp (renamed from doc/src/snippets/widgetdelegate.cpp)0
-rw-r--r--src/widgets/doc/snippets/widgets-tutorial/template.cpp (renamed from doc/src/snippets/widgets-tutorial/template.cpp)0
-rw-r--r--src/widgets/doc/src/addressbook-fr.qdoc (renamed from doc/src/widgets/addressbook-fr.qdoc)0
-rw-r--r--src/widgets/doc/src/addressbook.qdoc (renamed from doc/src/widgets/addressbook.qdoc)0
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc2339
-rw-r--r--src/widgets/doc/src/modelview.qdoc (renamed from doc/src/widgets/modelview.qdoc)30
-rw-r--r--src/widgets/doc/src/qtwidgets.qdoc (renamed from doc/src/widgets/qtwidgets.qdoc)4
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/focus.qdoc (renamed from doc/src/widgets/widgets-and-layouts/focus.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-cde.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-motif.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-plastique.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/gallery.qdoc (renamed from doc/src/widgets/widgets-and-layouts/gallery.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc (renamed from doc/src/widgets/widgets-and-layouts/layout.qdoc)52
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/styles.qdoc (renamed from doc/src/widgets/widgets-and-layouts/styles.qdoc)26
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc (renamed from doc/src/widgets/widgets-and-layouts/stylesheet.qdoc)320
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/widgets.qdoc (renamed from doc/src/widgets/widgets-and-layouts/widgets.qdoc)0
-rw-r--r--src/widgets/doc/src/widgets-tutorial.qdoc (renamed from doc/src/widgets/widgets-tutorial.qdoc)2
-rw-r--r--src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc (renamed from doc/src/widgets/windows-and-dialogs/dialogs.qdoc)0
-rw-r--r--src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc (renamed from doc/src/widgets/windows-and-dialogs/mainwindow.qdoc)18
-rw-r--r--src/widgets/effects/qgraphicseffect.cpp6
-rw-r--r--src/widgets/effects/qpixmapfilter.cpp6
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.cpp12
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp48
-rw-r--r--src/widgets/graphicsview/qgraphicsitemanimation.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp6
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp14
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp16
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp6
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp2
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp6
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.cpp6
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp20
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp8
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp12
-rw-r--r--src/widgets/itemviews/qstandarditemmodel.cpp10
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp18
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp14
-rw-r--r--src/widgets/itemviews/qtreeview.cpp4
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp6
-rw-r--r--src/widgets/itemviews/qtreewidgetitemiterator.cpp2
-rw-r--r--src/widgets/kernel/qaction.cpp10
-rw-r--r--src/widgets/kernel/qactiongroup.cpp6
-rw-r--r--src/widgets/kernel/qapplication.cpp36
-rw-r--r--src/widgets/kernel/qboxlayout.cpp24
-rw-r--r--src/widgets/kernel/qformlayout.cpp6
-rw-r--r--src/widgets/kernel/qicon.cpp10
-rw-r--r--src/widgets/kernel/qlayout.cpp4
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp2
-rw-r--r--src/widgets/kernel/qshortcut.cpp10
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp8
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp30
-rw-r--r--src/widgets/styles/qdrawutil.cpp20
-rw-r--r--src/widgets/styles/qproxystyle.cpp2
-rw-r--r--src/widgets/styles/qstyle.cpp30
-rw-r--r--src/widgets/styles/qstyleoption.cpp8
-rw-r--r--src/widgets/styles/qstylepainter.cpp8
-rw-r--r--src/widgets/styles/qstyleplugin.cpp6
-rw-r--r--src/widgets/util/qcompleter.cpp6
-rw-r--r--src/widgets/util/qundostack.cpp12
-rw-r--r--src/widgets/widgets.pro3
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp6
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp4
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp4
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp12
-rw-r--r--src/widgets/widgets/qcheckbox.cpp2
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp14
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp8
-rw-r--r--src/widgets/widgets/qdockwidget.cpp2
-rw-r--r--src/widgets/widgets/qframe.cpp2
-rw-r--r--src/widgets/widgets/qgroupbox.cpp4
-rw-r--r--src/widgets/widgets/qlabel.cpp6
-rw-r--r--src/widgets/widgets/qlineedit.cpp2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm2
-rw-r--r--src/widgets/widgets/qmacnativewidget_mac.mm4
-rw-r--r--src/widgets/widgets/qmainwindow.cpp12
-rw-r--r--src/widgets/widgets/qmdiarea.cpp4
-rw-r--r--src/widgets/widgets/qmenu.cpp14
-rw-r--r--src/widgets/widgets/qmenubar.cpp12
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp8
-rw-r--r--src/widgets/widgets/qpushbutton.cpp2
-rw-r--r--src/widgets/widgets/qradiobutton.cpp2
-rw-r--r--src/widgets/widgets/qrubberband.cpp2
-rw-r--r--src/widgets/widgets/qscrollarea.cpp2
-rw-r--r--src/widgets/widgets/qspinbox.cpp20
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp6
-rw-r--r--src/widgets/widgets/qsplitter.cpp14
-rw-r--r--src/widgets/widgets/qstackedwidget.cpp8
-rw-r--r--src/widgets/widgets/qstatusbar.cpp6
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp2
-rw-r--r--src/widgets/widgets/qtextedit.cpp14
-rw-r--r--src/xml/doc/doc.pri3
-rw-r--r--src/xml/xml.pro4
-rw-r--r--tests/tests.pro1
1114 files changed, 10274 insertions, 1418 deletions
diff --git a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
deleted file mode 100644
index 76b958dda3..0000000000
--- a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation 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$
-**
-****************************************************************************/
-
-//! [0]
-void MyClass::receive(const QString &message, const QByteArray &data)
-{
- QDataStream in(data);
- if (message == "execute(QString,QString)") {
- QString cmd;
- QString arg;
- in >> cmd >> arg;
- ...
- } else if (message == "delete(QString)") {
- QString fileName;
- in >> fileName;
- ...
- } else {
- ...
- }
-}
-//! [0]
-
-
-//! [1]
-QByteArray data;
-QDataStream out(&data, QIODevice::WriteOnly);
-out << QString("cat") << QString("file.txt");
-QCopChannel::send("System/Shell", "execute(QString,QString)", data);
-//! [1]
diff --git a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
deleted file mode 100644
index 8fc6140075..0000000000
--- a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation 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$
-**
-****************************************************************************/
-
-//! [0]
-s*Xs = a*Xd + b*Yd + c
-s*Ys = d*Xd + e*Yd + f
-//! [0]
diff --git a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
deleted file mode 100644
index 66308f3405..0000000000
--- a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation 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$
-**
-****************************************************************************/
-
-//! [0]
-bool MyScreenSaver::save( int level )
-{
- switch ( level ) {
- case 0:
- if ( dim_enabled ) {
- // dim the screen
- }
- return true;
- case 1:
- if ( screenoff_enabled ) {
- // turn off the screen
- }
- return true;
- case 2:
- if ( suspend_enabled ) {
- // suspend
- }
- return true;
- default:
- return false;
- }
-}
-
-...
-
-int timings[4];
-timings[0] = 5000; // dim after 5 seconds
-timings[1] = 10000; // light off after 15 seconds
-timings[2] = 45000; // suspend after 60 seconds
-timings[3] = 0;
-QWSServer::setScreenSaverIntervals( timings );
-
-// ignore the key/mouse event that turns on the screen
-int blocklevel = 1;
-if ( !screenoff_enabled ) {
- // screenoff is disabled, ignore the key/mouse event that wakes from suspend
- blocklevel = 2;
- if ( !suspend_enabled ) {
- // suspend is disabled, never ignore events
- blocklevel = -1;
- }
-}
-QWSServer::setScreenSaverBlockLevel( blocklevel );
-//! [0]
diff --git a/examples/examples.pro b/examples/examples.pro
index 2180d18587..7ce42d7fe7 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,4 +1,6 @@
TEMPLATE = subdirs
+CONFIG += no_docs_target
+
SUBDIRS = \
network \
statemachine \
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 874b4bf424..0a0fd8dfa8 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -64,3 +64,30 @@ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
QMAKE_EXTRA_TARGETS += check
}
+# Let every project have a 'docs' target
+!contains(QMAKE_EXTRA_TARGETS, docs) {
+ contains(TEMPLATE, subdirs) {
+ # `make docs' should iterate through all subdirs
+ # (except those with no_default_target or no_docs_target)
+ !contains(CONFIG, no_docs_target):for(subdir, SUBDIRS) {
+ subdir_config = $$eval($${subdir}.CONFIG)
+ !contains(subdir_config, no_docs_target):!contains(subdir_config, no_default_target):docs.recurse += $$subdir
+ unset(subdir_config)
+ }
+ !isEmpty(docs.recurse) {
+ # setup the recurse target only when there is something to recurse into
+ docs.CONFIG = recursive
+ docs.recurse_target = docs
+ }
+ } else {
+ # apps and libs only generate docs if QMAKE_DOCS is set
+ !isEmpty(QMAKE_DOCS) {
+ !exists($$QMAKE_DOCS):error("Cannot find documentation specification file $$QMAKE_DOCS")
+ exists($$[QT_INSTALL_DOCS]):QMAKE_DOCS_INDEX *= $$[QT_INSTALL_DOCS]
+ qtPrepareTool(QDOC, qdoc)
+ for(index, QMAKE_DOCS_INDEX):QDOC_INDEX += -indexdir $$index
+ docs.commands += $$QDOC $$QMAKE_DOCS_OPTIONS $$QDOC_INDEX $$QMAKE_DOCS
+ }
+ }
+ QMAKE_EXTRA_TARGETS += docs
+}
diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro
index 6bf16e6a0a..54359f7d3b 100644
--- a/src/concurrent/concurrent.pro
+++ b/src/concurrent/concurrent.pro
@@ -57,6 +57,9 @@ HEADERS += \
qfutureinterface_p.h \
qfuturewatcher_p.h
+QMAKE_DOCS = $$PWD/doc/qtconcurrent.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
contains(QT_CONFIG, clock-gettime) {
linux-*|hpux-*|solaris-*:LIBS *= -lrt
}
diff --git a/src/concurrent/doc/qtconcurrent.qdocconf b/src/concurrent/doc/qtconcurrent.qdocconf
new file mode 100644
index 0000000000..d8d66a92c9
--- /dev/null
+++ b/src/concurrent/doc/qtconcurrent.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtConcurrent
+description = Qt Concurrent Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtconcurrent
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtConcurrent
+
+qhp.QtConcurrent.file = qtconcurrent.qhp
+qhp.QtConcurrent.namespace = org.qt-project.qtconcurrent.500
+qhp.QtConcurrent.virtualFolder = qdoc
+qhp.QtConcurrent.indexTitle = Qt Concurrent Reference Documentation
+qhp.QtConcurrent.indexRoot =
+
+qhp.QtConcurrent.filterAttributes = qtconcurrent 5.0.0 qtrefdoc
+qhp.QtConcurrent.customFilters.Qt.name = QtConcurrent 5.0.0
+qhp.QtConcurrent.customFilters.Qt.filterAttributes = qtconcurrent 5.0.0
+qhp.QtConcurrent.subprojects = classes overviews examples
+qhp.QtConcurrent.subprojects.classes.title = Classes
+qhp.QtConcurrent.subprojects.classes.indexTitle = Qt Concurrent's Classes
+qhp.QtConcurrent.subprojects.classes.selectors = class fake:headerfile
+qhp.QtConcurrent.subprojects.classes.sortPages = true
+qhp.QtConcurrent.subprojects.overviews.title = Overviews
+qhp.QtConcurrent.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtConcurrent.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtConcurrent.subprojects.examples.title = Qt Concurrent Examples
+qhp.QtConcurrent.subprojects.examples.indexTitle = Qt Concurrent Examples
+qhp.QtConcurrent.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qtconcurrent
+tagfile = ../../../doc/qtconcurrent/qtconcurrent.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qfuture.cpp
index ddf075b6ca..ddf075b6ca 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qfuture.cpp
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qfuturesynchronizer.cpp
index 77003791e9..77003791e9 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qfuturesynchronizer.cpp
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qfuturewatcher.cpp
index 703275bc7a..703275bc7a 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qfuturewatcher.cpp
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentexception.cpp
index cf0257c45b..cf0257c45b 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentexception.cpp
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentfilter.cpp
index 2acf467e9a..2acf467e9a 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentfilter.cpp
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp
index 9b83ad5bef..9b83ad5bef 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentmap.cpp
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentrun.cpp
index 362f084092..362f084092 100644
--- a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrentrun.cpp
diff --git a/src/concurrent/qfuture.cpp b/src/concurrent/qfuture.cpp
index 9805454cb2..f8151f3228 100644
--- a/src/concurrent/qfuture.cpp
+++ b/src/concurrent/qfuture.cpp
@@ -374,7 +374,7 @@
QFuture::constBegin() or QFuture::constEnd() before you start iterating.
Here's a typical loop that prints all the results available in a future:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp 0
+ \snippet code/src_concurrent_qfuture.cpp 0
\sa QFutureIterator, QFuture
*/
@@ -555,7 +555,7 @@
list (i.e. before the first result). Here's how to iterate over all the
results sequentially:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp 1
+ \snippet code/src_concurrent_qfuture.cpp 1
The next() function returns the next result (waiting for it to become
available, if necessary) from the future and advances the iterator. Unlike
@@ -570,7 +570,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp 2
+ \snippet code/src_concurrent_qfuture.cpp 2
If you want to find all occurrences of a particular value, use findNext()
or findPrevious() in a loop.
diff --git a/src/concurrent/qfuturesynchronizer.cpp b/src/concurrent/qfuturesynchronizer.cpp
index 34b00daf4f..3bb81e06c4 100644
--- a/src/concurrent/qfuturesynchronizer.cpp
+++ b/src/concurrent/qfuturesynchronizer.cpp
@@ -57,7 +57,7 @@
an easy way to ensure that all futures have finished before returning from
a function:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp 0
+ \snippet code/src_concurrent_qfuturesynchronizer.cpp 0
The behavior of waitForFinished() can be changed using the
setCancelOnWait() function. Calling setCancelOnWait(true) will cause
diff --git a/src/concurrent/qfuturewatcher.cpp b/src/concurrent/qfuturewatcher.cpp
index 9153fe5d40..eb5fb0e18d 100644
--- a/src/concurrent/qfuturewatcher.cpp
+++ b/src/concurrent/qfuturewatcher.cpp
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
Example: Starting a computation and getting a slot callback when it's
finished:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp 0
+ \snippet code/src_concurrent_qfuturewatcher.cpp 0
Be aware that not all asynchronous computations can be canceled or paused.
For example, the future returned by QtConcurrent::run() cannot be
diff --git a/src/concurrent/qtconcurrentexception.cpp b/src/concurrent/qtconcurrentexception.cpp
index 57eb604d39..a13ddb3173 100644
--- a/src/concurrent/qtconcurrentexception.cpp
+++ b/src/concurrent/qtconcurrentexception.cpp
@@ -56,12 +56,12 @@ QT_BEGIN_NAMESPACE
boundaries, provided that the exception inherit from QtConcurrent::Exception
and implement two helper functions:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 0
+ \snippet code/src_concurrent_qtconcurrentexception.cpp 0
QtConcurrent::Exception subclasses must be thrown by value and
caught by reference:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 1
+ \snippet code/src_concurrent_qtconcurrentexception.cpp 1
If you throw an exception that is not a subclass of QtConcurrent::Exception,
the Qt Concurrent functions will throw a QtConcurrent::UnhandledException
@@ -80,14 +80,14 @@ QT_BEGIN_NAMESPACE
\fn QtConcurrent::Exception::raise() const
In your QtConcurrent::Exception subclass, reimplement raise() like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 2
+ \snippet code/src_concurrent_qtconcurrentexception.cpp 2
*/
/*!
\fn QtConcurrent::Exception::clone() const
In your QtConcurrent::Exception subclass, reimplement clone() like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp 3
+ \snippet code/src_concurrent_qtconcurrentexception.cpp 3
*/
/*!
diff --git a/src/concurrent/qtconcurrentfilter.cpp b/src/concurrent/qtconcurrentfilter.cpp
index 76ce8ca659..8a87af2868 100644
--- a/src/concurrent/qtconcurrentfilter.cpp
+++ b/src/concurrent/qtconcurrentfilter.cpp
@@ -60,7 +60,7 @@
result instead of a QFuture. You use them in the same way as the
asynchronous variants.
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 6
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 6
Note that the result types above are not QFuture objects, but real result
types (in this case, QStringList and QSet<QString>).
@@ -73,7 +73,7 @@
The filter function must be of the form:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 0
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 0
T must match the type stored in the sequence. The function returns true if
the item should be kept, false if it should be discarded.
@@ -81,7 +81,7 @@
This example shows how to keep strings that are all lower-case from a
QStringList:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 1
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 1
The results of the filter are made available through QFuture. See the
QFuture and QFutureWatcher documentation for more information on how to
@@ -89,7 +89,7 @@
If you want to modify a sequence in-place, use QtConcurrent::filter():
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 2
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 2
Since the sequence is modified in place, QtConcurrent::filter() does not
return any results via QFuture. However, you can still use QFuture and
@@ -103,7 +103,7 @@
The reduce function must be of the form:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 3
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 3
T is the type of the final result, U is the type of items being filtered.
Note that the return value and return type of the reduce function are not
@@ -111,7 +111,7 @@
Call QtConcurrent::filteredReduced() like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 4
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 4
The reduce function will be called once for each result kept by the filter
function, and should merge the \e{intermediate} into the \e{result}
@@ -128,7 +128,7 @@
instead of a sequence. You use them in the same way as the sequence
variants:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 5
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 5
\section2 Using Member Functions
@@ -137,12 +137,12 @@
QtConcurrent::filteredReduced() accept pointers to member functions.
The member function class type must match the type stored in the sequence:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 7
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 7
Note that when using QtConcurrent::filteredReduced(), you can mix the use of
normal and member functions freely:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 8
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 8
\section2 Using Function Objects
@@ -151,7 +151,7 @@
add state to a function call. The result_type typedef must define the
result type of the function call operator:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 13
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 13
\section2 Using Bound Function Arguments
@@ -167,7 +167,7 @@
As an example, we use QString::contains():
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 9
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 9
QString::contains() takes 2 arguments (including the "this" pointer) and
can't be used with QtConcurrent::filtered() directly, because
@@ -175,17 +175,17 @@
use QString::contains() with QtConcurrent::filtered() we have to provide a
value for the \e regexp argument:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 10
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 10
The return value from boost::bind() is a function object (functor) with
the following signature:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 11
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 11
This matches what QtConcurrent::filtered() expects, and the complete
example becomes:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp 12
+ \snippet code/src_concurrent_qtconcurrentfilter.cpp 12
*/
/*!
diff --git a/src/concurrent/qtconcurrentmap.cpp b/src/concurrent/qtconcurrentmap.cpp
index 1758cb9e95..c446064327 100644
--- a/src/concurrent/qtconcurrentmap.cpp
+++ b/src/concurrent/qtconcurrentmap.cpp
@@ -95,7 +95,7 @@
the final result instead of a QFuture. You use them in the same
way as the asynchronous variants.
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 7
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 7
Note that the result types above are not QFuture objects, but real result
types (in this case, QList<QImage> and QImage).
@@ -108,7 +108,7 @@
The map function must be of the form:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 0
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 0
T and U can be any type (and they can even be the same type), but T must
match the type stored in the sequence. The function returns the modified
@@ -117,7 +117,7 @@
This example shows how to apply a scale function to all the items
in a sequence:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 1
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 1
The results of the map are made available through QFuture. See the
QFuture and QFutureWatcher documentation for more information on how to
@@ -126,14 +126,14 @@
If you want to modify a sequence in-place, use QtConcurrent::map(). The
map function must then be of the form:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 2
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 2
Note that the return value and return type of the map function are not
used.
Using QtConcurrent::map() is similar to using QtConcurrent::mapped():
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 3
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 3
Since the sequence is modified in place, QtConcurrent::map() does not
return any results via QFuture. However, you can still use QFuture and
@@ -147,7 +147,7 @@
The reduce function must be of the form:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 4
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 4
T is the type of the final result, U is the return type of the map
function. Note that the return value and return type of the reduce
@@ -155,7 +155,7 @@
Call QtConcurrent::mappedReduced() like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 5
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 5
The reduce function will be called once for each result returned by the map
function, and should merge the \e{intermediate} into the \e{result}
@@ -175,7 +175,7 @@
instead of a sequence. You use them in the same way as the sequence
variants:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 6
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 6
\section2 Blocking Variants
@@ -183,7 +183,7 @@
the final result instead of a QFuture. You use them in the same
way as the asynchronous variants.
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 7
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 7
Note that the result types above are not QFuture objects, but real result
types (in this case, QList<QImage> and QImage).
@@ -194,12 +194,12 @@
QtConcurrent::mappedReduced() accept pointers to member functions.
The member function class type must match the type stored in the sequence:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 8
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 8
Note that when using QtConcurrent::mappedReduced(), you can mix the use of
normal and member functions freely:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 9
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 9
\section2 Using Function Objects
@@ -208,7 +208,7 @@
add state to a function call. The result_type typedef must define the
result type of the function call operator:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 14
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 14
\section2 Using Bound Function Arguments
@@ -224,7 +224,7 @@
As an example, we'll use QImage::scaledToWidth():
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 10
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 10
scaledToWidth takes three arguments (including the "this" pointer) and
can't be used with QtConcurrent::mapped() directly, because
@@ -232,17 +232,17 @@
QImage::scaledToWidth() with QtConcurrent::mapped() we have to provide a
value for the \e{width} and the \e{transformation mode}:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 11
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 11
The return value from boost::bind() is a function object (functor) with
the following signature:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 12
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 12
This matches what QtConcurrent::mapped() expects, and the complete example
becomes:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp 13
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 13
*/
/*!
diff --git a/src/concurrent/qtconcurrentrun.cpp b/src/concurrent/qtconcurrentrun.cpp
index 656ecf7370..2cf46ac5a1 100644
--- a/src/concurrent/qtconcurrentrun.cpp
+++ b/src/concurrent/qtconcurrentrun.cpp
@@ -57,7 +57,7 @@
To run a function in another thread, use QtConcurrent::run():
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 0
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 0
This will run \e aFunction in a separate thread obtained from the default
QThreadPool. You can use the QFuture and QFutureWatcher classes to monitor
@@ -68,7 +68,7 @@
Passing arguments to the function is done by adding them to the
QtConcurrent::run() call immediately after the function name. For example:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 1
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 1
A copy of each argument is made at the point where QtConcurrent::run() is
called, and these values are passed to the thread when it begins executing
@@ -79,11 +79,11 @@
Any return value from the function is available via QFuture:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 2
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 2
As documented above, passing arguments is done like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 3
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 3
Note that the QFuture::result() function blocks and waits for the result
to become available. Use QFutureWatcher to get notification when the
@@ -102,11 +102,11 @@
For example, calling QByteArray::split() (a const member function) in a
separate thread is done like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 4
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 4
Calling a non-const member function is done like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 5
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 5
\section2 Using Bound Function Arguments
@@ -131,7 +131,7 @@
Calling a bound function is done like this:
- \snippet doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp 6
+ \snippet code/src_concurrent_qtconcurrentrun.cpp 6
*/
/*!
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index d98cebb672..4856c1b5fb 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -16,6 +16,9 @@ load(qt_module_config)
HEADERS += $$QT_SOURCE_TREE/src/corelib/qtcoreversion.h
+QMAKE_DOCS = $$PWD/doc/qtcore.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
include(animation/animation.pri)
include(arch/arch.pri)
include(global/global.pri)
@@ -30,7 +33,6 @@ include(codecs/codecs.pri)
include(statemachine/statemachine.pri)
include(mimetypes/mimetypes.pri)
include(xml/xml.pri)
-include(doc/doc.pri)
mac|darwin {
!ios {
diff --git a/src/corelib/doc/doc.pri b/src/corelib/doc/doc.pri
deleted file mode 100644
index ed970d7592..0000000000
--- a/src/corelib/doc/doc.pri
+++ /dev/null
@@ -1,3 +0,0 @@
-qtPrepareTool(QDOC, qdoc)
-docs.commands += $$QDOC $$QT.core.sources/doc/qtcore.qdocconf
-QMAKE_EXTRA_TARGETS += docs
diff --git a/doc/src/images/resources.png b/src/corelib/doc/images/resources.png
index eb7af96d77..eb7af96d77 100644
--- a/doc/src/images/resources.png
+++ b/src/corelib/doc/images/resources.png
Binary files differ
diff --git a/doc/src/snippets/code/doc_src_resources.cpp b/src/corelib/doc/snippets/code/doc_src_resources.cpp
index f401add728..f401add728 100644
--- a/doc/src/snippets/code/doc_src_resources.cpp
+++ b/src/corelib/doc/snippets/code/doc_src_resources.cpp
diff --git a/doc/src/snippets/code/doc_src_resources.qdoc b/src/corelib/doc/snippets/code/doc_src_resources.qdoc
index c51dbbcbf3..c51dbbcbf3 100644
--- a/doc/src/snippets/code/doc_src_resources.qdoc
+++ b/src/corelib/doc/snippets/code/doc_src_resources.qdoc
diff --git a/src/corelib/doc/src/io.qdoc b/src/corelib/doc/src/io.qdoc
new file mode 100644
index 0000000000..dfe9be2b3c
--- /dev/null
+++ b/src/corelib/doc/src/io.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group io
+ \title Input/Output and Networking
+ \ingroup groups
+
+ \brief Classes providing file input and output along with directory and
+ network handling.
+
+ These classes are used to handle input and output to and from external
+ devices, processes, files etc. as well as manipulating files and directories.
+*/
+
diff --git a/doc/src/network/files-and-resources/resources.qdoc b/src/corelib/doc/src/resource-system.qdoc
index 1d0fc51631..89a099a1c1 100644
--- a/doc/src/network/files-and-resources/resources.qdoc
+++ b/src/corelib/doc/src/resource-system.qdoc
@@ -26,18 +26,6 @@
****************************************************************************/
/*!
- \group io
- \title Input/Output and Networking
- \ingroup groups
-
- \brief Classes providing file input and output along with directory and
- network handling.
-
- These classes are used to handle input and output to and from external
- devices, processes, files etc. as well as manipulating files and directories.
-*/
-
-/*!
\page resources.html
\title The Qt Resource System
\ingroup qt-network
@@ -89,14 +77,14 @@
is \c images/cut.png. This can be changed using the \c file tag's
\c alias attribute:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 0
+ \snippet code/doc_src_resources.qdoc 0
The file is then accessible as \c :/cut-img.png from the
application. It is also possible to specify a path prefix for all
files in the \c .qrc file using the \c qresource tag's \c prefix
attribute:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 1
+ \snippet code/doc_src_resources.qdoc 1
In this case, the file is accessible as \c
:/myresources/cut-img.png.
@@ -106,7 +94,7 @@
attribute to the \c qresource tag, specifying a suitable locale
string. For example:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 2
+ \snippet code/doc_src_resources.qdoc 2
If the user's locale is French (i.e., QLocale::system().name() returns
"fr_FR"), \c :/cut.jpg becomes a reference to the \c cut_fr.jpg
@@ -126,11 +114,11 @@
For example, a set of resource data specified in a \c .qrc file can be
compiled in the following way:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 3
+ \snippet code/doc_src_resources.qdoc 3
In the application, this resource would be registered with code like this:
- \snippet doc/src/snippets/code/doc_src_resources.cpp 4
+ \snippet code/doc_src_resources.cpp 4
\section2 Compiled-In Resources
@@ -138,7 +126,7 @@
mentioned in the application's \c .pro file so that \c qmake knows
about it. For example:
- \snippet examples/mainwindows/application/application.pro 0
+ \snippet mainwindows/application/application.pro 0
\c qmake will produce make rules to generate a file called \c
qrc_application.cpp that is linked into the application. This
@@ -183,7 +171,7 @@
pass a resource path instead of a file name to the QIcon, QImage,
or QPixmap constructor:
- \snippet examples/mainwindows/application/mainwindow.cpp 21
+ \snippet mainwindows/application/mainwindow.cpp 21
See the \l{mainwindows/application}{Application} example for an
actual application that uses Qt's resource system to store its
@@ -205,7 +193,7 @@
Q_INIT_RESOURCE() with the base name of the \c .qrc file. For
example:
- \snippet doc/src/snippets/code/doc_src_resources.cpp 5
+ \snippet code/doc_src_resources.cpp 5
Similarly, if you must unload a set of resources explicitly
(because a plugin is being unloaded or the resources are not valid
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 52ffae5f98..ed845745be 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -737,7 +737,7 @@ void qWinMessageHandler2(QtMsgType t, const QMessageLogContext &context,
This is a typedef for a pointer to a function with the following
signature:
- \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 7
+ \snippet code/src_corelib_global_qglobal.cpp 7
This typedef is deprecated, you should use QtMessageHandler instead.
\sa QtMsgType, QtMessageHandler, qInstallMsgHandler(), qInstallMessageHandler()
@@ -751,7 +751,7 @@ void qWinMessageHandler2(QtMsgType t, const QMessageLogContext &context,
This is a typedef for a pointer to a function with the following
signature:
- \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 49
+ \snippet code/src_corelib_global_qglobal.cpp 49
\sa QtMsgType, qInstallMessageHandler()
*/
@@ -785,7 +785,7 @@ void qWinMessageHandler2(QtMsgType t, const QMessageLogContext &context,
Example:
- \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 23
+ \snippet code/src_corelib_global_qglobal.cpp 23
\sa QtMessageHandler, QtMsgType, qDebug(), qWarning(), qCritical(), qFatal(),
{Debugging Techniques}
diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp
index 17eedb0bdd..e1f1db9ead 100644
--- a/src/corelib/io/qfiledevice.cpp
+++ b/src/corelib/io/qfiledevice.cpp
@@ -146,12 +146,12 @@ void QFileDevicePrivate::setError(QFileDevice::FileError err, int errNum)
handling considerably. It is possible to force permission checking
on NTFS by including the following code in your source:
- \snippet doc/src/snippets/ntfsp.cpp 0
+ \snippet ntfsp.cpp 0
Permission checking is then turned on and off by incrementing and
decrementing \c qt_ntfs_permission_lookup by 1.
- \snippet doc/src/snippets/ntfsp.cpp 1
+ \snippet ntfsp.cpp 1
*/
//************* QFileDevice
diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp
index 2e2db11558..5625aebd3c 100644
--- a/src/corelib/io/qurlquery.cpp
+++ b/src/corelib/io/qurlquery.cpp
@@ -511,7 +511,7 @@ QString QUrlQuery::query(QUrl::ComponentFormattingOptions encoding) const
If \a valueDelimiter is set to '(' and \a pairDelimiter is ')',
the above query string would instead be represented like this:
- \snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 4
+ \snippet code/src_corelib_io_qurl.cpp 4
\note Non-standard delimiters should be chosen from among what RFC 3986 calls
"sub-delimiters". They are:
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 10dcff92c7..3172014363 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -838,7 +838,7 @@ void QHashData::checkSanity()
operator==() and a qHash() implementation.
Example:
- \snippet doc/src/snippets/code/src_corelib_tools_qhash.cpp 13
+ \snippet code/src_corelib_tools_qhash.cpp 13
In the example above, we've relied on Qt's global qHash(const
QString &, uint) to give us a hash value for the employee's name, and
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index c25d326b9d..0b0aeb50c0 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -404,8 +404,8 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &r
For example:
- \snippet doc/src/snippets/qstringlist/main.cpp 5
- \snippet doc/src/snippets/qstringlist/main.cpp 16
+ \snippet qstringlist/main.cpp 5
+ \snippet qstringlist/main.cpp 16
For regular expressions that contain capturing groups,
occurrences of \b{\\1}, \b{\\2}, ..., in \a after are
@@ -413,8 +413,8 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &r
For example:
- \snippet doc/src/snippets/qstringlist/main.cpp 5
- \snippet doc/src/snippets/qstringlist/main.cpp 17
+ \snippet qstringlist/main.cpp 5
+ \snippet qstringlist/main.cpp 17
*/
void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegularExpression &re, const QString &after)
{
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index 100736252e..b1a3e12e1f 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -35,6 +35,9 @@ load(qt_module_config)
HEADERS += $$QT_SOURCE_TREE/src/dbus/qtdbusversion.h
+QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
PUB_HEADERS = qdbusargument.h \
qdbusconnectioninterface.h \
qdbusmacros.h \
diff --git a/src/dbus/doc/qtdbus.qdocconf b/src/dbus/doc/qtdbus.qdocconf
new file mode 100644
index 0000000000..d33c4370a3
--- /dev/null
+++ b/src/dbus/doc/qtdbus.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtDBus
+description = Qt DBus Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtdbus
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtDBus
+
+qhp.QtDBus.file = qtdbus.qhp
+qhp.QtDBus.namespace = org.qt-project.qtdbus.500
+qhp.QtDBus.virtualFolder = qdoc
+qhp.QtDBus.indexTitle = Qt DBus Reference Documentation
+qhp.QtDBus.indexRoot =
+
+qhp.QtDBus.filterAttributes = qtdbus 5.0.0 qtrefdoc
+qhp.QtDBus.customFilters.Qt.name = QtDBus 5.0.0
+qhp.QtDBus.customFilters.Qt.filterAttributes = qtdbus 5.0.0
+qhp.QtDBus.subprojects = classes overviews examples
+qhp.QtDBus.subprojects.classes.title = Classes
+qhp.QtDBus.subprojects.classes.indexTitle = Qt DBus' Classes
+qhp.QtDBus.subprojects.classes.selectors = class fake:headerfile
+qhp.QtDBus.subprojects.classes.sortPages = true
+qhp.QtDBus.subprojects.overviews.title = Overviews
+qhp.QtDBus.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtDBus.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtDBus.subprojects.examples.title = Qt DBus Examples
+qhp.QtDBus.subprojects.examples.indexTitle = Qt DBus Examples
+qhp.QtDBus.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qtdbus
+tagfile = ../../../doc/qtdbus/qtdbus.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp b/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
index 99be26133e..5d8833cb16 100644
--- a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp
+++ b/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
@@ -39,10 +39,10 @@
****************************************************************************/
//! [0]
-[screen driver][:driver specific options][:display number]
+org.freedesktop.DBus
//! [0]
-
-//! [1]
-Mach64:/dev/fb1:2
-//! [1]
+//! [QDBUS_DEBUG]
+examples/dbus/remotecontrolledcar/controller/controller &
+QDBUS_DEBUG=1 examples/dbus/remotecontrolledcar/car/car &
+//! [QDBUS_DEBUG]
diff --git a/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp b/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp
new file mode 100644
index 0000000000..279c10f1e6
--- /dev/null
+++ b/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp
@@ -0,0 +1,293 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+class MainApplicationAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
+ Q_PROPERTY(QString caption READ caption WRITE setCaption)
+ Q_PROPERTY(QString organizationName READ organizationName)
+ Q_PROPERTY(QString organizationDomain READ organizationDomain)
+
+private:
+ QApplication *app;
+
+public:
+ MainApplicationAdaptor(QApplication *application)
+ : QDBusAbstractAdaptor(application), app(application)
+ {
+ connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ SLOT(focusChangedSlot(QWidget*, QWidget*)));
+ }
+
+ QString caption()
+ {
+ if (app->hasMainWindow())
+ return app->mainWindow()->caption();
+ return QString(""); // must not return a null QString
+ }
+
+ void setCaption(const QString &newCaption)
+ {
+ if (app->hasMainWindow())
+ app->mainWindow()->setCaption(newCaption);
+ }
+
+ QString organizationName()
+ {
+ return app->organizationName();
+ }
+
+ QString organizationDomain()
+ {
+ return app->organizationDomain();
+ }
+
+public slots:
+ Q_NOREPLY void quit()
+ { app->quit(); }
+
+ void reparseConfiguration()
+ { app->reparseConfiguration(); }
+
+ QString mainWindowObject()
+ {
+ if (app->hasMainWindow())
+ return QString("/%1/mainwindow").arg(app->applicationName());
+ return QString();
+ }
+
+ void setSessionManagement(bool enable)
+ {
+ if (enable)
+ app->enableSessionManagement();
+ else
+ app->disableSessionManagement();
+ }
+
+private slots:
+ void focusChangedSlot(QWidget *, QWidget *now)
+ {
+ if (now == app->mainWindow())
+ emit mainWindowHasFocus();
+ }
+
+signals:
+ void aboutToQuit();
+ void mainWindowHasFocus();
+};
+//! [0]
+
+
+//! [1]
+interface org.kde.DBus.MainApplication
+{
+ property readwrite STRING caption
+ property read STRING organizationName
+ property read STRING organizationDomain
+
+ method quit() annotation("org.freedesktop.DBus.Method.NoReply", "true")
+ method reparseConfiguration()
+ method mainWindowObject(out STRING)
+ method disableSessionManagement(in BOOLEAN enable)
+
+ signal aboutToQuit()
+ signal mainWindowHasFocus()
+}
+//! [1]
+
+
+//! [2]
+int main(int argc, char **argv)
+{
+ // create the QApplication object
+ QApplication app(argc, argv);
+
+ // create the MainApplication adaptor:
+ new MainApplicationAdaptor(app);
+
+ // connect to D-Bus and register as an object:
+ QDBusConnection::sessionBus().registerObject("/MainApplication", app);
+
+ // add main window, etc.
+ [...]
+
+ app.exec();
+}
+//! [2]
+
+
+//! [3]
+class MainApplicationAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
+//! [3]
+
+
+//! [4]
+ Q_PROPERTY(QString caption READ caption WRITE setCaption)
+ Q_PROPERTY(QString organizationName READ organizationName)
+ Q_PROPERTY(QString organizationDomain READ organizationDomain)
+//! [4]
+
+
+//! [5]
+QString caption()
+{
+ if (app->hasMainWindow())
+ return app->mainWindow()->caption();
+ return QString();
+}
+
+void setCaption(const QString &newCaption)
+{
+ if (app->hasMainWindow())
+ app->mainWindow()->setCaption(newCaption);
+}
+
+QString organizationName()
+{
+ return app->organizationName();
+}
+
+QString organizationDomain()
+{
+ return app->organizationDomain();
+}
+//! [5]
+
+
+//! [6]
+MyInterfaceAdaptor(QApplication *application)
+ : QDBusAbstractAdaptor(application), app(application)
+{
+ connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit());
+ connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ SLOT(focusChangedSlot(QWidget*, QWidget*)));
+}
+//! [6]
+
+
+//! [7]
+public slots:
+ Q_NOREPLY void quit()
+ { app->quit(); }
+
+ void reparseConfiguration()
+ { app->reparseConfiguration(); }
+
+ QString mainWindowObject()
+ {
+ if (app->hasMainWindow())
+ return QString("/%1/mainwindow").arg(app->applicationName());
+ return QString();
+ }
+
+ void setSessionManagement(bool enable)
+ {
+ if (enable)
+ app->enableSessionManagement();
+ else
+ app->disableSessionManagement();
+ }
+//! [7]
+
+
+//! [8]
+signals:
+ void aboutToQuit();
+ void mainWindowHasFocus();
+//! [8]
+
+
+//! [9]
+private slots:
+ void focusChangedSlot(QWidget *, QWidget *now)
+ {
+ if (now == app->mainWindow())
+ emit mainWindowHasFocus();
+ }
+//! [9]
+
+
+//! [10]
+struct RequestData
+{
+ QString request;
+ QString processedData;
+ QDBusMessage reply;
+};
+
+QString processRequest(const QString &request, const QDBusMessage &message)
+{
+ RequestData *data = new RequestData;
+ data->request = request;
+ message.setDelayedReply(true);
+ data->reply = message.createReply();
+ QDBusConnection::sessionBus().send(data->reply);
+
+ appendRequest(data);
+ return QString();
+}
+//! [10]
+
+
+//! [11]
+void sendReply(RequestData *data)
+{
+ // data->processedData has been initialized with the request's reply
+ QDBusMessage &reply = &data->reply;
+
+ // send the reply over D-Bus:
+ reply << data->processedData;
+ QDBusConnection::sessionBus().send(reply);
+
+ // dispose of the transaction data
+ delete data;
+}
+//! [11]
+
+
+//! [12]
+Q_NOREPLY void myMethod();
+//! [12]
diff --git a/src/dbus/doc/snippets/code/doc_src_qtdbus.cpp b/src/dbus/doc/snippets/code/doc_src_qtdbus.cpp
new file mode 100644
index 0000000000..65fc2e716b
--- /dev/null
+++ b/src/dbus/doc/snippets/code/doc_src_qtdbus.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtDBus>
+//! [0]
diff --git a/src/dbus/doc/snippets/code/doc_src_qtdbus.pro b/src/dbus/doc/snippets/code/doc_src_qtdbus.pro
new file mode 100644
index 0000000000..a1ba138a85
--- /dev/null
+++ b/src/dbus/doc/snippets/code/doc_src_qtdbus.pro
@@ -0,0 +1,3 @@
+#! [1]
+QT += dbus
+#! [1]
diff --git a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
index c16380f569..c16380f569 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
diff --git a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp
index 6fa0ec5fa3..6fa0ec5fa3 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp
diff --git a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
index 9ea2038aab..9ea2038aab 100644
--- a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
diff --git a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp
index 0bcc3deff3..0bcc3deff3 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp
diff --git a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp
index 6c12464b78..6c12464b78 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp
diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
index a5d46dccfe..a5d46dccfe 100644
--- a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp
index eac955a798..eac955a798 100644
--- a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp
diff --git a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp
index 326f395058..326f395058 100644
--- a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp
diff --git a/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp b/src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp
index 69c1d05cd5..69c1d05cd5 100644
--- a/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp
+++ b/src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp
diff --git a/src/dbus/doc/src/dbus-adaptors.qdoc b/src/dbus/doc/src/dbus-adaptors.qdoc
new file mode 100644
index 0000000000..a41c874c8c
--- /dev/null
+++ b/src/dbus/doc/src/dbus-adaptors.qdoc
@@ -0,0 +1,481 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page usingadaptors.html
+ \title Using QtDBus Adaptors
+ \brief How to create and use DBus adaptors in Qt.
+
+ \ingroup best-practices
+
+ Adaptors are special classes that are attached to any QObject-derived class
+ and provide the interface to the external world using D-Bus. Adaptors are
+ intended to be lightweight classes whose main purpose is to relay calls to
+ and from the real object, possibly validating or converting the input from
+ the external world and, thus, protecting the real object.
+
+ Unlike multiple inheritance, adaptors can be added at any time to any object
+ (but not removed), which allows for greater flexibility when exporting
+ existing classes. Another advantage of adaptors is to provide similar but not
+ identical functionality in methods of the same name in different interfaces,
+ a case which can be quite common when adding a new version of a standard
+ interface to an object.
+
+ In order to use an adaptor, one must create a class which inherits
+ QDBusAbstractAdaptor. Since that is a standard QObject-derived class, the
+ Q_OBJECT macro must appear in the declaration and the source file must be
+ processed with the \l {moc} tool. The class must also contain one
+ Q_CLASSINFO entry with the \c {"D-Bus Interface"} name, declaring which
+ interface it is exporting. Only one entry per class is supported.
+
+ Any public slot in the class will be accessible through the bus over messages
+ of the MethodCall type. (See \l {Declaring Slots in D-Bus Adaptors} for more
+ information). Signals in the class will be automatically relayed over D-Bus.
+ However, not all types are allowed signals or slots' parameter lists: see
+ \l {The QtDBus Type System} for more information.
+
+ Also, any property declared with Q_PROPERTY will be automatically exposed
+ over the Properties interface on D-Bus. Since the QObject property system
+ does not allow for non-readable properties, it is not possible to declare
+ write-only properties using adaptors.
+
+ More information:
+ \list
+ \li \l{Declaring Slots in D-Bus Adaptors}
+ \li \l{Declaring Signals in D-Bus Adaptors}
+ \li \l{The QtDBus Type System}
+ \li \l{D-Bus Adaptor Example}
+ \endlist
+
+ \sa QDBusAbstractAdaptor
+*/
+
+/*!
+ \page qdbusadaptorexample.html
+ \title D-Bus Adaptor Example
+
+ \previouspage The QtDBus Type System
+ \contentspage Using QtDBus Adaptors
+
+ The following example code shows how a D-Bus interface can be implemented
+ using an adaptor.
+
+ A sample usage of QDBusAbstractAdaptor is as follows:
+ \snippet code/doc_src_qdbusadaptors.cpp 0
+
+ The code above would create an interface that could be represented more or less in the following
+ canonical representation:
+ \snippet code/doc_src_qdbusadaptors.cpp 1
+
+ This adaptor could be used in the application's main function as follows
+ \snippet code/doc_src_qdbusadaptors.cpp 2
+
+ Break-down analysis:
+ \tableofcontents
+
+ \section1 The header
+
+ The header of the example is:
+ \snippet code/doc_src_qdbusadaptors.cpp 3
+
+ The code does the following:
+ \list
+ \li it declares the adaptor MainApplicationAdaptor, which descends from QDBusAbstractAdaptor
+ \li it declares the Qt meta-object data using the Q_OBJECT macro
+ \li it declares the name of the D-Bus interface it implements.
+ \endlist
+
+ \section1 The properties
+
+ The properties are declared as follows:
+ \snippet code/doc_src_qdbusadaptors.cpp 4
+
+ And are implemented as follows:
+ \snippet code/doc_src_qdbusadaptors.cpp 5
+
+ The code declares three properties: one of them is a read-write property called "caption" of
+ string type. The other two are read-only, also of the string type.
+
+ The properties organizationName and organizationDomain are simple relays of the app object's
+ organizationName and organizationDomain properties. However, the caption property requires
+ verifying if the application has a main window associated with it: if there isn't any, the
+ caption property is empty. Note how it is possible to access data defined in other objects
+ through the getter/setter functions.
+
+ \section1 The constructor
+
+ The constructor:
+ \snippet code/doc_src_qdbusadaptors.cpp 6
+
+ The constructor does the following:
+ \list
+ \li it initialises its base class (QDBusAbstractAdaptor) with the parent object it is related to.
+ \li it stores the app pointer in a member variable. Note that it would be possible to access the
+ same object using the QDBusAbstractAdaptor::object() function, but it would be necessary to
+ use \a static_cast<> to properly access the methods in QApplication that are not part of
+ QObject.
+ \li it connects the application's signal \a aboutToQuit to its own signal \a aboutToQuit.
+ \li it connects the application's signal \a focusChanged to a private slot to do some further
+ processing before emitting a D-Bus signal.
+ \endlist
+
+ Note that there is no destructor in the example. An eventual destructor could be used to emit
+ one last signal before the object is destroyed, for instance.
+
+ \section1 Slots/methods
+
+ The public slots in the example (which will be exported as D-Bus methods) are the following:
+ \snippet code/doc_src_qdbusadaptors.cpp 7
+
+ This snippet of code defines 4 methods with different properties each:
+ \list 1
+ \li \c quit: this method takes no parameters and is defined to be asynchronous. That is, callers
+ are expected to use "fire-and-forget" mechanism when calling this method, since it provides no
+ useful reply. This is represented in D-Bus by the use of the
+ org.freedesktop.DBus.Method.NoReply annotation. See \l Q_NOREPLY for more information on
+ asynchronous methods
+
+ \li \c reparseConfiguration: this simple method, with no input or output arguments simply relays
+ the call to the application's reparseConfiguration member function.
+
+ \li \c mainWindowObject: this method takes no input parameter, but returns one string output
+ argument, containing the path to the main window object (if the application has a main
+ window), or an empty string if it has no main window. Note that this method could have also
+ been written: void mainWindowObject(QString &path).
+
+ \li \c setSessionManagement: this method takes one input argument (a boolean) and, depending on
+ its value, it calls one function or another in the application.
+ \endlist
+
+ See also: \l Q_NOREPLY.
+
+ \section1 Signals
+
+ The signals in this example are defined as follows:
+ \snippet code/doc_src_qdbusadaptors.cpp 8
+
+ However, signal definition isn't enough: signals have to be emitted. One simple way of emitting
+ signals is to connect another signal to them, so that Qt's signal handling system chains them
+ automatically. This is what is done for the \a aboutToQuit signal.
+
+ When this is the case, one can use the QDBusAbstractAdaptor::setAutoRelaySignals to
+ automatically connect every signal from the real object to the adaptor.
+
+ When simple signal-to-signal connection isn't enough, one can use a private slot do do some
+ work. This is what was done for the mainWindowHasFocus signal:
+ \snippet code/doc_src_qdbusadaptors.cpp 9
+
+ This private slot (which will not be exported as a method via D-Bus) was connected to the
+ \c focusChanged signal in the adaptor's constructor. It is therefore able to shape the
+ application's signal into what the interface expects it to be.
+*/
+
+/*!
+ \page qdbusdeclaringslots.html
+ \title Declaring Slots in D-Bus Adaptors
+
+ \contentspage Using QtDBus Adaptors
+ \nextpage Declaring Signals in D-Bus Adaptors
+
+ Slots in D-Bus adaptors are declared just like normal, public slots, but their
+ parameters must follow certain rules (see \l{The QtDBus Type System} for more
+ information). Slots whose parameters do not follow those rules or that are not
+ public will not be accessible via D-Bus.
+
+ Slots can have one parameter of type \c{const QDBusMessage &}, which must
+ appear at the end of the input parameter list, before any output parameters.
+ This parameter, if present, will be initialized with a copy of the
+ current message being processed, which allows the callee to obtain
+ information about the caller, such as its connection name.
+
+ Slots can be of three kinds:
+ \list 1
+ \li Asynchronous
+ \li Input-only
+ \li Input-and-output
+ \endlist
+
+ \section1 Asynchronous Slots
+ Asynchronous slots are those that do not normally return any reply to the
+ caller. For that reason, they cannot take any output parameters. In most
+ cases, by the time the first line of the slot is run, the caller function
+ has already resumed working.
+
+ However, slots must not rely on that behavior. Scheduling and message-dispatching
+ issues could change the order in which the slot is run. Code intending to
+ synchronize with the caller should provide its own method of synchronization.
+
+ Asynchronous slots are marked by the keyword \l Q_NOREPLY in the method
+ signature, before the \c void return type and the slot name. (See the
+ \c quit() slot in the \l{D-Bus Adaptor Example}).
+
+ \section1 Input-Only Slots
+
+ Input-only slots are normal slots that take parameters passed by value or
+ by constant reference. However, unlike asynchronous slots, the caller is
+ usually waiting for completion of the callee before resuming operation.
+ Therefore, non-asynchronous slots should not block or should state it its
+ documentation that they may do so.
+
+ Input-only slots have no special marking in their signature, except that
+ they take only parameters passed by value or by constant reference.
+ Optionally, slots can take a QDBusMessage parameter as a last parameter,
+ which can be used to perform additional analysis of the method call message.
+
+ \section1 Input and Output Slots
+
+ Like input-only slots, input-and-output slots are those that the caller is
+ waiting for a reply. Unlike input-only ones, though, this reply will contain
+ data. Slots that output data may contain non-constant references and may
+ return a value as well. However, the output parameters must all appear at
+ the end of the argument list and may not have input arguments interleaved.
+ Optionally, a QDBusMessage argument may appear between the input and the
+ output arguments.
+
+ \section1 Automatic Replies
+
+ Method replies are generated automatically with the contents of the output
+ parameters (if there were any) by the QtDBus implementation. Slots need not
+ worry about constructing proper QDBusMessage objects and sending them over
+ the connection.
+
+ However, the possibility of doing so remains there. Should the slot find out
+ it needs to send a special reply or even an error, it can do so by using
+ QDBusMessage::createReply() or QDBusMessage::createErrorReply() on the
+ QDBusMessage parameter and send it with QDBusConnection::send(). The
+ QtDBus implementation will not generate any reply if the slot did so.
+
+ \warning When a caller places a method call and waits for a reply, it will
+ only wait for a limited amount of time. Slots intending to take a long time
+ to complete should make that fact clear in documentation so that callers
+ properly set higher timeouts.
+
+ \section1 Delayed Replies
+
+ In some circumstances, the called slot may not be able to process
+ the request immediately. This is frequently the case when the
+ request involves an I/O or networking operation which may block.
+
+ If this is the case, the slot should return control to the
+ application's main loop to avoid freezing the user interface, and
+ resume the process later. To accomplish this, it should make use
+ of the extra \c QDBusMessage parameter at the end of the input
+ parameter list and request a delayed reply.
+
+ We do this by writing a slot that stores the request data in a
+ persistent structure, indicating to the caller using
+ \l{QDBusMessage::setDelayedReply()}{QDBusMessage::setDelayedReply(true)}
+ that the response will be sent later.
+
+ \snippet code/doc_src_qdbusadaptors.cpp 10
+
+ The use of
+ \l{QDBusConnection::send()}{QDBusConnection::sessionBus().send(data->reply)}
+ is needed to explicitly inform the caller that the response will be delayed.
+ In this case, the return value is unimportant; we return an arbitrary value
+ to satisfy the compiler.
+
+ When the request is processed and a reply is available, it should be sent
+ using the \c QDBusMessage object that was obtained. In our example, the
+ reply code could be something as follows:
+
+ \snippet code/doc_src_qdbusadaptors.cpp 11
+
+ As can be seen in the example, when a delayed reply is in place,
+ the return value(s) from the slot will be ignored by QtDBus. They
+ are used only to determine the slot's signature when communicating
+ the adaptor's description to remote applications, or in case the
+ code in the slot decides not to use a delayed reply.
+
+ The delayed reply itself is requested from QtDBus by calling
+ QDBusMessage::reply() on the original message. It then becomes the
+ resposibility of the called code to eventually send a reply to the
+ caller.
+
+ \warning When a caller places a method call and waits for a reply, it will
+ only wait for a limited amount of time. Slots intending to take a long time
+ to complete should make that fact clear in documentation so that callers
+ properly set higher timeouts.
+
+ \sa {Using QtDBus Adaptors}, {Declaring Signals in D-Bus Adaptors},
+ {The QtDBus Type System}, QDBusConnection, QDBusMessage
+*/
+
+/*!
+ \page qdbusdeclaringsignals.html
+ \title Declaring Signals in D-Bus Adaptors
+
+ \previouspage Declaring Slots in D-Bus Adaptors
+ \contentspage Using QtDBus Adaptors
+ \nextpage The QtDBus Type System
+
+ Any signal in a class derived from QDBusAbstractAdaptor will be automatically
+ relayed into D-Bus, provided that the signal's parameters conform to certain
+ rules (see \l{The QtDBus Type System} for more information). No special code
+ is necessary to make this relay.
+
+ However, signals must still be emitted. The easiest way to emit an adaptor
+ signal is to connect another signal to it, so that Qt's signals and slots
+ mechanism automatically emits the adaptor signal, too. This can be done in
+ the adaptor's constructor, as has been done in the
+ \l{D-Bus Adaptor Example}{D-Bus Adaptor example}.
+
+ The QDBusAbstractAdaptor::setAutoRelaySignals() convenience function can also
+ be used to make and break connections between signals in the real object and
+ the corresponding signals in the adaptor. It will inspect the list of signals
+ in both classes and connect those whose parameters match exactly.
+
+ \sa {Using QtDBus Adaptors},
+ {Declaring Slots in D-Bus Adaptors},
+ {The QtDBus Type System}, QDBusAbstractAdaptor
+*/
+
+/*!
+ \page qdbustypesystem.html
+ \title The QtDBus Type System
+
+ \previouspage Declaring Signals in D-Bus Adaptors
+ \contentspage Using QtDBus Adaptors
+ \nextpage D-Bus Adaptor Example
+
+ D-Bus has an extensible type system based on a few primitives and
+ composition of the primitives in arrays and structures. QtDBus
+ implements the interface to that type system through the
+ QDBusArgument class, allowing user programs to send and receive
+ practically every C++ type over the bus.
+
+ \section1 Primitive Types
+
+ The primitive types are supported natively by QDBusArgument and
+ need no special customization to be sent or received. They are
+ listed below, along with the C++ class they relate to:
+
+ \table
+ \header
+ \li Qt type
+ \li D-Bus equivalent type
+ \row
+ \li uchar
+ \li BYTE
+ \row
+ \li bool
+ \li BOOLEAN
+ \row
+ \li short
+ \li INT16
+ \row
+ \li ushort
+ \li UINT16
+ \row
+ \li int
+ \li INT32
+ \row
+ \li uint
+ \li UINT32
+ \row
+ \li qlonglong
+ \li INT64
+ \row
+ \li qulonglong
+ \li UINT64
+ \row
+ \li double
+ \li DOUBLE
+ \row
+ \li QString
+ \li STRING
+ \row
+ \li QDBusVariant
+ \li VARIANT
+ \row
+ \li QDBusObjectPath
+ \li OBJECT_PATH
+ \row
+ \li QDBusSignature
+ \li SIGNATURE
+ \endtable
+
+ Aside from the primitive types, QDBusArgument also supports two
+ non-primitive types natively, due to their widespread use in Qt
+ applications: QStringList and QByteArray.
+
+ \section1 Compound Types
+
+ D-Bus specifies three types of aggregations of primitive types
+ that allow one to create compound types. They are \c ARRAY, \c
+ STRUCT and maps/dictionaries.
+
+ Arrays are sets of zero or more elements of the same type, while
+ structures are a set of a fixed number of elements, each of any
+ type. Maps or dictionaries are implemented as arrays of a pair of
+ elements, so there can be zero or more elements in one map.
+
+ \section1 Extending the Type System
+
+ In order to use one's own type with QtDBus, the type has to be
+ declared as a Qt meta-type with the Q_DECLARE_METATYPE() macro and
+ registered with the qDBusRegisterMetaType() function. The
+ streaming operators \c{operator>>} and \c{operator<<} will be
+ automatically found by the registration system.
+
+ QtDBus provides template specializations for arrays and maps for
+ use with Qt's \l{Container classes}{container classes}, such as
+ QMap and QList, so it is not necessary to write the streaming
+ operator functions for those. For other types, and specially for
+ types implementing structures, the operators have to be explicitly
+ implemented.
+
+ See the documentation for QDBusArgument for examples for
+ structures, arrays and maps.
+
+ \section1 The Type System in Use
+
+ All of the QtDBus types (primitives and user-defined alike) can be
+ used to send and receive messages of all types over the bus.
+
+ \warning You may not use any type that is not on the list above,
+ including \a typedefs to the types listed. This also includes
+ QList<QVariant> and QMap<QString,QVariant>.
+*/
+
+/*!
+ \macro Q_NOREPLY
+ \relates QDBusAbstractAdaptor
+ \since 4.2
+
+ The Q_NOREPLY macro can be used to mark a method to be called and not wait for it to finish
+ processing before returning from QDBusInterface::call(). The called method cannot return any
+ output arguments and, if it does, any such arguments will be discarded.
+
+ You can use this macro in your own adaptors by placing it before your method's return value
+ (which must be "void") in the class declaration, as shown in the example:
+ \snippet code/doc_src_qdbusadaptors.cpp 12
+
+ Its presence in the method implementation (outside the class declaration) is optional.
+
+ \sa {Using QtDBus Adaptors}
+*/
diff --git a/src/dbus/doc/src/dbus-intro.qdoc b/src/dbus/doc/src/dbus-intro.qdoc
new file mode 100644
index 0000000000..b3cf29e129
--- /dev/null
+++ b/src/dbus/doc/src/dbus-intro.qdoc
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page intro-to-dbus.html
+ \title D-Bus
+ \brief An introduction to Inter-Process Communication and Remote Procedure Calling with D-Bus.
+
+ \keyword QtDBus
+ \ingroup technology-apis
+
+ \section1 Introduction
+
+ D-Bus is an Inter-Process Communication (IPC) and Remote Procedure
+ Calling (RPC) mechanism originally developed for Linux to replace
+ existing and competing IPC solutions with one unified protocol. It
+ has also been designed to allow communication between system-level
+ processes (such as printer and hardware driver services) and
+ normal user processes.
+
+ It uses a fast, binary message-passing protocol, which is suitable
+ for same-machine communication due to its low latency and low
+ overhead. Its specification is currently defined by the
+ \tt{freedesktop.org} project, and is available to all parties.
+
+ Communication in general happens through a central server
+ application, called the "bus" (hence the name), but direct
+ application-to-application communication is also possible. When
+ communicating on a bus, applications can query which other
+ applications and services are available, as well as activate one
+ on demand.
+
+ \section1 The Buses
+
+ D-Bus buses are used to when many-to-many communication is
+ desired. In order to achieve that, a central server is launched
+ before any applications can connect to the bus: this server is
+ responsible for keeping track of the applications that are
+ connected and for properly routing messages from their source to
+ their destination.
+
+ In addition, D-Bus defines two well-known buses, called the
+ system bus and the session bus. These buses are special in the
+ sense that they have well-defined semantics: some services are
+ defined to be found in one or both of these buses.
+
+ For example, an application wishing to query the list of hardware
+ devices attached to the computer will probably communicate to a
+ service available on the system bus, while the service providing
+ opening of the user's web browser will be probably found on the
+ session bus.
+
+ On the system bus, one can also expect to find restrictions on
+ what services each application is allowed to offer. Therefore, one
+ can be reasonably certain that, if a certain service is present,
+ it is being offered by a trusted application.
+
+ \section1 Concepts
+
+ \section2 Messages
+
+ On the low level, applications communicate over D-Bus by sending
+ messages to one another. Messages are used to relay the remote
+ procedure calls as well as the replies and errors associated
+ with them. When used over a bus, messages have a destination,
+ which means they are routed only to the interested parties,
+ avoiding congestion due to "swarming" or broadcasting.
+
+ A special kind of message called a "signal message"
+ (a concept based on Qt's \l {Signals and Slots} mechanism),
+ however, does not have a pre-defined destination. Since its
+ purpose is to be used in a one-to-many context, signal messages
+ are designed to work over an "opt-in" mechanism.
+
+ The QtDBus module fully encapsulates the low-level concept of
+ messages into a simpler, object-oriented approach familiar to Qt
+ developers. In most cases, the developer need not worry about
+ sending or receiving messages.
+
+ \section2 Service Names
+
+ When communicating over a bus, applications obtain what is
+ called a "service name": it is how that application chooses to be
+ known by other applications on the same bus. The service names
+ are brokered by the D-Bus bus daemon and are used to
+ route messages from one application to another. An analogous
+ concept to service names are IP addresses and hostnames: a
+ computer normally has one IP address and may have one or more
+ hostnames associated with it, according to the services that it
+ provides to the network.
+
+ On the other hand, if a bus is not used, service names are also
+ not used. If we compare this to a computer network again, this
+ would equate to a point-to-point network: since the peer is
+ known, there is no need to use hostnames to find it or its IP
+ address.
+
+ The format of a D-Bus service name is in fact very similar to a
+ host name: it is a dot-separated sequence of letters and
+ digits. The common practice is even to name one's service name
+ according to the domain name of the organization that defined
+ that service.
+
+ For example, the D-Bus service is defined by
+ \tt{freedesktop.org} and can be found on the bus under the
+ service name:
+
+ \snippet code/doc_src_introtodbus.qdoc 0
+
+ \section2 Object Paths
+
+ Like network hosts, applications provide specific services to
+ other applications by exporting objects. Those objects are
+ hierarchically organised, much like the parent-child
+ relationship that classes derived from QObject possess. One
+ difference, however, is that there is the concept of "root
+ object", that all objects have as ultimate parent.
+
+ If we continue our analogy with Web services, object paths
+ equate to the path part of a URL:
+
+ \img qurl-ftppath.png
+
+ Like them, object paths in D-Bus are formed resembling path
+ names on the filesystem: they are slash-separated labels, each
+ consisting of letters, digits and the underscore character
+ ("_"). They must always start with a slash and must not end with
+ one.
+
+ \section2 Interfaces
+
+ Interfaces are similar to C++ abstract classes and Java's
+ \c interface keyword and declare the "contract" that is
+ established between caller and callee. That is, they establish
+ the names of the methods, signals and properties that are
+ available as well as the behavior that is expected from either
+ side when communication is established.
+
+ Qt uses a very similar mechanism in its \l {How to Create Qt
+ Plugins}{Plugin system}: Base classes in C++ are associated
+ with a unique identifier by way of the Q_DECLARE_INTERFACE()
+ macro.
+
+ D-Bus interface names are, in fact, named in a manner similar to
+ what is suggested by the Qt Plugin System: an identifier usually
+ constructed from the domain name of the entity that defined that
+ interface.
+
+ \section2 Cheat Sheet
+
+ To facilitate remembering of the naming formats and their
+ purposes, the following table can be used:
+
+ \table 90%
+ \header \li D-Bus Concept \li Analogy \li Name format
+ \row \li Service name \li Network hostnames \li Dot-separated
+ ("looks like a hostname")
+ \row \li Object path \li URL path component \li Slash-separated
+ ("looks like a path")
+ \row \li Interface \li Plugin identifier \li Dot-separated
+ \endtable
+
+ \section1 Debugging
+
+ When developing applications that use D-Bus, it is sometimes useful to be able
+ to see information about the messages that are sent and received across the
+ bus by each application.
+
+ This feature can be enabled on a per-application basis by setting the
+ \c QDBUS_DEBUG environment variable before running each application.
+ For example, we can enable debugging only for the car in the
+ \l{D-Bus Remote Controlled Car Example} by running the controller and the
+ car in the following way:
+
+ \snippet code/doc_src_introtodbus.qdoc QDBUS_DEBUG
+
+ Information about the messages will be written to the console the application
+ was launched from.
+
+ \section1 Further Reading
+
+ The following documents contain information about Qt's D-Bus integration
+ features, and provide details about the mechanisms used to send and receive
+ type information over the bus:
+
+ \list
+ \li \l{Using QtDBus Adaptors}
+ \li \l{The QtDBus Type System}
+ \li \l{QtDBus XML compiler (qdbusxml2cpp)}
+ \endlist
+*/
diff --git a/src/dbus/doc/src/qdbusxml2cpp.qdoc b/src/dbus/doc/src/qdbusxml2cpp.qdoc
new file mode 100644
index 0000000000..996b5c7820
--- /dev/null
+++ b/src/dbus/doc/src/qdbusxml2cpp.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qdbusxml2cpp.html
+ \title QtDBus XML compiler (qdbusxml2cpp)
+ \keyword qdbusxml2cpp
+
+ The QtDBus XML compiler is a tool that can be used to parse interface descriptions and produce
+ static code representing those interfaces, which can then be used to make calls to remote
+ objects or implement said interfaces.
+
+ \c qdbusxml2cpp has two modes of operation, that correspond to the two possible outputs it can
+ produce: the interface (proxy) class or the adaptor class. The latter consists of both a C++
+ header and a source file, which are meant to be edited and adapted to your needs.
+
+ The \c qdbusxml2cpp tool is not meant to be run every time you compile your
+ application. Instead, it's meant to be used when developing the code or when the interface
+ changes.
+
+ The adaptor classes generated by \c qdbusxml2cpp are just a skeleton that must be completed. It
+ generates, by default, calls to slots with the same name on the object the adaptor is attached
+ to. However, you may modify those slots or the property accessor functions to suit your needs.
+*/
+
diff --git a/doc/src/dbus/qtdbus.qdoc b/src/dbus/doc/src/qtdbus.qdoc
index 8039cc040b..739502e1fc 100644
--- a/doc/src/dbus/qtdbus.qdoc
+++ b/src/dbus/doc/src/qtdbus.qdoc
@@ -48,13 +48,13 @@
To use this module, use the following code in your application:
- \snippet doc/src/snippets/code/doc_src_qtdbus.cpp 0
+ \snippet code/doc_src_qtdbus.cpp 0
If you're using qmake to build your application, you can add this
line to your .pro file to make it link against the QtDBus
libraries:
- \snippet doc/src/snippets/code/doc_src_qtdbus.pro 1
+ \snippet code/doc_src_qtdbus.pro 1
\note The source code for this module is located in the \c{src/qdbus}
directory. When installing Qt from source, this module is built when Qt's
@@ -62,6 +62,4 @@
See the \l {D-Bus} page for detailed information on
how to use this module.
-
- This module is part of all \l{Qt editions}.
*/
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index ea32e6ead6..51b100839c 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -650,7 +650,7 @@ void QDBusAbstractInterface::internalPropSet(const char *propname, const QVarian
It can be used the following way:
- \snippet doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp 0
+ \snippet code/src_qdbus_qdbusabstractinterface.cpp 0
This example illustrates function calling with 0, 1 and 2 parameters and illustrates different
parameter types passed in each (the first call to \c "ProcessWorkUnicode" will contain one
@@ -742,7 +742,7 @@ QDBusMessage QDBusAbstractInterface::call(QDBus::CallMode mode, const QString &m
It can be used the following way:
- \snippet doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp 1
+ \snippet code/src_qdbus_qdbusabstractinterface.cpp 1
This example illustrates function calling with 0, 1 and 2 parameters and illustrates different
parameter types passed in each (the first call to \c "ProcessWorkUnicode" will contain one
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index 6e6e676dae..0969aef83f 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -190,13 +190,13 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
integer and a string can be constructed using the \l
{qdbustypesystem.html}{QtDBus type system}:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 0
+ \snippet code/src_qdbus_qdbusargument.cpp 0
The type has to be registered with qDBusRegisterMetaType() before
it can be used with QDBusArgument. Therefore, somewhere in your
program, you should add the following code:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 1
+ \snippet code/src_qdbus_qdbusargument.cpp 1
Once registered, a type can be used in outgoing method calls
(placed with QDBusAbstractInterface::call()), signal emissions
@@ -275,11 +275,11 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
Attempts to demarshall the contents of \a argument into the type
\c{T}. For example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 2
+ \snippet code/src_qdbus_qdbusargument.cpp 2
Note that it is equivalent to the following:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 3
+ \snippet code/src_qdbus_qdbusargument.cpp 3
*/
/*!
@@ -817,12 +817,12 @@ const QDBusArgument &QDBusArgument::operator>>(QByteArray &arg) const
This function is used usually in \c{operator<<} streaming
operators, as in the following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 4
+ \snippet code/src_qdbus_qdbusargument.cpp 4
Structures can contain other structures, so the following code is
also valid:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 5
+ \snippet code/src_qdbus_qdbusargument.cpp 5
\sa endStructure(), beginArray(), beginMap()
*/
@@ -850,7 +850,7 @@ void QDBusArgument::endStructure()
This function is used usually in \c{operator<<} streaming
operators, as in the following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 6
+ \snippet code/src_qdbus_qdbusargument.cpp 6
If the type you want to marshall is a QList, QVector or any of the
Qt's \l {Container Classes} that take one template parameter,
@@ -889,7 +889,7 @@ void QDBusArgument::endArray()
This function is used usually in \c{operator<<} streaming
operators, as in the following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 7
+ \snippet code/src_qdbus_qdbusargument.cpp 7
If the type you want to marshall is a QMap or QHash, you need not
declare an \c{operator<<} function for it, since QtDBus provides
@@ -948,7 +948,7 @@ void QDBusArgument::endMapEntry()
This function is used usually in \c{operator>>} streaming
operators, as in the following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 8
+ \snippet code/src_qdbus_qdbusargument.cpp 8
\sa endStructure(), beginArray(), beginMap()
*/
@@ -977,7 +977,7 @@ void QDBusArgument::endStructure() const
This function is used usually in \c{operator>>} streaming
operators, as in the following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 9
+ \snippet code/src_qdbus_qdbusargument.cpp 9
If the type you want to demarshall is a QList, QVector or any of the
Qt's \l {Container Classes} that take one template parameter, you
@@ -1013,7 +1013,7 @@ void QDBusArgument::endArray() const
This function is used usually in \c{operator>>} streaming
operators, as in the following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusargument.cpp 10
+ \snippet code/src_qdbus_qdbusargument.cpp 10
If the type you want to demarshall is a QMap or QHash, you need not
declare an \c{operator>>} function for it, since QtDBus provides
diff --git a/src/dbus/qdbuscontext.cpp b/src/dbus/qdbuscontext.cpp
index cc987d1410..0a13fce9ee 100644
--- a/src/dbus/qdbuscontext.cpp
+++ b/src/dbus/qdbuscontext.cpp
@@ -90,7 +90,7 @@ QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate
exported using QDBusConnection::registerObject(). The following
example illustrates the usage:
- \snippet doc/src/snippets/code/src_qdbus_qdbuscontext.cpp 0
+ \snippet code/src_qdbus_qdbuscontext.cpp 0
The example illustrates the two typical uses, that of sending
error replies and that of delayed replies.
diff --git a/src/dbus/qdbusextratypes.cpp b/src/dbus/qdbusextratypes.cpp
index 4438e3c65f..4b2730c44a 100644
--- a/src/dbus/qdbusextratypes.cpp
+++ b/src/dbus/qdbusextratypes.cpp
@@ -73,11 +73,11 @@ void QDBusSignature::doCheck()
A D-Bus function that takes an integer, a D-Bus variant and a string as parameters
can be called with the following argument list (see QDBusMessage::setArguments()):
- \snippet doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp 0
+ \snippet qdbusextratypes/qdbusextratypes.cpp 0
When a D-Bus function returns a D-Bus variant, it can be retrieved as follows:
- \snippet doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp 1
+ \snippet qdbusextratypes/qdbusextratypes.cpp 1
The QVariant within a QDBusVariant is required to distinguish between a normal
D-Bus value and a value within a D-Bus variant.
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index f6a84b9980..844b0b7a4c 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -196,7 +196,7 @@ QDBusInterfacePrivate::~QDBusInterfacePrivate()
mathematical operation of \tt{"2 + 2"} in a remote application
called \c com.example.Calculator, accessed via the session bus.
- \snippet doc/src/snippets/code/src_qdbus_qdbusinterface.cpp 0
+ \snippet code/src_qdbus_qdbusinterface.cpp 0
\sa {QtDBus XML compiler (qdbusxml2cpp)}
*/
diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp
index 0359b4da35..03cad1ee63 100644
--- a/src/dbus/qdbusmetatype.cpp
+++ b/src/dbus/qdbusmetatype.cpp
@@ -200,7 +200,7 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
Q_DECLARE_METATYPE() macro, and then registered as in the
following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp 0
+ \snippet code/src_qdbus_qdbusmetatype.cpp 0
If \c{T} isn't a type derived from one of
Qt's \l{container classes}, the \c{operator<<} and
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 3d5dc421d7..9ae68c7abc 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE
It is usually used like the following example:
- \snippet doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp 0
+ \snippet code/src_qdbus_qdbuspendingcall.cpp 0
Note that it is not necessary to keep the original QDBusPendingCall
object around since QDBusPendingCallWatcher inherits from that class
@@ -106,7 +106,7 @@ QT_BEGIN_NAMESPACE
The slot connected to by the above code could be something similar
to the following:
- \snippet doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp 1
+ \snippet code/src_qdbus_qdbuspendingcall.cpp 1
Note the use of QDBusPendingReply to validate the argument types in
the reply. If the reply did not contain exactly two arguments
diff --git a/src/dbus/qdbuspendingreply.cpp b/src/dbus/qdbuspendingreply.cpp
index b9694ca205..2fd219260d 100644
--- a/src/dbus/qdbuspendingreply.cpp
+++ b/src/dbus/qdbuspendingreply.cpp
@@ -69,22 +69,22 @@
Where with QDBusReply you would write:
- \snippet doc/src/snippets/code/src_qdbus_qdbusreply.cpp 0
+ \snippet code/src_qdbus_qdbusreply.cpp 0
with QDBusPendingReply, the equivalent code (including the blocking
wait for the reply) would be:
- \snippet doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp 0
+ \snippet code/src_qdbus_qdbuspendingreply.cpp 0
For method calls that have more than one output argument, with
QDBusReply, you would write:
- \snippet doc/src/snippets/code/src_qdbus_qdbusreply.cpp 1
+ \snippet code/src_qdbus_qdbusreply.cpp 1
whereas with QDBusPendingReply, all of the output arguments should
be template parameters:
- \snippet doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp 2
+ \snippet code/src_qdbus_qdbuspendingreply.cpp 2
QDBusPendingReply objects can be associated with
QDBusPendingCallWatcher objects, which emit signals when the reply
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp
index c891874d98..9875329a26 100644
--- a/src/dbus/qdbusreply.cpp
+++ b/src/dbus/qdbusreply.cpp
@@ -61,10 +61,10 @@ QT_BEGIN_NAMESPACE
argument.
It can be used in the following manner:
- \snippet doc/src/snippets/code/src_qdbus_qdbusreply.cpp 0
+ \snippet code/src_qdbus_qdbusreply.cpp 0
If the remote method call cannot fail, you can skip the error checking:
- \snippet doc/src/snippets/code/src_qdbus_qdbusreply.cpp 1
+ \snippet code/src_qdbus_qdbusreply.cpp 1
However, if it does fail under those conditions, the value returned by QDBusReply::value() is
a default-constructed value. It may be indistinguishable from a valid return value.
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index b84ecefd73..ec02086d74 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -460,7 +460,7 @@ static void qAccessibleCleanup()
This is a typedef for a pointer to a function with the following
signature:
- \snippet doc/src/snippets/code/src_gui_accessible_qaccessible.cpp 1
+ \snippet code/src_gui_accessible_qaccessible.cpp 1
The function receives a QString and a QObject pointer, where the
QString is the key identifying the interface. The QObject is used
diff --git a/doc/src/images/brush-outline.png b/src/gui/doc/images/brush-outline.png
index f560c9faf5..f560c9faf5 100644
--- a/doc/src/images/brush-outline.png
+++ b/src/gui/doc/images/brush-outline.png
Binary files differ
diff --git a/src/gui/doc/images/brush-styles.png b/src/gui/doc/images/brush-styles.png
new file mode 100644
index 0000000000..eecb006af1
--- /dev/null
+++ b/src/gui/doc/images/brush-styles.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-analogclock.png b/src/gui/doc/images/coordinatesystem-analogclock.png
index 16e3091b77..16e3091b77 100644
--- a/doc/src/images/coordinatesystem-analogclock.png
+++ b/src/gui/doc/images/coordinatesystem-analogclock.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-line-antialias.png b/src/gui/doc/images/coordinatesystem-line-antialias.png
index 90dfa8730e..90dfa8730e 100644
--- a/doc/src/images/coordinatesystem-line-antialias.png
+++ b/src/gui/doc/images/coordinatesystem-line-antialias.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-line-raster.png b/src/gui/doc/images/coordinatesystem-line-raster.png
index 65201bde9f..65201bde9f 100644
--- a/doc/src/images/coordinatesystem-line-raster.png
+++ b/src/gui/doc/images/coordinatesystem-line-raster.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-line.png b/src/gui/doc/images/coordinatesystem-line.png
index fbf6873084..fbf6873084 100644
--- a/doc/src/images/coordinatesystem-line.png
+++ b/src/gui/doc/images/coordinatesystem-line.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-rect-antialias.png b/src/gui/doc/images/coordinatesystem-rect-antialias.png
index 162e1df9cb..162e1df9cb 100644
--- a/doc/src/images/coordinatesystem-rect-antialias.png
+++ b/src/gui/doc/images/coordinatesystem-rect-antialias.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-rect-raster.png b/src/gui/doc/images/coordinatesystem-rect-raster.png
index be3690d6ad..be3690d6ad 100644
--- a/doc/src/images/coordinatesystem-rect-raster.png
+++ b/src/gui/doc/images/coordinatesystem-rect-raster.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-rect.png b/src/gui/doc/images/coordinatesystem-rect.png
index 76c06befd6..76c06befd6 100644
--- a/doc/src/images/coordinatesystem-rect.png
+++ b/src/gui/doc/images/coordinatesystem-rect.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-transformations.png b/src/gui/doc/images/coordinatesystem-transformations.png
index 2736213c07..2736213c07 100644
--- a/doc/src/images/coordinatesystem-transformations.png
+++ b/src/gui/doc/images/coordinatesystem-transformations.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-arrow.png b/src/gui/doc/images/cursor-arrow.png
new file mode 100644
index 0000000000..a69ef4eb61
--- /dev/null
+++ b/src/gui/doc/images/cursor-arrow.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-busy.png b/src/gui/doc/images/cursor-busy.png
new file mode 100644
index 0000000000..53717e4992
--- /dev/null
+++ b/src/gui/doc/images/cursor-busy.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-closedhand.png b/src/gui/doc/images/cursor-closedhand.png
new file mode 100644
index 0000000000..b78dd1dac5
--- /dev/null
+++ b/src/gui/doc/images/cursor-closedhand.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-cross.png b/src/gui/doc/images/cursor-cross.png
new file mode 100644
index 0000000000..fe38e74480
--- /dev/null
+++ b/src/gui/doc/images/cursor-cross.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-forbidden.png b/src/gui/doc/images/cursor-forbidden.png
new file mode 100644
index 0000000000..2b08c4e2a3
--- /dev/null
+++ b/src/gui/doc/images/cursor-forbidden.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-hand.png b/src/gui/doc/images/cursor-hand.png
new file mode 100644
index 0000000000..d2004aefa7
--- /dev/null
+++ b/src/gui/doc/images/cursor-hand.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-hsplit.png b/src/gui/doc/images/cursor-hsplit.png
new file mode 100644
index 0000000000..a5667e3ffb
--- /dev/null
+++ b/src/gui/doc/images/cursor-hsplit.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-ibeam.png b/src/gui/doc/images/cursor-ibeam.png
new file mode 100644
index 0000000000..097fc5fa72
--- /dev/null
+++ b/src/gui/doc/images/cursor-ibeam.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-openhand.png b/src/gui/doc/images/cursor-openhand.png
new file mode 100644
index 0000000000..9181c859ed
--- /dev/null
+++ b/src/gui/doc/images/cursor-openhand.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-sizeall.png b/src/gui/doc/images/cursor-sizeall.png
new file mode 100644
index 0000000000..69f13eb347
--- /dev/null
+++ b/src/gui/doc/images/cursor-sizeall.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-sizeb.png b/src/gui/doc/images/cursor-sizeb.png
new file mode 100644
index 0000000000..f37d7b91e8
--- /dev/null
+++ b/src/gui/doc/images/cursor-sizeb.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-sizef.png b/src/gui/doc/images/cursor-sizef.png
new file mode 100644
index 0000000000..3b127a05d3
--- /dev/null
+++ b/src/gui/doc/images/cursor-sizef.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-sizeh.png b/src/gui/doc/images/cursor-sizeh.png
new file mode 100644
index 0000000000..a9f40cbc3d
--- /dev/null
+++ b/src/gui/doc/images/cursor-sizeh.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-sizev.png b/src/gui/doc/images/cursor-sizev.png
new file mode 100644
index 0000000000..1edbab27a5
--- /dev/null
+++ b/src/gui/doc/images/cursor-sizev.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-uparrow.png b/src/gui/doc/images/cursor-uparrow.png
new file mode 100644
index 0000000000..d3e70ef4c2
--- /dev/null
+++ b/src/gui/doc/images/cursor-uparrow.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-vsplit.png b/src/gui/doc/images/cursor-vsplit.png
new file mode 100644
index 0000000000..1beda2570e
--- /dev/null
+++ b/src/gui/doc/images/cursor-vsplit.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-wait.png b/src/gui/doc/images/cursor-wait.png
new file mode 100644
index 0000000000..69056c479e
--- /dev/null
+++ b/src/gui/doc/images/cursor-wait.png
Binary files differ
diff --git a/src/gui/doc/images/cursor-whatsthis.png b/src/gui/doc/images/cursor-whatsthis.png
new file mode 100644
index 0000000000..b47601c378
--- /dev/null
+++ b/src/gui/doc/images/cursor-whatsthis.png
Binary files differ
diff --git a/doc/src/images/hoverevents.png b/src/gui/doc/images/hoverevents.png
index ccc079bdf1..ccc079bdf1 100644
--- a/doc/src/images/hoverevents.png
+++ b/src/gui/doc/images/hoverevents.png
Binary files differ
diff --git a/doc/src/images/paintsystem-antialiasing.png b/src/gui/doc/images/paintsystem-antialiasing.png
index 1275841b93..1275841b93 100644
--- a/doc/src/images/paintsystem-antialiasing.png
+++ b/src/gui/doc/images/paintsystem-antialiasing.png
Binary files differ
diff --git a/doc/src/images/paintsystem-core.png b/src/gui/doc/images/paintsystem-core.png
index 7d6a8e591b..7d6a8e591b 100644
--- a/doc/src/images/paintsystem-core.png
+++ b/src/gui/doc/images/paintsystem-core.png
Binary files differ
diff --git a/doc/src/images/paintsystem-devices.png b/src/gui/doc/images/paintsystem-devices.png
index 7b81b7cbb8..7b81b7cbb8 100644
--- a/doc/src/images/paintsystem-devices.png
+++ b/src/gui/doc/images/paintsystem-devices.png
Binary files differ
diff --git a/doc/src/images/paintsystem-fancygradient.png b/src/gui/doc/images/paintsystem-fancygradient.png
index 701df29e42..701df29e42 100644
--- a/doc/src/images/paintsystem-fancygradient.png
+++ b/src/gui/doc/images/paintsystem-fancygradient.png
Binary files differ
diff --git a/doc/src/images/paintsystem-gradients.png b/src/gui/doc/images/paintsystem-gradients.png
index 50b2ed3671..50b2ed3671 100644
--- a/doc/src/images/paintsystem-gradients.png
+++ b/src/gui/doc/images/paintsystem-gradients.png
Binary files differ
diff --git a/doc/src/images/paintsystem-icon.png b/src/gui/doc/images/paintsystem-icon.png
index 4623db0761..4623db0761 100644
--- a/doc/src/images/paintsystem-icon.png
+++ b/src/gui/doc/images/paintsystem-icon.png
Binary files differ
diff --git a/doc/src/images/paintsystem-movie.png b/src/gui/doc/images/paintsystem-movie.png
index 992ea9edd4..992ea9edd4 100644
--- a/doc/src/images/paintsystem-movie.png
+++ b/src/gui/doc/images/paintsystem-movie.png
Binary files differ
diff --git a/doc/src/images/paintsystem-painterpath.png b/src/gui/doc/images/paintsystem-painterpath.png
index f8154f2634..f8154f2634 100644
--- a/doc/src/images/paintsystem-painterpath.png
+++ b/src/gui/doc/images/paintsystem-painterpath.png
Binary files differ
diff --git a/doc/src/images/paintsystem-stylepainter.png b/src/gui/doc/images/paintsystem-stylepainter.png
index a67c6c5afc..a67c6c5afc 100644
--- a/doc/src/images/paintsystem-stylepainter.png
+++ b/src/gui/doc/images/paintsystem-stylepainter.png
Binary files differ
diff --git a/doc/src/images/paintsystem-svg.png b/src/gui/doc/images/paintsystem-svg.png
index ecc8ef8f97..ecc8ef8f97 100644
--- a/doc/src/images/paintsystem-svg.png
+++ b/src/gui/doc/images/paintsystem-svg.png
Binary files differ
diff --git a/doc/src/images/qcolor-cmyk.png b/src/gui/doc/images/qcolor-cmyk.png
index dfe8f67a31..dfe8f67a31 100644
--- a/doc/src/images/qcolor-cmyk.png
+++ b/src/gui/doc/images/qcolor-cmyk.png
Binary files differ
diff --git a/doc/src/images/qcolor-hsv.png b/src/gui/doc/images/qcolor-hsv.png
index 49fdf77222..49fdf77222 100644
--- a/doc/src/images/qcolor-hsv.png
+++ b/src/gui/doc/images/qcolor-hsv.png
Binary files differ
diff --git a/doc/src/images/qcolor-hue.png b/src/gui/doc/images/qcolor-hue.png
index 144b27c87a..144b27c87a 100644
--- a/doc/src/images/qcolor-hue.png
+++ b/src/gui/doc/images/qcolor-hue.png
Binary files differ
diff --git a/doc/src/images/qcolor-rgb.png b/src/gui/doc/images/qcolor-rgb.png
index fea4c63fd7..fea4c63fd7 100644
--- a/doc/src/images/qcolor-rgb.png
+++ b/src/gui/doc/images/qcolor-rgb.png
Binary files differ
diff --git a/doc/src/images/qcolor-saturation.png b/src/gui/doc/images/qcolor-saturation.png
index f28776aff5..f28776aff5 100644
--- a/doc/src/images/qcolor-saturation.png
+++ b/src/gui/doc/images/qcolor-saturation.png
Binary files differ
diff --git a/doc/src/images/qcolor-value.png b/src/gui/doc/images/qcolor-value.png
index 0e069123a9..0e069123a9 100644
--- a/doc/src/images/qcolor-value.png
+++ b/src/gui/doc/images/qcolor-value.png
Binary files differ
diff --git a/doc/src/images/qconicalgradient.png b/src/gui/doc/images/qconicalgradient.png
index 82603066fb..82603066fb 100644
--- a/doc/src/images/qconicalgradient.png
+++ b/src/gui/doc/images/qconicalgradient.png
Binary files differ
diff --git a/doc/src/images/qgradient-conical.png b/src/gui/doc/images/qgradient-conical.png
index cf06b70db6..cf06b70db6 100644
--- a/doc/src/images/qgradient-conical.png
+++ b/src/gui/doc/images/qgradient-conical.png
Binary files differ
diff --git a/doc/src/images/qgradient-linear.png b/src/gui/doc/images/qgradient-linear.png
index 5a5e880de7..5a5e880de7 100644
--- a/doc/src/images/qgradient-linear.png
+++ b/src/gui/doc/images/qgradient-linear.png
Binary files differ
diff --git a/doc/src/images/qgradient-radial.png b/src/gui/doc/images/qgradient-radial.png
index 95b9e9c3c9..95b9e9c3c9 100644
--- a/doc/src/images/qgradient-radial.png
+++ b/src/gui/doc/images/qgradient-radial.png
Binary files differ
diff --git a/doc/src/images/qimage-32bit_scaled.png b/src/gui/doc/images/qimage-32bit_scaled.png
index 6932327456..6932327456 100644
--- a/doc/src/images/qimage-32bit_scaled.png
+++ b/src/gui/doc/images/qimage-32bit_scaled.png
Binary files differ
diff --git a/doc/src/images/qimage-8bit_scaled.png b/src/gui/doc/images/qimage-8bit_scaled.png
index 7cbf0f1e29..7cbf0f1e29 100644
--- a/doc/src/images/qimage-8bit_scaled.png
+++ b/src/gui/doc/images/qimage-8bit_scaled.png
Binary files differ
diff --git a/src/gui/doc/images/qimage-scaling.png b/src/gui/doc/images/qimage-scaling.png
new file mode 100644
index 0000000000..fcd71448f0
--- /dev/null
+++ b/src/gui/doc/images/qimage-scaling.png
Binary files differ
diff --git a/doc/src/images/qlineargradient-pad.png b/src/gui/doc/images/qlineargradient-pad.png
index d77eb3dc3d..d77eb3dc3d 100644
--- a/doc/src/images/qlineargradient-pad.png
+++ b/src/gui/doc/images/qlineargradient-pad.png
Binary files differ
diff --git a/doc/src/images/qlineargradient-reflect.png b/src/gui/doc/images/qlineargradient-reflect.png
index dd12665051..dd12665051 100644
--- a/doc/src/images/qlineargradient-reflect.png
+++ b/src/gui/doc/images/qlineargradient-reflect.png
Binary files differ
diff --git a/doc/src/images/qlineargradient-repeat.png b/src/gui/doc/images/qlineargradient-repeat.png
index e38203c438..e38203c438 100644
--- a/doc/src/images/qlineargradient-repeat.png
+++ b/src/gui/doc/images/qlineargradient-repeat.png
Binary files differ
diff --git a/doc/src/images/qmatrix-combinedtransformation.png b/src/gui/doc/images/qmatrix-combinedtransformation.png
index f791bfa917..f791bfa917 100644
--- a/doc/src/images/qmatrix-combinedtransformation.png
+++ b/src/gui/doc/images/qmatrix-combinedtransformation.png
Binary files differ
diff --git a/doc/src/images/qmatrix-representation.png b/src/gui/doc/images/qmatrix-representation.png
index 2e3efd33fc..2e3efd33fc 100644
--- a/doc/src/images/qmatrix-representation.png
+++ b/src/gui/doc/images/qmatrix-representation.png
Binary files differ
diff --git a/doc/src/images/qmatrix-simpletransformation.png b/src/gui/doc/images/qmatrix-simpletransformation.png
index dde8f4bc58..dde8f4bc58 100644
--- a/doc/src/images/qmatrix-simpletransformation.png
+++ b/src/gui/doc/images/qmatrix-simpletransformation.png
Binary files differ
diff --git a/doc/src/images/qpainter-affinetransformations.png b/src/gui/doc/images/qpainter-affinetransformations.png
index fe2f9a072b..fe2f9a072b 100644
--- a/doc/src/images/qpainter-affinetransformations.png
+++ b/src/gui/doc/images/qpainter-affinetransformations.png
Binary files differ
diff --git a/doc/src/images/qpainter-arc.png b/src/gui/doc/images/qpainter-arc.png
index 8cb9cec96b..8cb9cec96b 100644
--- a/doc/src/images/qpainter-arc.png
+++ b/src/gui/doc/images/qpainter-arc.png
Binary files differ
diff --git a/doc/src/images/qpainter-basicdrawing.png b/src/gui/doc/images/qpainter-basicdrawing.png
index 3be48c8737..3be48c8737 100644
--- a/doc/src/images/qpainter-basicdrawing.png
+++ b/src/gui/doc/images/qpainter-basicdrawing.png
Binary files differ
diff --git a/doc/src/images/qpainter-chord.png b/src/gui/doc/images/qpainter-chord.png
index a8090861a0..a8090861a0 100644
--- a/doc/src/images/qpainter-chord.png
+++ b/src/gui/doc/images/qpainter-chord.png
Binary files differ
diff --git a/doc/src/images/qpainter-clock.png b/src/gui/doc/images/qpainter-clock.png
index 3634754161..3634754161 100644
--- a/doc/src/images/qpainter-clock.png
+++ b/src/gui/doc/images/qpainter-clock.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositiondemo.png b/src/gui/doc/images/qpainter-compositiondemo.png
index 40f62c75be..40f62c75be 100644
--- a/doc/src/images/qpainter-compositiondemo.png
+++ b/src/gui/doc/images/qpainter-compositiondemo.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositionmode1.png b/src/gui/doc/images/qpainter-compositionmode1.png
index 6753093521..6753093521 100644
--- a/doc/src/images/qpainter-compositionmode1.png
+++ b/src/gui/doc/images/qpainter-compositionmode1.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositionmode2.png b/src/gui/doc/images/qpainter-compositionmode2.png
index fc05afbd8c..fc05afbd8c 100644
--- a/doc/src/images/qpainter-compositionmode2.png
+++ b/src/gui/doc/images/qpainter-compositionmode2.png
Binary files differ
diff --git a/doc/src/images/qpainter-concentriccircles.png b/src/gui/doc/images/qpainter-concentriccircles.png
index 4889dcd76d..4889dcd76d 100644
--- a/doc/src/images/qpainter-concentriccircles.png
+++ b/src/gui/doc/images/qpainter-concentriccircles.png
Binary files differ
diff --git a/doc/src/images/qpainter-ellipse.png b/src/gui/doc/images/qpainter-ellipse.png
index e7e78c3dac..e7e78c3dac 100644
--- a/doc/src/images/qpainter-ellipse.png
+++ b/src/gui/doc/images/qpainter-ellipse.png
Binary files differ
diff --git a/doc/src/images/qpainter-gradients.png b/src/gui/doc/images/qpainter-gradients.png
index b7bc6a3270..b7bc6a3270 100644
--- a/doc/src/images/qpainter-gradients.png
+++ b/src/gui/doc/images/qpainter-gradients.png
Binary files differ
diff --git a/doc/src/images/qpainter-line.png b/src/gui/doc/images/qpainter-line.png
index 5f1cd97eff..5f1cd97eff 100644
--- a/doc/src/images/qpainter-line.png
+++ b/src/gui/doc/images/qpainter-line.png
Binary files differ
diff --git a/doc/src/images/qpainter-painterpaths.png b/src/gui/doc/images/qpainter-painterpaths.png
index 0762ca93f3..0762ca93f3 100644
--- a/doc/src/images/qpainter-painterpaths.png
+++ b/src/gui/doc/images/qpainter-painterpaths.png
Binary files differ
diff --git a/doc/src/images/qpainter-path.png b/src/gui/doc/images/qpainter-path.png
index 3570b16d7a..3570b16d7a 100644
--- a/doc/src/images/qpainter-path.png
+++ b/src/gui/doc/images/qpainter-path.png
Binary files differ
diff --git a/doc/src/images/qpainter-pathstroking.png b/src/gui/doc/images/qpainter-pathstroking.png
index ab73c6ae01..ab73c6ae01 100644
--- a/doc/src/images/qpainter-pathstroking.png
+++ b/src/gui/doc/images/qpainter-pathstroking.png
Binary files differ
diff --git a/doc/src/images/qpainter-pie.png b/src/gui/doc/images/qpainter-pie.png
index 78039013e0..78039013e0 100644
--- a/doc/src/images/qpainter-pie.png
+++ b/src/gui/doc/images/qpainter-pie.png
Binary files differ
diff --git a/doc/src/images/qpainter-polygon.png b/src/gui/doc/images/qpainter-polygon.png
index 3b6ea3c797..3b6ea3c797 100644
--- a/doc/src/images/qpainter-polygon.png
+++ b/src/gui/doc/images/qpainter-polygon.png
Binary files differ
diff --git a/doc/src/images/qpainter-rectangle.png b/src/gui/doc/images/qpainter-rectangle.png
index 05fdc88300..05fdc88300 100644
--- a/doc/src/images/qpainter-rectangle.png
+++ b/src/gui/doc/images/qpainter-rectangle.png
Binary files differ
diff --git a/doc/src/images/qpainter-rotation.png b/src/gui/doc/images/qpainter-rotation.png
index 6e24a0e040..6e24a0e040 100644
--- a/doc/src/images/qpainter-rotation.png
+++ b/src/gui/doc/images/qpainter-rotation.png
Binary files differ
diff --git a/doc/src/images/qpainter-roundrect.png b/src/gui/doc/images/qpainter-roundrect.png
index 876a277811..876a277811 100644
--- a/doc/src/images/qpainter-roundrect.png
+++ b/src/gui/doc/images/qpainter-roundrect.png
Binary files differ
diff --git a/doc/src/images/qpainter-scale.png b/src/gui/doc/images/qpainter-scale.png
index 4fe582eb13..4fe582eb13 100644
--- a/doc/src/images/qpainter-scale.png
+++ b/src/gui/doc/images/qpainter-scale.png
Binary files differ
diff --git a/doc/src/images/qpainter-text.png b/src/gui/doc/images/qpainter-text.png
index e95c965d7b..e95c965d7b 100644
--- a/doc/src/images/qpainter-text.png
+++ b/src/gui/doc/images/qpainter-text.png
Binary files differ
diff --git a/doc/src/images/qpainter-translation.png b/src/gui/doc/images/qpainter-translation.png
index b3716ca3f6..b3716ca3f6 100644
--- a/doc/src/images/qpainter-translation.png
+++ b/src/gui/doc/images/qpainter-translation.png
Binary files differ
diff --git a/doc/src/images/qpainter-vectordeformation.png b/src/gui/doc/images/qpainter-vectordeformation.png
index aff95f404c..aff95f404c 100644
--- a/doc/src/images/qpainter-vectordeformation.png
+++ b/src/gui/doc/images/qpainter-vectordeformation.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addellipse.png b/src/gui/doc/images/qpainterpath-addellipse.png
index 98f85174ef..98f85174ef 100644
--- a/doc/src/images/qpainterpath-addellipse.png
+++ b/src/gui/doc/images/qpainterpath-addellipse.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addpolygon.png b/src/gui/doc/images/qpainterpath-addpolygon.png
index d36bde8ada..d36bde8ada 100644
--- a/doc/src/images/qpainterpath-addpolygon.png
+++ b/src/gui/doc/images/qpainterpath-addpolygon.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addrectangle.png b/src/gui/doc/images/qpainterpath-addrectangle.png
index be9283e46d..be9283e46d 100644
--- a/doc/src/images/qpainterpath-addrectangle.png
+++ b/src/gui/doc/images/qpainterpath-addrectangle.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addtext.png b/src/gui/doc/images/qpainterpath-addtext.png
index 803a9581ac..803a9581ac 100644
--- a/doc/src/images/qpainterpath-addtext.png
+++ b/src/gui/doc/images/qpainterpath-addtext.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-arcto.png b/src/gui/doc/images/qpainterpath-arcto.png
index fe60b08d31..fe60b08d31 100644
--- a/doc/src/images/qpainterpath-arcto.png
+++ b/src/gui/doc/images/qpainterpath-arcto.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-construction.png b/src/gui/doc/images/qpainterpath-construction.png
index 4beeba1dd8..4beeba1dd8 100644
--- a/doc/src/images/qpainterpath-construction.png
+++ b/src/gui/doc/images/qpainterpath-construction.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-cubicto.png b/src/gui/doc/images/qpainterpath-cubicto.png
index 465bfeca29..465bfeca29 100644
--- a/doc/src/images/qpainterpath-cubicto.png
+++ b/src/gui/doc/images/qpainterpath-cubicto.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-demo.png b/src/gui/doc/images/qpainterpath-demo.png
index ceeed2f170..ceeed2f170 100644
--- a/doc/src/images/qpainterpath-demo.png
+++ b/src/gui/doc/images/qpainterpath-demo.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-example.png b/src/gui/doc/images/qpainterpath-example.png
index f2bd359aba..f2bd359aba 100644
--- a/doc/src/images/qpainterpath-example.png
+++ b/src/gui/doc/images/qpainterpath-example.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-bevel.png b/src/gui/doc/images/qpen-bevel.png
new file mode 100644
index 0000000000..8a30779e3b
--- /dev/null
+++ b/src/gui/doc/images/qpen-bevel.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-custom.png b/src/gui/doc/images/qpen-custom.png
new file mode 100644
index 0000000000..a2a038abe0
--- /dev/null
+++ b/src/gui/doc/images/qpen-custom.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-dash.png b/src/gui/doc/images/qpen-dash.png
new file mode 100644
index 0000000000..67082c3758
--- /dev/null
+++ b/src/gui/doc/images/qpen-dash.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-dashdot.png b/src/gui/doc/images/qpen-dashdot.png
new file mode 100644
index 0000000000..64b384660f
--- /dev/null
+++ b/src/gui/doc/images/qpen-dashdot.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-dashdotdot.png b/src/gui/doc/images/qpen-dashdotdot.png
new file mode 100644
index 0000000000..ff1b2e69cd
--- /dev/null
+++ b/src/gui/doc/images/qpen-dashdotdot.png
Binary files differ
diff --git a/doc/src/images/qpen-dashpattern.png b/src/gui/doc/images/qpen-dashpattern.png
index e33cf58d49..e33cf58d49 100644
--- a/doc/src/images/qpen-dashpattern.png
+++ b/src/gui/doc/images/qpen-dashpattern.png
Binary files differ
diff --git a/doc/src/images/qpen-demo.png b/src/gui/doc/images/qpen-demo.png
index 3ea5108802..3ea5108802 100644
--- a/doc/src/images/qpen-demo.png
+++ b/src/gui/doc/images/qpen-demo.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-dot.png b/src/gui/doc/images/qpen-dot.png
new file mode 100644
index 0000000000..54e81c9469
--- /dev/null
+++ b/src/gui/doc/images/qpen-dot.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-flat.png b/src/gui/doc/images/qpen-flat.png
new file mode 100644
index 0000000000..06e2195f73
--- /dev/null
+++ b/src/gui/doc/images/qpen-flat.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-miter.png b/src/gui/doc/images/qpen-miter.png
new file mode 100644
index 0000000000..025e003979
--- /dev/null
+++ b/src/gui/doc/images/qpen-miter.png
Binary files differ
diff --git a/doc/src/images/qpen-miterlimit.png b/src/gui/doc/images/qpen-miterlimit.png
index 17a90725fb..17a90725fb 100644
--- a/doc/src/images/qpen-miterlimit.png
+++ b/src/gui/doc/images/qpen-miterlimit.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-roundcap.png b/src/gui/doc/images/qpen-roundcap.png
new file mode 100644
index 0000000000..77b22b2bab
--- /dev/null
+++ b/src/gui/doc/images/qpen-roundcap.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-roundjoin.png b/src/gui/doc/images/qpen-roundjoin.png
new file mode 100644
index 0000000000..155e2aa8cc
--- /dev/null
+++ b/src/gui/doc/images/qpen-roundjoin.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-solid.png b/src/gui/doc/images/qpen-solid.png
new file mode 100644
index 0000000000..e042b18017
--- /dev/null
+++ b/src/gui/doc/images/qpen-solid.png
Binary files differ
diff --git a/src/gui/doc/images/qpen-square.png b/src/gui/doc/images/qpen-square.png
new file mode 100644
index 0000000000..ebc5d1e329
--- /dev/null
+++ b/src/gui/doc/images/qpen-square.png
Binary files differ
diff --git a/doc/src/images/qradialgradient-pad.png b/src/gui/doc/images/qradialgradient-pad.png
index 6c1a6cb268..6c1a6cb268 100644
--- a/doc/src/images/qradialgradient-pad.png
+++ b/src/gui/doc/images/qradialgradient-pad.png
Binary files differ
diff --git a/doc/src/images/qradialgradient-reflect.png b/src/gui/doc/images/qradialgradient-reflect.png
index 5122b180b1..5122b180b1 100644
--- a/doc/src/images/qradialgradient-reflect.png
+++ b/src/gui/doc/images/qradialgradient-reflect.png
Binary files differ
diff --git a/doc/src/images/qradialgradient-repeat.png b/src/gui/doc/images/qradialgradient-repeat.png
index aa639b7779..aa639b7779 100644
--- a/doc/src/images/qradialgradient-repeat.png
+++ b/src/gui/doc/images/qradialgradient-repeat.png
Binary files differ
diff --git a/src/gui/doc/images/qrect-diagram-zero.png b/src/gui/doc/images/qrect-diagram-zero.png
new file mode 100644
index 0000000000..90e3db0c41
--- /dev/null
+++ b/src/gui/doc/images/qrect-diagram-zero.png
Binary files differ
diff --git a/src/gui/doc/images/qrectf-diagram-one.png b/src/gui/doc/images/qrectf-diagram-one.png
new file mode 100644
index 0000000000..842289ce07
--- /dev/null
+++ b/src/gui/doc/images/qrectf-diagram-one.png
Binary files differ
diff --git a/src/gui/doc/images/qrectf-diagram-three.png b/src/gui/doc/images/qrectf-diagram-three.png
new file mode 100644
index 0000000000..e05106a7e1
--- /dev/null
+++ b/src/gui/doc/images/qrectf-diagram-three.png
Binary files differ
diff --git a/src/gui/doc/images/qrectf-diagram-two.png b/src/gui/doc/images/qrectf-diagram-two.png
new file mode 100644
index 0000000000..192d00df79
--- /dev/null
+++ b/src/gui/doc/images/qrectf-diagram-two.png
Binary files differ
diff --git a/doc/src/images/qstatustipevent-action.png b/src/gui/doc/images/qstatustipevent-action.png
index c5dcfd25f5..c5dcfd25f5 100644
--- a/doc/src/images/qstatustipevent-action.png
+++ b/src/gui/doc/images/qstatustipevent-action.png
Binary files differ
diff --git a/doc/src/images/qstatustipevent-widget.png b/src/gui/doc/images/qstatustipevent-widget.png
index 3cc0a1f01b..3cc0a1f01b 100644
--- a/doc/src/images/qstatustipevent-widget.png
+++ b/src/gui/doc/images/qstatustipevent-widget.png
Binary files differ
diff --git a/doc/src/images/qt-fillrule-oddeven.png b/src/gui/doc/images/qt-fillrule-oddeven.png
index f39d1056f5..f39d1056f5 100644
--- a/doc/src/images/qt-fillrule-oddeven.png
+++ b/src/gui/doc/images/qt-fillrule-oddeven.png
Binary files differ
diff --git a/doc/src/images/qt-fillrule-winding.png b/src/gui/doc/images/qt-fillrule-winding.png
index 8018248331..8018248331 100644
--- a/doc/src/images/qt-fillrule-winding.png
+++ b/src/gui/doc/images/qt-fillrule-winding.png
Binary files differ
diff --git a/doc/src/images/qtexttableformat-cell.png b/src/gui/doc/images/qtexttableformat-cell.png
index bbf85ffe46..bbf85ffe46 100644
--- a/doc/src/images/qtexttableformat-cell.png
+++ b/src/gui/doc/images/qtexttableformat-cell.png
Binary files differ
diff --git a/doc/src/images/qtransform-combinedtransformation.png b/src/gui/doc/images/qtransform-combinedtransformation.png
index df1e226746..df1e226746 100644
--- a/doc/src/images/qtransform-combinedtransformation.png
+++ b/src/gui/doc/images/qtransform-combinedtransformation.png
Binary files differ
diff --git a/doc/src/images/qtransform-combinedtransformation2.png b/src/gui/doc/images/qtransform-combinedtransformation2.png
index c037a0d565..c037a0d565 100644
--- a/doc/src/images/qtransform-combinedtransformation2.png
+++ b/src/gui/doc/images/qtransform-combinedtransformation2.png
Binary files differ
diff --git a/doc/src/images/qtransform-representation.png b/src/gui/doc/images/qtransform-representation.png
index 883d5dc487..883d5dc487 100644
--- a/doc/src/images/qtransform-representation.png
+++ b/src/gui/doc/images/qtransform-representation.png
Binary files differ
diff --git a/doc/src/images/qtransform-simpletransformation.png b/src/gui/doc/images/qtransform-simpletransformation.png
index 743e4e3e07..743e4e3e07 100644
--- a/doc/src/images/qtransform-simpletransformation.png
+++ b/src/gui/doc/images/qtransform-simpletransformation.png
Binary files differ
diff --git a/doc/src/images/texttable-merge.png b/src/gui/doc/images/texttable-merge.png
index 3b32239a42..3b32239a42 100644
--- a/doc/src/images/texttable-merge.png
+++ b/src/gui/doc/images/texttable-merge.png
Binary files differ
diff --git a/doc/src/images/texttable-split.png b/src/gui/doc/images/texttable-split.png
index 2fa17b85a3..2fa17b85a3 100644
--- a/doc/src/images/texttable-split.png
+++ b/src/gui/doc/images/texttable-split.png
Binary files differ
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
new file mode 100644
index 0000000000..85772bbc3e
--- /dev/null
+++ b/src/gui/doc/qtgui.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtGui
+description = Qt GUI Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtgui
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtGui
+
+qhp.QtGui.file = qtgui.qhp
+qhp.QtGui.namespace = org.qt-project.qtgui.500
+qhp.QtGui.virtualFolder = qdoc
+qhp.QtGui.indexTitle = Qt GUI Reference Documentation
+qhp.QtGui.indexRoot =
+
+qhp.QtGui.filterAttributes = qtgui 5.0.0 qtrefdoc
+qhp.QtGui.customFilters.Qt.name = Qtgui 5.0.0
+qhp.QtGui.customFilters.Qt.filterAttributes = qtgui 5.0.0
+qhp.QtGui.subprojects = classes overviews examples
+qhp.QtGui.subprojects.classes.title = Classes
+qhp.QtGui.subprojects.classes.indexTitle = Qt GUI's Classes
+qhp.QtGui.subprojects.classes.selectors = class fake:headerfile
+qhp.QtGui.subprojects.classes.sortPages = true
+qhp.QtGui.subprojects.overviews.title = Overviews
+qhp.QtGui.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtGui.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtGui.subprojects.examples.title = Qt GUI Examples
+qhp.QtGui.subprojects.examples.indexTitle = Qt GUI Examples
+qhp.QtGui.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qtgui
+tagfile = ../../../doc/qtgui/qtgui.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/doc/src/snippets/brush/brush.cpp b/src/gui/doc/snippets/brush/brush.cpp
index a92223ee93..a92223ee93 100644
--- a/doc/src/snippets/brush/brush.cpp
+++ b/src/gui/doc/snippets/brush/brush.cpp
diff --git a/doc/src/snippets/brush/gradientcreationsnippet.cpp b/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp
index 9ec8c3f07a..9ec8c3f07a 100644
--- a/doc/src/snippets/brush/gradientcreationsnippet.cpp
+++ b/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp
diff --git a/doc/src/snippets/code/doc_src_coordsys.cpp b/src/gui/doc/snippets/code/doc_src_coordsys.cpp
index b677d28a50..b677d28a50 100644
--- a/doc/src/snippets/code/doc_src_coordsys.cpp
+++ b/src/gui/doc/snippets/code/doc_src_coordsys.cpp
diff --git a/doc/src/snippets/code/doc_src_qtgui.pro b/src/gui/doc/snippets/code/doc_src_qtgui.pro
index 51bb6c74ff..51bb6c74ff 100644
--- a/doc/src/snippets/code/doc_src_qtgui.pro
+++ b/src/gui/doc/snippets/code/doc_src_qtgui.pro
diff --git a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp b/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp
index f12f55051e..f12f55051e 100644
--- a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
+++ b/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qimage.cpp b/src/gui/doc/snippets/code/src_gui_image_qimage.cpp
index 0c39e22eb6..0c39e22eb6 100644
--- a/doc/src/snippets/code/src_gui_image_qimage.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qimage.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qimagereader.cpp b/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp
index 92f528e6c0..92f528e6c0 100644
--- a/doc/src/snippets/code/src_gui_image_qimagereader.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp b/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp
index d0f11929d3..d0f11929d3 100644
--- a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qmovie.cpp b/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp
index 5d57d19204..5d57d19204 100644
--- a/doc/src/snippets/code/src_gui_image_qmovie.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qpixmap.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
index b8c0fcfbd5..b8c0fcfbd5 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmap.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp
index 9d42f6b330..9d42f6b330 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
index b32e8c3f39..b32e8c3f39 100644
--- a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qapplication_x11.cpp
index 1d37765e3c..1d37765e3c 100644
--- a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qapplication_x11.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp
index 4cf8f33c02..4cf8f33c02 100644
--- a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qevent.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp
index d8bdeebe84..d8bdeebe84 100644
--- a/doc/src/snippets/code/src_gui_kernel_qevent.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp
index 79dc967cf3..79dc967cf3 100644
--- a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp
index d761e31d3d..d761e31d3d 100644
--- a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qbrush.cpp b/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp
index 8678c48d62..8678c48d62 100644
--- a/doc/src/snippets/code/src_gui_painting_qbrush.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qcolor.cpp b/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp
index 8954fed604..8954fed604 100644
--- a/doc/src/snippets/code/src_gui_painting_qcolor.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp b/src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp
index d4e1b57b3c..d4e1b57b3c 100644
--- a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qpainter.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
index 8caffa46f4..8caffa46f4 100644
--- a/doc/src/snippets/code/src_gui_painting_qpainter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp
index b23f8cea23..b23f8cea23 100644
--- a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qpen.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp
index 4da729b88d..4da729b88d 100644
--- a/doc/src/snippets/code/src_gui_painting_qpen.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qregion.cpp b/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp
index 8f334c5695..8f334c5695 100644
--- a/doc/src/snippets/code/src_gui_painting_qregion.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp b/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp
index 63b9de19d1..63b9de19d1 100644
--- a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qtransform.cpp b/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp
index f54e0a07ca..f54e0a07ca 100644
--- a/doc/src/snippets/code/src_gui_painting_qtransform.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp
diff --git a/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp b/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
index 637527036f..637527036f 100644
--- a/doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp
+++ b/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
diff --git a/doc/src/snippets/code/src_gui_text_qfont.cpp b/src/gui/doc/snippets/code/src_gui_text_qfont.cpp
index fab550cbc7..fab550cbc7 100644
--- a/doc/src/snippets/code/src_gui_text_qfont.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qfont.cpp
diff --git a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp b/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp
index b864b4ddcc..b864b4ddcc 100644
--- a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp
diff --git a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
index 3fb6b35bb9..3fb6b35bb9 100644
--- a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
diff --git a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp
index 7954f66cbd..7954f66cbd 100644
--- a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp
diff --git a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp
index 23ebf8b2d2..23ebf8b2d2 100644
--- a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp
diff --git a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp
index 59ef46c422..59ef46c422 100644
--- a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp
diff --git a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp
index c8e1d2e010..c8e1d2e010 100644
--- a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp
diff --git a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp
index 0b4739841b..0b4739841b 100644
--- a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
+++ b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp b/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp
index 2f769c5860..2f769c5860 100644
--- a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp
+++ b/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp
diff --git a/doc/src/snippets/dragging/mainwindow.cpp b/src/gui/doc/snippets/dragging/mainwindow.cpp
index 57f1abc22d..57f1abc22d 100644
--- a/doc/src/snippets/dragging/mainwindow.cpp
+++ b/src/gui/doc/snippets/dragging/mainwindow.cpp
diff --git a/doc/src/snippets/droparea.cpp b/src/gui/doc/snippets/droparea.cpp
index 27d52d1b89..27d52d1b89 100644
--- a/doc/src/snippets/droparea.cpp
+++ b/src/gui/doc/snippets/droparea.cpp
diff --git a/doc/src/snippets/image/image.cpp b/src/gui/doc/snippets/image/image.cpp
index 1dfe41f8cd..1dfe41f8cd 100644
--- a/doc/src/snippets/image/image.cpp
+++ b/src/gui/doc/snippets/image/image.cpp
diff --git a/doc/src/snippets/image/supportedformat.cpp b/src/gui/doc/snippets/image/supportedformat.cpp
index 6d481908e8..6d481908e8 100644
--- a/doc/src/snippets/image/supportedformat.cpp
+++ b/src/gui/doc/snippets/image/supportedformat.cpp
diff --git a/doc/src/snippets/matrix/matrix.cpp b/src/gui/doc/snippets/matrix/matrix.cpp
index 2aa2606fc6..2aa2606fc6 100644
--- a/doc/src/snippets/matrix/matrix.cpp
+++ b/src/gui/doc/snippets/matrix/matrix.cpp
diff --git a/doc/src/snippets/picture/picture.cpp b/src/gui/doc/snippets/picture/picture.cpp
index 8de5e32323..8de5e32323 100644
--- a/doc/src/snippets/picture/picture.cpp
+++ b/src/gui/doc/snippets/picture/picture.cpp
diff --git a/doc/src/snippets/polygon/polygon.cpp b/src/gui/doc/snippets/polygon/polygon.cpp
index 432156f8e6..432156f8e6 100644
--- a/doc/src/snippets/polygon/polygon.cpp
+++ b/src/gui/doc/snippets/polygon/polygon.cpp
diff --git a/doc/src/snippets/qfontdatabase/main.cpp b/src/gui/doc/snippets/qfontdatabase/main.cpp
index 8e98e309a0..8e98e309a0 100644
--- a/doc/src/snippets/qfontdatabase/main.cpp
+++ b/src/gui/doc/snippets/qfontdatabase/main.cpp
diff --git a/doc/src/snippets/qstatustipevent/main.cpp b/src/gui/doc/snippets/qstatustipevent/main.cpp
index 9a1948f4e8..9a1948f4e8 100644
--- a/doc/src/snippets/qstatustipevent/main.cpp
+++ b/src/gui/doc/snippets/qstatustipevent/main.cpp
diff --git a/doc/src/snippets/separations/finalwidget.cpp b/src/gui/doc/snippets/separations/finalwidget.cpp
index 81a4aa1c42..81a4aa1c42 100644
--- a/doc/src/snippets/separations/finalwidget.cpp
+++ b/src/gui/doc/snippets/separations/finalwidget.cpp
diff --git a/doc/src/snippets/textblock-fragments/xmlwriter.cpp b/src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp
index cd9beadd00..cd9beadd00 100644
--- a/doc/src/snippets/textblock-fragments/xmlwriter.cpp
+++ b/src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp
diff --git a/doc/src/snippets/textdocument-css/main.cpp b/src/gui/doc/snippets/textdocument-css/main.cpp
index 55b8571224..55b8571224 100644
--- a/doc/src/snippets/textdocument-css/main.cpp
+++ b/src/gui/doc/snippets/textdocument-css/main.cpp
diff --git a/doc/src/snippets/textdocument-listitemstyles/main.cpp b/src/gui/doc/snippets/textdocument-listitemstyles/main.cpp
index 223ec22bae..223ec22bae 100644
--- a/doc/src/snippets/textdocument-listitemstyles/main.cpp
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/main.cpp
diff --git a/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp
index 029695eca3..029695eca3 100644
--- a/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-listitemstyles/mainwindow.h b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h
index fc5c6db2a7..fc5c6db2a7 100644
--- a/doc/src/snippets/textdocument-listitemstyles/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h
diff --git a/doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro b/src/gui/doc/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro
index 5da8d6e1a1..5da8d6e1a1 100644
--- a/doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro
diff --git a/doc/src/snippets/textdocument-lists/mainwindow.cpp b/src/gui/doc/snippets/textdocument-lists/mainwindow.cpp
index 7ae36b0ced..7ae36b0ced 100644
--- a/doc/src/snippets/textdocument-lists/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-lists/mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-resources/main.cpp b/src/gui/doc/snippets/textdocument-resources/main.cpp
index ed26793d78..ed26793d78 100644
--- a/doc/src/snippets/textdocument-resources/main.cpp
+++ b/src/gui/doc/snippets/textdocument-resources/main.cpp
diff --git a/doc/src/snippets/textdocument-resources/textdocument-resources.pro b/src/gui/doc/snippets/textdocument-resources/textdocument-resources.pro
index 16181f21cf..16181f21cf 100644
--- a/doc/src/snippets/textdocument-resources/textdocument-resources.pro
+++ b/src/gui/doc/snippets/textdocument-resources/textdocument-resources.pro
diff --git a/doc/src/snippets/textdocument-tables/mainwindow.cpp b/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
index 79e5f03df4..79e5f03df4 100644
--- a/doc/src/snippets/textdocument-tables/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-texttable/main.cpp b/src/gui/doc/snippets/textdocument-texttable/main.cpp
index ca5338533c..ca5338533c 100644
--- a/doc/src/snippets/textdocument-texttable/main.cpp
+++ b/src/gui/doc/snippets/textdocument-texttable/main.cpp
diff --git a/doc/src/snippets/textdocumentendsnippet.cpp b/src/gui/doc/snippets/textdocumentendsnippet.cpp
index caec20dc9b..caec20dc9b 100644
--- a/doc/src/snippets/textdocumentendsnippet.cpp
+++ b/src/gui/doc/snippets/textdocumentendsnippet.cpp
diff --git a/doc/src/snippets/transform/main.cpp b/src/gui/doc/snippets/transform/main.cpp
index d1c600828d..d1c600828d 100644
--- a/doc/src/snippets/transform/main.cpp
+++ b/src/gui/doc/snippets/transform/main.cpp
diff --git a/doc/src/gui/coordsys.qdoc b/src/gui/doc/src/coordsys.qdoc
index 655dbf7cf3..bfa046f7fb 100644
--- a/doc/src/gui/coordsys.qdoc
+++ b/src/gui/doc/src/coordsys.qdoc
@@ -97,10 +97,10 @@
\row
\li
- \snippet doc/src/snippets/code/doc_src_coordsys.cpp 0
+ \snippet code/doc_src_coordsys.cpp 0
\li
- \snippet doc/src/snippets/code/doc_src_coordsys.cpp 1
+ \snippet code/doc_src_coordsys.cpp 1
\endtable
When rendering with a pen with an even number of pixels, the
@@ -163,10 +163,10 @@
\row
\li
- \snippet doc/src/snippets/code/doc_src_coordsys.cpp 2
+ \snippet code/doc_src_coordsys.cpp 2
\li
- \snippet doc/src/snippets/code/doc_src_coordsys.cpp 3
+ \snippet code/doc_src_coordsys.cpp 3
\endtable
\section1 Transformations
@@ -238,7 +238,7 @@
\row
\li {2,1}
- \snippet examples/widgets/analogclock/analogclock.cpp 9
+ \snippet widgets/analogclock/analogclock.cpp 9
First, we set up the painter. We translate the coordinate system
so that point (0, 0) is in the widget's center, instead of being
@@ -253,7 +253,7 @@
See also the \l {Window-Viewport Conversion} section.
- \snippet examples/widgets/analogclock/analogclock.cpp 18
+ \snippet widgets/analogclock/analogclock.cpp 18
We draw the clock's hour hand by rotating the coordinate system
and calling QPainter::drawConvexPolygon(). Thank's to the
@@ -268,14 +268,14 @@
the code guarantees that the code that follows won't be disturbed
by the transformations we've used.
- \snippet examples/widgets/analogclock/analogclock.cpp 24
+ \snippet widgets/analogclock/analogclock.cpp 24
We do the same for the clock's minute hand, which is defined by
the four points (1, 0), (0, 1), (-1, 0), and (0, -40). These
coordinates specify a hand that is thinner and longer than the
minute hand.
- \snippet examples/widgets/analogclock/analogclock.cpp 27
+ \snippet widgets/analogclock/analogclock.cpp 27
Finally, we draw the clock face, which consists of twelve short
lines at 30-degree intervals. At the end of that, the painter is
@@ -319,7 +319,7 @@
-50) to (50, 50) with (0, 0) in the center by calling the
QPainter::setWindow() function:
- \snippet doc/src/snippets/code/doc_src_coordsys.cpp 4
+ \snippet code/doc_src_coordsys.cpp 4
Now, the logical coordinates (-50,-50) correspond to the paint
device's physical coordinates (0, 0). Independent of the paint
@@ -333,7 +333,7 @@
viewport and "window" maintain the same aspect ratio to prevent
deformation:
- \snippet doc/src/snippets/code/doc_src_coordsys.cpp 5
+ \snippet code/doc_src_coordsys.cpp 5
If we make the logical coordinate system a square, we should also
make the viewport a square using the QPainter::setViewport()
diff --git a/doc/src/gui/paintsystem.qdoc b/src/gui/doc/src/paintsystem.qdoc
index 4b33e4fed3..4b33e4fed3 100644
--- a/doc/src/gui/paintsystem.qdoc
+++ b/src/gui/doc/src/paintsystem.qdoc
diff --git a/doc/src/gui/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc
index bffe07889a..7e11aa5233 100644
--- a/doc/src/gui/qtgui.qdoc
+++ b/src/gui/doc/src/qtgui.qdoc
@@ -35,5 +35,5 @@
To include the definitions of both modules' classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtgui.pro 0
+ \snippet code/doc_src_qtgui.pro 0
*/
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 93c087cf64..2d21a7d7b2 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -23,6 +23,9 @@ testcocoon {
HEADERS += $$QT_SOURCE_TREE/src/gui/qtguiversion.h
+QMAKE_DOCS = $$PWD/doc/qtgui.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
include(accessible/accessible.pri)
include(kernel/kernel.pri)
include(image/image.pri)
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 91b21227df..89060cfbb4 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -441,7 +441,7 @@ bool QImageData::checkForAlphaPixels() const
\row
\li \inlineimage qimage-32bit_scaled.png
\li
- \snippet doc/src/snippets/code/src_gui_image_qimage.cpp 0
+ \snippet code/src_gui_image_qimage.cpp 0
\endtable
In case of a 8-bit and monchrome images, the pixel value is only
@@ -462,7 +462,7 @@ bool QImageData::checkForAlphaPixels() const
\row
\li \inlineimage qimage-8bit_scaled.png
\li
- \snippet doc/src/snippets/code/src_gui_image_qimage.cpp 1
+ \snippet code/src_gui_image_qimage.cpp 1
\endtable
QImage also provide the scanLine() function which returns a
@@ -949,7 +949,7 @@ extern bool qt_read_xpm_image_or_array(QIODevice *device, const char * const *so
Note that it's possible to squeeze the XPM variable a little bit
by using an unusual declaration:
- \snippet doc/src/snippets/code/src_gui_image_qimage.cpp 2
+ \snippet code/src_gui_image_qimage.cpp 2
The extra \c const makes the entire definition read-only, which is
slightly more efficient (e.g., when the code is in a shared
@@ -4478,7 +4478,7 @@ bool QImage::save(const QString &fileName, const char *format, int quality) cons
This can, for example, be used to save an image directly into a
QByteArray:
- \snippet doc/src/snippets/image/image.cpp 0
+ \snippet image/image.cpp 0
*/
bool QImage::save(QIODevice* device, const char* format, int quality) const
@@ -4801,7 +4801,7 @@ QString QImage::text(const QString &key) const
if a specific image or format supports embedding text
by using QImageWriter::supportsOption(). We give an example:
- \snippet doc/src/snippets/image/supportedformat.cpp 0
+ \snippet image/supportedformat.cpp 0
You can use QImageWriter::supportedImageFormats() to find out
which image formats are available to you.
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 02c01f9866..4cda7304ac 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -664,7 +664,7 @@ QImageReader::~QImageReader()
Sets the format QImageReader will use when reading images, to \a
format. \a format is a case insensitive text string. Example:
- \snippet doc/src/snippets/code/src_gui_image_qimagereader.cpp 0
+ \snippet code/src_gui_image_qimagereader.cpp 0
You can call supportedImageFormats() for the full list of formats
QImageReader supports.
@@ -682,7 +682,7 @@ void QImageReader::setFormat(const QByteArray &format)
You can call this function after assigning a device to the
reader to determine the format of the device. For example:
- \snippet doc/src/snippets/code/src_gui_image_qimagereader.cpp 1
+ \snippet code/src_gui_image_qimagereader.cpp 1
If the reader cannot read any image from the device (e.g., there is no
image there, or the image has already been read), or if the format is
@@ -1142,7 +1142,7 @@ QImage QImageReader::read()
which always constructs a new image; especially when reading several
images with the same format and size.
- \snippet doc/src/snippets/code/src_gui_image_qimagereader.cpp 2
+ \snippet code/src_gui_image_qimagereader.cpp 2
For image formats that support animation, calling read() repeatedly will
return the next frame. When all frames have been read, a null image will
@@ -1382,7 +1382,7 @@ QString QImageReader::errorString() const
(see text()), and the BMP format allows you to determine the image's size
without loading the whole image into memory (see size()).
- \snippet doc/src/snippets/code/src_gui_image_qimagereader.cpp 3
+ \snippet code/src_gui_image_qimagereader.cpp 3
\sa QImageWriter::supportsOption()
*/
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index 43a93d75c2..c1b7a6459a 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -330,7 +330,7 @@ QImageWriter::~QImageWriter()
Sets the format QImageWriter will use when writing images, to \a
format. \a format is a case insensitive text string. Example:
- \snippet doc/src/snippets/code/src_gui_image_qimagewriter.cpp 0
+ \snippet code/src_gui_image_qimagewriter.cpp 0
You can call supportedImageFormats() for the full list of formats
QImageWriter supports.
@@ -529,7 +529,7 @@ QString QImageWriter::description() const
\a text. This is useful for storing copyright information
or other information about the image. Example:
- \snippet doc/src/snippets/code/src_gui_image_qimagewriter.cpp 1
+ \snippet code/src_gui_image_qimagewriter.cpp 1
If you want to store a single block of data
(e.g., a comment), you can pass an empty key, or use
@@ -636,7 +636,7 @@ QString QImageWriter::errorString() const
example, the PNG format allows you to embed text into the image's metadata
(see text()).
- \snippet doc/src/snippets/code/src_gui_image_qimagewriter.cpp 2
+ \snippet code/src_gui_image_qimagewriter.cpp 2
Options can be tested after the writer has been associated with a format.
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index 8dfcf57dfd..e1ddcf1a0c 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -61,7 +61,7 @@
To display the movie in your application, you can pass your QMovie object
to QLabel::setMovie(). Example:
- \snippet doc/src/snippets/code/src_gui_image_qmovie.cpp 0
+ \snippet code/src_gui_image_qmovie.cpp 0
Whenever a new frame is available in the movie, QMovie will emit
updated(). If the size of the frame changes, resized() is emitted. You can
@@ -883,7 +883,7 @@ void QMovie::setPaused(bool paused)
The default speed is 100%.
Example:
- \snippet doc/src/snippets/code/src_gui_image_qmovie.cpp 1
+ \snippet code/src_gui_image_qmovie.cpp 1
*/
void QMovie::setSpeed(int percentSpeed)
{
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 0544d3d431..34ca077e5b 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -92,13 +92,13 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
depending on the window system.
Example of how to record a picture:
- \snippet doc/src/snippets/picture/picture.cpp 0
+ \snippet picture/picture.cpp 0
Note that the list of painter commands is reset on each call to
the QPainter::begin() function.
Example of how to replay a picture:
- \snippet doc/src/snippets/picture/picture.cpp 1
+ \snippet picture/picture.cpp 1
Pictures can also be drawn using play(). Some basic data about a
picture is available, for example, size(), isNull() and
@@ -1226,7 +1226,7 @@ static QStringList qToStringList(const QList<QByteArray> arr)
Note that if you want to iterate over the list, you should iterate
over a copy, e.g.
- \snippet doc/src/snippets/picture/picture.cpp 2
+ \snippet picture/picture.cpp 2
\sa outputFormatList() inputFormats() QPictureIO
*/
@@ -1244,7 +1244,7 @@ QStringList QPicture::inputFormatList()
Note that if you want to iterate over the list, you should iterate
over a copy, e.g.
- \snippet doc/src/snippets/picture/picture.cpp 3
+ \snippet picture/picture.cpp 3
\sa inputFormatList() outputFormats() QPictureIO
*/
@@ -1470,11 +1470,11 @@ static QPictureHandler *get_picture_handler(const char *format)
both are null, the QPictureIO object is valid but useless.
Example:
- \snippet doc/src/snippets/picture/picture.cpp 6
+ \snippet picture/picture.cpp 6
\codeline
- \snippet doc/src/snippets/picture/picture.cpp 7
+ \snippet picture/picture.cpp 7
\codeline
- \snippet doc/src/snippets/picture/picture.cpp 8
+ \snippet picture/picture.cpp 8
Before the regular expression test, all the 0 bytes in the file header are
converted to 1 bytes. This is done because when Qt was ASCII-based, QRegExp
@@ -1839,7 +1839,7 @@ QList<QByteArray> QPictureIO::outputFormats()
Example:
- \snippet doc/src/snippets/picture/picture.cpp 4
+ \snippet picture/picture.cpp 4
\sa setIODevice() setFileName() setFormat() write() QPixmap::load()
*/
@@ -1908,7 +1908,7 @@ bool QPictureIO::read()
The picture will be written using the specified picture format.
Example:
- \snippet doc/src/snippets/picture/picture.cpp 5
+ \snippet picture/picture.cpp 5
\sa setIODevice() setFileName() setFormat() read() QPixmap::save()
*/
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 248caf7f3d..4cdf61138c 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -241,7 +241,7 @@ QPixmap::QPixmap(const QPixmap &pixmap)
Note that it's possible to squeeze the XPM variable a little bit
by using an unusual declaration:
- \snippet doc/src/snippets/code/src_gui_image_qpixmap.cpp 0
+ \snippet code/src_gui_image_qpixmap.cpp 0
The extra \c const makes the entire definition read-only, which is
slightly more efficient (for example, when the code is in a shared
@@ -334,7 +334,7 @@ QPixmap QPixmap::copy(const QRect &rect) const
region is left unchanged. You can optionally pass a pointer to an empty
QRegion to get the region that is \a exposed by the scroll operation.
- \snippet doc/src/snippets/code/src_gui_image_qpixmap.cpp 2
+ \snippet code/src_gui_image_qpixmap.cpp 2
You cannot scroll while there is an active painter on the pixmap.
@@ -651,7 +651,7 @@ void QPixmap::setMask(const QBitmap &mask)
The mask may not be perfect but it should be reasonable, so you
can do things such as the following:
- \snippet doc/src/snippets/code/src_gui_image_qpixmap.cpp 1
+ \snippet code/src_gui_image_qpixmap.cpp 1
This function is slow because it involves converting to/from a
QImage, and non-trivial computations.
@@ -810,7 +810,7 @@ bool QPixmap::save(const QString &fileName, const char *format, int quality) con
specified image file \a format and \a quality factor. This can be
used, for example, to save a pixmap directly into a QByteArray:
- \snippet doc/src/snippets/image/image.cpp 1
+ \snippet image/image.cpp 1
*/
bool QPixmap::save(QIODevice* device, const char* format, int quality) const
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 7769c45b2e..b0e5b7e1e3 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -472,7 +472,7 @@ QPixmapCacheEntry::~QPixmapCacheEntry()
bool find(const QString&, QPixmap*) instead.
Example:
- \snippet doc/src/snippets/code/src_gui_image_qpixmapcache.cpp 0
+ \snippet code/src_gui_image_qpixmapcache.cpp 0
*/
QPixmap *QPixmapCache::find(const QString &key)
@@ -500,7 +500,7 @@ bool QPixmapCache::find(const QString &key, QPixmap& pixmap)
\since 4.6
Example:
- \snippet doc/src/snippets/code/src_gui_image_qpixmapcache.cpp 1
+ \snippet code/src_gui_image_qpixmapcache.cpp 1
*/
bool QPixmapCache::find(const QString &key, QPixmap* pixmap)
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index ef5e4f9c18..90fd63ee62 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE
as QApplication::clipboard().
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qclipboard.cpp 0
+ \snippet code/src_gui_kernel_qclipboard.cpp 0
QClipboard features some convenience functions to access common
data types: setText() allows the exchange of Unicode text and
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
A typical example of the use of these functions follows:
- \snippet doc/src/snippets/droparea.cpp 0
+ \snippet droparea.cpp 0
\section1 Notes for X11 Users
@@ -366,7 +366,7 @@ QImage QClipboard::image(Mode mode) const
This is shorthand for:
- \snippet doc/src/snippets/code/src_gui_kernel_qclipboard.cpp 1
+ \snippet code/src_gui_kernel_qclipboard.cpp 1
\sa image(), setPixmap() setMimeData()
*/
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp
index 40015c8706..e20401c67b 100644
--- a/src/gui/kernel/qdrag.cpp
+++ b/src/gui/kernel/qdrag.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
QMimeData object. This is specified with the setMimeData() function in the
following way:
- \snippet doc/src/snippets/dragging/mainwindow.cpp 1
+ \snippet dragging/mainwindow.cpp 1
Note that setMimeData() assigns ownership of the QMimeData object to the
QDrag object. The QDrag must be constructed on the heap with a parent QObject
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
that the cursor's hot spot points to the center of its bottom
edge:
- \snippet doc/src/snippets/separations/finalwidget.cpp 2
+ \snippet separations/finalwidget.cpp 2
\note On X11, the pixmap may not be able to keep up with the mouse
movements if the hot spot causes the pixmap to be displayed
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 266eb143e5..eeedd32fd9 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -582,7 +582,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qevent.cpp 0
+ \snippet code/src_gui_kernel_qevent.cpp 0
*/
/*!
@@ -604,7 +604,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qevent.cpp 0
+ \snippet code/src_gui_kernel_qevent.cpp 0
*/
/*!
@@ -2557,9 +2557,9 @@ QHelpEvent::~QHelpEvent()
\table 100%
\row
\li
- \snippet doc/src/snippets/qstatustipevent/main.cpp 1
+ \snippet qstatustipevent/main.cpp 1
\dots
- \snippet doc/src/snippets/qstatustipevent/main.cpp 3
+ \snippet qstatustipevent/main.cpp 3
\li
\image qstatustipevent-widget.png Widget with status tip.
\endtable
@@ -2570,10 +2570,10 @@ QHelpEvent::~QHelpEvent()
\table 100%
\row
\li
- \snippet doc/src/snippets/qstatustipevent/main.cpp 0
- \snippet doc/src/snippets/qstatustipevent/main.cpp 2
+ \snippet qstatustipevent/main.cpp 0
+ \snippet qstatustipevent/main.cpp 2
\dots
- \snippet doc/src/snippets/qstatustipevent/main.cpp 3
+ \snippet qstatustipevent/main.cpp 3
\li
\image qstatustipevent-action.png Action with status tip.
\endtable
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 2efc29bddf..bdffb985f7 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2098,7 +2098,7 @@ static inline void applyCursor(const QList<QWindow *> &l, const QCursor &c)
restoreOverrideCursor(), otherwise the stack will never be emptied.
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp 0
+ \snippet code/src_gui_kernel_qapplication_x11.cpp 0
\sa overrideCursor(), restoreOverrideCursor(), changeOverrideCursor(),
QWidget::setCursor()
@@ -2154,7 +2154,7 @@ QStyleHints *QGuiApplication::styleHints()
This function must be called before creating the QGuiApplication object, like
this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 6
+ \snippet code/src_gui_kernel_qapplication.cpp 6
\sa desktopSettingsAware()
*/
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 14e434f475..f94c6d541e 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -177,16 +177,16 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
more modifiers, such as Qt::SHIFT, Qt::CTRL, Qt::ALT and Qt::META.
\endlist
- For example, \gui{Ctrl P} might be a sequence used as a shortcut for
+ For example, \uicontrol{Ctrl P} might be a sequence used as a shortcut for
printing a document, and can be specified in any of the following
ways:
- \snippet doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp 0
+ \snippet code/src_gui_kernel_qkeysequence.cpp 0
Note that, for letters, the case used in the specification string
does not matter. In the above examples, the user does not need to
- hold down the \key{Shift} key to activate a shortcut specified
- with "Ctrl+P". However, for other keys, the use of \key{Shift} as
+ hold down the \uicontrol{Shift} key to activate a shortcut specified
+ with "Ctrl+P". However, for other keys, the use of \uicontrol{Shift} as
an unspecified extra modifier key can lead to confusion for users
of an application whose keyboards have different layouts to those
used by the developers. See the \l{Keyboard Layout Issues} section
@@ -207,9 +207,9 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
as Qt::Key_A.
\b{Note:} On Mac OS X, references to "Ctrl", Qt::CTRL, Qt::Control
- and Qt::ControlModifier correspond to the \key Command keys on the
+ and Qt::ControlModifier correspond to the \uicontrol Command keys on the
Macintosh keyboard, and references to "Meta", Qt::META, Qt::Meta and
- Qt::MetaModifier correspond to the \key Control keys. Developers on
+ Qt::MetaModifier correspond to the \uicontrol Control keys. Developers on
Mac OS X can use the same shortcut descriptions across all platforms,
and their applications will automatically work as expected on Mac OS X.
@@ -220,9 +220,9 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
setting up actions in a typical application. The table below shows
some common key sequences that are often used for these standard
shortcuts by applications on four widely-used platforms. Note
- that on Mac OS X, the \key Ctrl value corresponds to the \key
- Command keys on the Macintosh keyboard, and the \key Meta value
- corresponds to the \key Control keys.
+ that on Mac OS X, the \uicontrol Ctrl value corresponds to the \uicontrol
+ Command keys on the Macintosh keyboard, and the \uicontrol Meta value
+ corresponds to the \uicontrol Control keys.
\table
\header \li StandardKey \li Windows \li Mac OS X \li KDE \li GNOME
@@ -303,23 +303,23 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
Many key sequence specifications are chosen by developers based on the
layout of certain types of keyboard, rather than choosing keys that
- represent the first letter of an action's name, such as \key{Ctrl S}
- ("Ctrl+S") or \key{Ctrl C} ("Ctrl+C").
+ represent the first letter of an action's name, such as \uicontrol{Ctrl S}
+ ("Ctrl+S") or \uicontrol{Ctrl C} ("Ctrl+C").
Additionally, because certain symbols can only be entered with the
help of modifier keys on certain keyboard layouts, key sequences intended
for use with one keyboard layout may map to a different key, map to no
keys at all, or require an additional modifier key to be used on
different keyboard layouts.
- For example, the shortcuts, \key{Ctrl plus} and \key{Ctrl minus}, are often
+ For example, the shortcuts, \uicontrol{Ctrl plus} and \uicontrol{Ctrl minus}, are often
used as shortcuts for zoom operations in graphics applications, and these
may be specified as "Ctrl++" and "Ctrl+-" respectively. However, the way
these shortcuts are specified and interpreted depends on the keyboard layout.
- Users of Norwegian keyboards will note that the \key{+} and \key{-} keys
+ Users of Norwegian keyboards will note that the \uicontrol{+} and \uicontrol{-} keys
are not adjacent on the keyboard, but will still be able to activate both
- shortcuts without needing to press the \key{Shift} key. However, users
- with British keyboards will need to hold down the \key{Shift} key
- to enter the \key{+} symbol, making the shortcut effectively the same as
+ shortcuts without needing to press the \uicontrol{Shift} key. However, users
+ with British keyboards will need to hold down the \uicontrol{Shift} key
+ to enter the \uicontrol{+} symbol, making the shortcut effectively the same as
"Ctrl+Shift+=".
Although some developers might resort to fully specifying all the modifiers
@@ -328,9 +328,9 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
For example, a developer using a British keyboard may decide to specify
"Ctrl+Shift+=" as the key sequence in order to create a shortcut that
- coincidentally behaves in the same way as \key{Ctrl plus}. However, the
- \key{=} key needs to be accessed using the \key{Shift} key on Norwegian
- keyboard, making the required shortcut effectively \key{Ctrl Shift Shift =}
+ coincidentally behaves in the same way as \uicontrol{Ctrl plus}. However, the
+ \uicontrol{=} key needs to be accessed using the \uicontrol{Shift} key on Norwegian
+ keyboard, making the required shortcut effectively \uicontrol{Ctrl Shift Shift =}
(an impossible key combination).
As a result, both human-readable strings and hard-coded key codes
@@ -352,10 +352,10 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
key codes, can be created by using the multiple argument constructor,
or by passing a human-readable string of comma-separated key sequences.
- For example, the key sequence, \key{Ctrl X} followed by \key{Ctrl C}, can
+ For example, the key sequence, \uicontrol{Ctrl X} followed by \uicontrol{Ctrl C}, can
be specified using either of the following ways:
- \snippet doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp 1
+ \snippet code/src_gui_kernel_qkeysequence.cpp 1
\warning A QApplication instance must have been constructed before a
QKeySequence is created; otherwise, your application may crash.
@@ -937,7 +937,7 @@ QKeySequence::QKeySequence()
\endlink(), so that shortcut keys can be replaced in
translations:
- \snippet doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp 2
+ \snippet code/src_gui_kernel_qkeysequence.cpp 2
Note the "File|Open" translator comment. It is by no means
necessary, but it provides some context for the human translator.
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index ab62ec0992..cb18b0d22f 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -499,7 +499,7 @@ static void qt_palette_from_color(QPalette &pal, const QColor &button)
and the QTextDocument::setDefaultStyleSheet() function to alter
the appearance of links. For example:
- \snippet doc/src/snippets/textdocument-css/main.cpp 0
+ \snippet textdocument-css/main.cpp 0
\value NoRole No role; this special role is often used to indicate that a
role has not been assigned.
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index a750082219..267f528ca0 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -528,7 +528,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e)
/*! \internal
Clears \a seq to an empty QKeySequence.
Same as doing (the slower)
- \snippet doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp 0
+ \snippet code/src_gui_kernel_qshortcutmap.cpp 0
*/
void QShortcutMap::clearSequence(QVector<QKeySequence> &ksl)
{
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index c0899e5a41..e9973be2ab 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
program is activated in the current QOpenGLContext by calling
QOpenGLShaderProgram::bind():
- \snippet doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp 0
+ \snippet code/src_gui_qopenglshaderprogram.cpp 0
\section1 Writing portable shaders
@@ -99,12 +99,12 @@ QT_BEGIN_NAMESPACE
\section1 Simple shader example
- \snippet doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp 1
+ \snippet code/src_gui_qopenglshaderprogram.cpp 1
With the above shader program active, we can draw a green triangle
as follows:
- \snippet doc/src/snippets/code/src_gui_qopenglshaderprogram.cpp 2
+ \snippet code/src_gui_qopenglshaderprogram.cpp 2
\section1 Binary shaders and programs
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index 2f0fb9f96c..6ee28a42b9 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -292,7 +292,7 @@ struct QBrushDataPointerDeleter
gradients: QLinearGradient, QConicalGradient, and QRadialGradient
- all of which inherit QGradient.
- \snippet doc/src/snippets/brush/gradientcreationsnippet.cpp 0
+ \snippet brush/gradientcreationsnippet.cpp 0
The texture() defines the pixmap used when the current style is
Qt::TexturePattern. You can create a brush with a texture by
@@ -323,7 +323,7 @@ struct QBrushDataPointerDeleter
QPainter's \l {QPen}{pen} combined with Qt::PenStyle and
Qt::GlobalColor:
- \snippet doc/src/snippets/code/src_gui_painting_qbrush.cpp 0
+ \snippet code/src_gui_painting_qbrush.cpp 0
Note that, by default, QPainter renders the outline (using the
currently set pen) when drawing shapes. Use \l {Qt::NoPen}{\c
@@ -1214,13 +1214,13 @@ QDataStream &operator>>(QDataStream &s, QBrush &b)
A diagonal linear gradient from black at (100, 100) to white at
(200, 200) could be specified like this:
- \snippet doc/src/snippets/brush/brush.cpp 0
+ \snippet brush/brush.cpp 0
A gradient can have an arbitrary number of stop points. The
following would create a radial gradient starting with
red in the center, blue and then green on the edges:
- \snippet doc/src/snippets/brush/brush.cpp 1
+ \snippet brush/brush.cpp 1
It is possible to repeat or reflect the gradient outside its area
by specifiying the \l {QGradient::Spread}{spread method} using the
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 75122571d6..81f5a7438a 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -148,7 +148,7 @@ QT_BEGIN_NAMESPACE
represents a fully transparent color, while 255 represents a fully
opaque color. For example:
- \snippet doc/src/snippets/code/src_gui_painting_qcolor.cpp 0
+ \snippet code/src_gui_painting_qcolor.cpp 0
The code above produces the following output:
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index c26d7e5d98..afefb1787c 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -114,7 +114,7 @@ QT_BEGIN_NAMESPACE
\row
\li \inlineimage qmatrix-simpletransformation.png
\li
- \snippet doc/src/snippets/matrix/matrix.cpp 0
+ \snippet matrix/matrix.cpp 0
\endtable
Although these functions are very convenient, it can be more
@@ -126,7 +126,7 @@ QT_BEGIN_NAMESPACE
\row
\li \inlineimage qmatrix-combinedtransformation.png
\li
- \snippet doc/src/snippets/matrix/matrix.cpp 1
+ \snippet matrix/matrix.cpp 1
\endtable
\section1 Basic Matrix Operations
@@ -142,7 +142,7 @@ QT_BEGIN_NAMESPACE
QMatrix transforms a point in the plane to another point using the
following formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qmatrix.cpp 0
+ \snippet code/src_gui_painting_qmatrix.cpp 0
The point \e (x, y) is the original point, and \e (x', y') is the
transformed point. \e (x', y') can be transformed back to \e (x,
@@ -174,7 +174,7 @@ QT_BEGIN_NAMESPACE
\row
\li \inlineimage qmatrix-combinedtransformation.png
\li
- \snippet doc/src/snippets/matrix/matrix.cpp 2
+ \snippet matrix/matrix.cpp 2
\endtable
\sa QPainter, QTransform, {Coordinate System},
@@ -342,7 +342,7 @@ void QMatrix::setMatrix(qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qr
The coordinates are transformed using the following formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qmatrix.cpp 1
+ \snippet code/src_gui_painting_qmatrix.cpp 1
The point (x, y) is the original point, and (x', y') is the
transformed point.
@@ -427,7 +427,7 @@ QRect QMatrix::mapRect(const QRect &rect) const
The rectangle's coordinates are transformed using the following
formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qmatrix.cpp 2
+ \snippet code/src_gui_painting_qmatrix.cpp 2
If rotation or shearing has been specified, this function returns
the \e bounding rectangle. To retrieve the exact region the given
@@ -741,7 +741,7 @@ QPainterPath QMatrix::map(const QPainterPath &path) const
The rectangle's coordinates are transformed using the following
formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qmatrix.cpp 3
+ \snippet code/src_gui_painting_qmatrix.cpp 3
Polygons and rectangles behave slightly differently when
transformed (due to integer rounding), so
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 68e60ed548..e622fe46a7 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -941,7 +941,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
painter. Then draw. Remember to destroy the QPainter object after
drawing. For example:
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 0
+ \snippet code/src_gui_painting_qpainter.cpp 0
The core functionality of QPainter is drawing, but the class also
provide several functions that allows you to customize QPainter's
@@ -1446,10 +1446,10 @@ QPainter::QPainter()
automatically calls end().
Here's an example using begin() and end():
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 1
+ \snippet code/src_gui_painting_qpainter.cpp 1
The same example using this constructor:
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 2
+ \snippet code/src_gui_painting_qpainter.cpp 2
Since the constructor cannot provide feedback when the initialization
of the painter failed you should rather use begin() and end() to paint
@@ -1667,7 +1667,7 @@ void QPainter::restore()
The errors that can occur are serious problems, such as these:
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 3
+ \snippet code/src_gui_painting_qpainter.cpp 3
Note that most of the time, you can use one of the constructors
instead of begin(), and that end() is automatically done at
@@ -1956,7 +1956,7 @@ QPaintEngine *QPainter::paintEngine() const
default state by endNativePainting(). Here is an example that shows
intermixing of painter commands and raw OpenGL commands:
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21
+ \snippet code/src_gui_painting_qpainter.cpp 21
\sa endNativePainting()
*/
@@ -2871,7 +2871,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
They operate on the painter's worldMatrix() and are implemented like this:
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 4
+ \snippet code/src_gui_painting_qpainter.cpp 4
Note that when using setWorldMatrix() function you should always have
\a combine be true when you are drawing into a QPicture. Otherwise
@@ -3340,7 +3340,7 @@ void QPainter::fillPath(const QPainterPath &path, const QBrush &brush)
\row
\li \inlineimage qpainter-path.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 5
+ \snippet code/src_gui_painting_qpainter.cpp 5
\endtable
\sa {painting/painterpaths}{the Painter Paths
@@ -3385,7 +3385,7 @@ void QPainter::drawPath(const QPainterPath &path)
\row
\li \inlineimage qpainter-line.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 6
+ \snippet code/src_gui_painting_qpainter.cpp 6
\endtable
\sa drawLines(), drawPolyline(), {Coordinate System}
@@ -3432,7 +3432,7 @@ void QPainter::drawPath(const QPainterPath &path)
\row
\li \inlineimage qpainter-rectangle.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 7
+ \snippet code/src_gui_painting_qpainter.cpp 7
\endtable
\sa drawRects(), drawPolygon(), {Coordinate System}
@@ -4101,7 +4101,7 @@ const QFont &QPainter::font() const
\row
\li \inlineimage qpainter-roundrect.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 8
+ \snippet code/src_gui_painting_qpainter.cpp 8
\endtable
\sa drawRect(), QPen
@@ -4201,7 +4201,7 @@ void QPainter::drawRoundRect(const QRectF &r, int xRnd, int yRnd)
\row
\li \inlineimage qpainter-ellipse.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 9
+ \snippet code/src_gui_painting_qpainter.cpp 9
\endtable
\sa drawPie(), {Coordinate System}
@@ -4327,7 +4327,7 @@ void QPainter::drawEllipse(const QRect &r)
\row
\li \inlineimage qpainter-arc.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 10
+ \snippet code/src_gui_painting_qpainter.cpp 10
\endtable
\sa drawPie(), drawChord(), {Coordinate System}
@@ -4391,7 +4391,7 @@ void QPainter::drawArc(const QRectF &r, int a, int alen)
\row
\li \inlineimage qpainter-pie.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 11
+ \snippet code/src_gui_painting_qpainter.cpp 11
\endtable
\sa drawEllipse(), drawChord(), {Coordinate System}
@@ -4460,7 +4460,7 @@ void QPainter::drawPie(const QRectF &r, int a, int alen)
\row
\li \inlineimage qpainter-chord.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 12
+ \snippet code/src_gui_painting_qpainter.cpp 12
\endtable
\sa drawArc(), drawPie(), {Coordinate System}
@@ -4675,7 +4675,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
\table 100%
\row
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 13
+ \snippet code/src_gui_painting_qpainter.cpp 13
\endtable
\sa drawLines(), drawPolygon(), {Coordinate System}
@@ -4782,7 +4782,7 @@ void QPainter::drawPolyline(const QPoint *points, int pointCount)
\row
\li \inlineimage qpainter-polygon.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 14
+ \snippet code/src_gui_painting_qpainter.cpp 14
\endtable
The first point is implicitly connected to the last point, and the
@@ -4895,7 +4895,7 @@ void QPainter::drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fi
\row
\li \inlineimage qpainter-polygon.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 15
+ \snippet code/src_gui_painting_qpainter.cpp 15
\endtable
The first point is implicitly connected to the last point, and the
@@ -5018,7 +5018,7 @@ static inline QPointF roundInDeviceCoordinates(const QPointF &p, const QTransfor
\table 100%
\row
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 16
+ \snippet code/src_gui_painting_qpainter.cpp 16
\endtable
If \a pixmap is a QBitmap it is drawn with the bits that are "set"
@@ -5928,7 +5928,7 @@ void QPainter::drawText(const QRect &r, int flags, const QString &str, QRect *br
\row
\li \inlineimage qpainter-text.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 17
+ \snippet code/src_gui_painting_qpainter.cpp 17
\endtable
The \a boundingRect (if not null) is set to the what the bounding rectangle
@@ -6682,7 +6682,7 @@ void QPainter::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPo
\table 100%
\row
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 18
+ \snippet code/src_gui_painting_qpainter.cpp 18
\endtable
\sa QPicture::play()
@@ -6725,7 +6725,7 @@ void QPainter::drawPicture(const QPointF &p, const QPicture &picture)
Erases the area inside the given \a rectangle. Equivalent to
calling
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 19
+ \snippet code/src_gui_painting_qpainter.cpp 19
\sa fillRect()
*/
@@ -7669,7 +7669,7 @@ void QPainterState::init(QPainter *p) {
\table 100%
\row
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 20
+ \snippet code/src_gui_painting_qpainter.cpp 20
\endtable
\sa drawPixmap()
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 0e8811b934..dc310520e0 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -229,7 +229,7 @@ static void qt_debug_path(const QPainterPath &path)
\row
\li \inlineimage qpainterpath-construction.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 0
+ \snippet code/src_gui_painting_qpainterpath.cpp 0
\endtable
The painter path is initially empty when constructed. We first add
@@ -763,7 +763,7 @@ void QPainterPath::lineTo(const QPointF &p)
\row
\li \inlineimage qpainterpath-cubicto.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 1
+ \snippet code/src_gui_painting_qpainterpath.cpp 1
\endtable
\sa quadTo(), {QPainterPath#Composing a QPainterPath}{Composing
@@ -890,7 +890,7 @@ void QPainterPath::quadTo(const QPointF &c, const QPointF &e)
\row
\li \inlineimage qpainterpath-arcto.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 2
+ \snippet code/src_gui_painting_qpainterpath.cpp 2
\endtable
\sa arcMoveTo(), addEllipse(), QPainter::drawArc(), QPainter::drawPie(),
@@ -1002,7 +1002,7 @@ QPointF QPainterPath::currentPosition() const
\row
\li \inlineimage qpainterpath-addrectangle.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 3
+ \snippet code/src_gui_painting_qpainterpath.cpp 3
\endtable
\sa addRegion(), lineTo(), {QPainterPath#Composing a
@@ -1049,7 +1049,7 @@ void QPainterPath::addRect(const QRectF &r)
\row
\li \inlineimage qpainterpath-addpolygon.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 4
+ \snippet code/src_gui_painting_qpainterpath.cpp 4
\endtable
\sa lineTo(), {QPainterPath#Composing a QPainterPath}{Composing
@@ -1085,7 +1085,7 @@ void QPainterPath::addPolygon(const QPolygonF &polygon)
\row
\li \inlineimage qpainterpath-addellipse.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 5
+ \snippet code/src_gui_painting_qpainterpath.cpp 5
\endtable
\sa arcTo(), QPainter::drawEllipse(), {QPainterPath#Composing a
@@ -1137,7 +1137,7 @@ void QPainterPath::addEllipse(const QRectF &boundingRect)
\row
\li \inlineimage qpainterpath-addtext.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpainterpath.cpp 6
+ \snippet code/src_gui_painting_qpainterpath.cpp 6
\endtable
\sa QPainter::drawText(), {QPainterPath#Composing a
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 77f0edc52f..2c95a9f146 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -79,11 +79,11 @@ typedef QPenPrivate QPenData;
For example:
- \snippet doc/src/snippets/code/src_gui_painting_qpen.cpp 0
+ \snippet code/src_gui_painting_qpen.cpp 0
which is equivalent to
- \snippet doc/src/snippets/code/src_gui_painting_qpen.cpp 1
+ \snippet code/src_gui_painting_qpen.cpp 1
The default pen is a solid black brush with 0 width, square
cap style (Qt::SquareCap), and bevel join style (Qt::BevelJoin).
@@ -135,7 +135,7 @@ typedef QPenPrivate QPenData;
spaces. For example, the custom pattern shown above is created
using the following code:
- \snippet doc/src/snippets/code/src_gui_painting_qpen.cpp 2
+ \snippet code/src_gui_painting_qpen.cpp 2
Note that the dash pattern is specified in units of the pens
width, e.g. a dash of length 5 in width 10 is 50 pixels long.
@@ -476,7 +476,7 @@ QVector<qreal> QPen::dashPattern() const
\row
\li \inlineimage qpen-custom.png
\li
- \snippet doc/src/snippets/code/src_gui_painting_qpen.cpp 3
+ \snippet code/src_gui_painting_qpen.cpp 3
\endtable
The dash pattern is specified in units of the pens width; e.g. a
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index ee1f7967cb..b7dee7ff2a 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -98,7 +98,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
points to a QPolygon is to use QVector's streaming operator, as
illustrated below:
- \snippet doc/src/snippets/polygon/polygon.cpp 0
+ \snippet polygon/polygon.cpp 0
In addition to the functions provided by QVector, QPolygon
provides some point-specific functions.
@@ -304,7 +304,7 @@ void QPolygon::point(int index, int *x, int *y) const
The example code creates a polygon with two points (10, 20) and
(30, 40):
- \snippet doc/src/snippets/polygon/polygon.cpp 2
+ \snippet polygon/polygon.cpp 2
\sa setPoint() putPoints()
*/
@@ -330,7 +330,7 @@ void QPolygon::setPoints(int nPoints, const int *points)
The example code creates a polygon with two points (10, 20) and
(30, 40):
- \snippet doc/src/snippets/polygon/polygon.cpp 3
+ \snippet polygon/polygon.cpp 3
*/
void QPolygon::setPoints(int nPoints, int firstx, int firsty, ...)
@@ -381,12 +381,12 @@ void QPolygon::putPoints(int index, int nPoints, const int *points)
The example code creates a polygon with three points (4,5), (6,7)
and (8,9), by expanding the polygon from 1 to 3 points:
- \snippet doc/src/snippets/polygon/polygon.cpp 4
+ \snippet polygon/polygon.cpp 4
The following code has the same result, but here the putPoints()
function overwrites rather than extends:
- \snippet doc/src/snippets/polygon/polygon.cpp 5
+ \snippet polygon/polygon.cpp 5
\sa setPoints()
*/
@@ -418,7 +418,7 @@ void QPolygon::putPoints(int index, int nPoints, int firstx, int firsty, ...)
default) in \a fromPolygon into this polygon, starting at the
specified \a index. For example:
- \snippet doc/src/snippets/polygon/polygon.cpp 6
+ \snippet polygon/polygon.cpp 6
*/
void QPolygon::putPoints(int index, int nPoints, const QPolygon & from, int fromIndex)
@@ -490,7 +490,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
to a QPolygonF is to use its streaming operator, as illustrated
below:
- \snippet doc/src/snippets/polygon/polygon.cpp 1
+ \snippet polygon/polygon.cpp 1
In addition to the functions provided by QVector, QPolygonF
provides the boundingRect() and translate() functions for geometry
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index ebca1edddc..f250150b06 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
rectangles.
Example of using complex regions:
- \snippet doc/src/snippets/code/src_gui_painting_qregion.cpp 0
+ \snippet code/src_gui_painting_qregion.cpp 0
\section1 Additional License Information
@@ -725,7 +725,7 @@ QRegion QRegion::intersect(const QRect &r) const
empty region is a region that contains no points.
Example:
- \snippet doc/src/snippets/code/src_gui_painting_qregion_unix.cpp 0
+ \snippet code/src_gui_painting_qregion_unix.cpp 0
*/
/*!
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index ba971d454d..924a444805 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -159,7 +159,7 @@ QT_BEGIN_NAMESPACE
\row
\li \inlineimage qtransform-simpletransformation.png
\li
- \snippet doc/src/snippets/transform/main.cpp 0
+ \snippet transform/main.cpp 0
\endtable
Although these functions are very convenient, it can be more
@@ -171,7 +171,7 @@ QT_BEGIN_NAMESPACE
\row
\li \inlineimage qtransform-combinedtransformation.png
\li
- \snippet doc/src/snippets/transform/main.cpp 1
+ \snippet transform/main.cpp 1
\endtable
\section1 Basic Matrix Operations
@@ -188,7 +188,7 @@ QT_BEGIN_NAMESPACE
QTransform transforms a point in the plane to another point using the
following formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qtransform.cpp 0
+ \snippet code/src_gui_painting_qtransform.cpp 0
The point \e (x, y) is the original point, and \e (x', y') is the
transformed point. \e (x', y') can be transformed back to \e (x,
@@ -221,7 +221,7 @@ QT_BEGIN_NAMESPACE
\row
\li \inlineimage qtransform-combinedtransformation2.png
\li
- \snippet doc/src/snippets/transform/main.cpp 2
+ \snippet transform/main.cpp 2
\endtable
\sa QPainter, {Coordinate System}, {painting/affine}{Affine
@@ -1662,7 +1662,7 @@ QPainterPath QTransform::map(const QPainterPath &path) const
The rectangle's coordinates are transformed using the following
formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qtransform.cpp 1
+ \snippet code/src_gui_painting_qtransform.cpp 1
Polygons and rectangles behave slightly differently when
transformed (due to integer rounding), so
@@ -1915,7 +1915,7 @@ QRect QTransform::mapRect(const QRect &rect) const
The rectangle's coordinates are transformed using the following
formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qtransform.cpp 2
+ \snippet code/src_gui_painting_qtransform.cpp 2
If rotation or shearing has been specified, this function returns
the \e bounding rectangle. To retrieve the exact region the given
@@ -1991,7 +1991,7 @@ QRectF QTransform::mapRect(const QRectF &rect) const
The coordinates are transformed using the following formulas:
- \snippet doc/src/snippets/code/src_gui_painting_qtransform.cpp 3
+ \snippet code/src_gui_painting_qtransform.cpp 3
The point (x, y) is the original point, and (x', y') is the
transformed point.
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index e14cfe0f82..45903f678c 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -120,7 +120,7 @@ QT_BEGIN_NAMESPACE
and QTextObjectInterface. QObject must be the first class
inherited. For instance:
- \snippet examples/richtext/textobject/svgtextobject.h 1
+ \snippet richtext/textobject/svgtextobject.h 1
The data of a text object is usually stored in the QTextCharFormat
using QTextCharFormat::setProperty(), and then retrieved with
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index ccbd335d61..f64b3e823d 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -367,7 +367,7 @@ QFontEngineData::~QFontEngineData()
Create QFonts like this:
- \snippet doc/src/snippets/code/src_gui_text_qfont.cpp 0
+ \snippet code/src_gui_text_qfont.cpp 0
The attributes set in the constructor can also be set later, e.g.
setFamily(), setPointSize(), setPointSizeFloat(), setWeight() and
@@ -464,11 +464,11 @@ QFontEngineData::~QFontEngineData()
Examples:
- \snippet doc/src/snippets/code/src_gui_text_qfont.cpp 1
+ \snippet code/src_gui_text_qfont.cpp 1
If you had both an Adobe and a Cronyx Helvetica, you might get
either.
- \snippet doc/src/snippets/code/src_gui_text_qfont.cpp 2
+ \snippet code/src_gui_text_qfont.cpp 2
You can specify the foundry you want in the family name. The font f
in the above example will be set to "Helvetica
@@ -477,11 +477,11 @@ QFontEngineData::~QFontEngineData()
To determine the attributes of the font actually used in the window
system, use a QFontInfo object, e.g.
- \snippet doc/src/snippets/code/src_gui_text_qfont.cpp 3
+ \snippet code/src_gui_text_qfont.cpp 3
To find out font metrics use a QFontMetrics object, e.g.
- \snippet doc/src/snippets/code/src_gui_text_qfont.cpp 4
+ \snippet code/src_gui_text_qfont.cpp 4
For more general information on fonts, see the
\link http://nwalsh.com/comp.fonts/FAQ/ comp.fonts FAQ.\endlink
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 0a56ca3742..b8e1e0cc3b 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1197,8 +1197,8 @@ QString QFontDatabase::styleString(const QFontInfo &fontInfo)
Example:
- \snippet doc/src/snippets/qfontdatabase/main.cpp 0
- \snippet doc/src/snippets/qfontdatabase/main.cpp 1
+ \snippet qfontdatabase/main.cpp 0
+ \snippet qfontdatabase/main.cpp 1
This example gets the list of font families, the list of
styles for each family, and the point sizes that are available for
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index fe9e1d16c7..cc6fa4bfee 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -122,7 +122,7 @@ extern void qt_format_text(const QFont& font, const QRectF &_r,
and size(), to return the size of that rectangle.
Example:
- \snippet doc/src/snippets/code/src_gui_text_qfontmetrics.cpp 0
+ \snippet code/src_gui_text_qfontmetrics.cpp 0
\sa QFont, QFontInfo, QFontDatabase, QFontComboBox, {Character Map Example}
*/
@@ -976,7 +976,7 @@ int QFontMetrics::lineWidth() const
and size(), to return the size of that rectangle.
Example:
- \snippet doc/src/snippets/code/src_gui_text_qfontmetrics.cpp 1
+ \snippet code/src_gui_text_qfontmetrics.cpp 1
\sa QFont QFontInfo QFontDatabase
*/
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index c6810ad61f..c372071019 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -253,7 +253,7 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block)
pass it the QTextEdit or QTextDocument that you want the syntax
highlighting to be applied to. For example:
- \snippet doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp 0
+ \snippet code/src_gui_text_qsyntaxhighlighter.cpp 0
After this your highlightBlock() function will be called
automatically whenever necessary. Use your highlightBlock()
@@ -262,7 +262,7 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block)
setFormat() function which applies a given QTextCharFormat on
the current text block. For example:
- \snippet doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp 1
+ \snippet code/src_gui_text_qsyntaxhighlighter.cpp 1
Some syntaxes can have constructs that span several text
blocks. For example, a C++ syntax highlighter should be able to
@@ -285,7 +285,7 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block)
For example, if you're writing a simple C++ syntax highlighter,
you might designate 1 to signify "in comment":
- \snippet doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp 2
+ \snippet code/src_gui_text_qsyntaxhighlighter.cpp 2
In the example above, we first set the current block state to
0. Then, if the previous block ended within a comment, we higlight
@@ -432,7 +432,7 @@ void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block)
setFormat() as often as necessary to apply any font and color
changes that you require. For example:
- \snippet doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp 3
+ \snippet code/src_gui_text_qsyntaxhighlighter.cpp 3
Some syntaxes can have constructs that span several text
blocks. For example, a C++ syntax highlighter should be able to
@@ -602,7 +602,7 @@ void QSyntaxHighlighter::setCurrentBlockState(int newState)
and store their relative position and the actual QChar in a simple
class derived from QTextBlockUserData:
- \snippet doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp 4
+ \snippet code/src_gui_text_qsyntaxhighlighter.cpp 4
During cursor navigation in the associated editor, you can ask the
current QTextBlock (retrieved using the QTextCursor::block()
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 02fd921fac..ce46ec2e59 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -972,7 +972,7 @@ QTextLayout *QTextCursorPrivate::blockLayout(QTextBlock &block) const{
diacritics). Functions such as movePosition() and deleteChar()
limit cursor movement to these valid positions.
- \sa \link richtext.html Rich Text Processing\endlink
+ \sa {Rich Text Processing}
*/
@@ -1380,7 +1380,7 @@ void QTextCursor::setKeepPositionOnInsert(bool b)
If there is a selection, the selection is deleted and replaced by
\a text, for example:
- \snippet doc/src/snippets/code/src_gui_text_qtextcursor.cpp 0
+ \snippet code/src_gui_text_qtextcursor.cpp 0
This clears any existing selection, selects the word at the cursor
(i.e. from position() forward), and replaces the selection with
the phrase "Hello World".
@@ -2301,7 +2301,7 @@ void QTextCursor::insertImage(const QTextImageFormat &format)
Convenience method for inserting the image with the given \a name at the
current position().
- \snippet doc/src/snippets/code/src_gui_text_qtextcursor.cpp 1
+ \snippet code/src_gui_text_qtextcursor.cpp 1
*/
void QTextCursor::insertImage(const QString &name)
{
@@ -2445,7 +2445,7 @@ bool QTextCursor::operator>(const QTextCursor &rhs) const
For example:
- \snippet doc/src/snippets/code/src_gui_text_qtextcursor.cpp 2
+ \snippet code/src_gui_text_qtextcursor.cpp 2
The call to undo() will cause both insertions to be undone,
causing both "World" and "Hello" to be removed.
@@ -2474,7 +2474,7 @@ void QTextCursor::beginEditBlock()
For example:
- \snippet doc/src/snippets/code/src_gui_text_qtextcursor.cpp 3
+ \snippet code/src_gui_text_qtextcursor.cpp 3
The call to undo() will cause all three insertions to be undone.
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index ec660dd050..f0546566d4 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1511,7 +1511,7 @@ QTextBlock QTextDocument::begin() const
This function returns a block to test for the end of the document
while iterating over it.
- \snippet doc/src/snippets/textdocumentendsnippet.cpp 0
+ \snippet textdocumentendsnippet.cpp 0
The block returned is invalid and represents the block after the
last block in the document. You can use lastBlock() to retrieve the
@@ -1868,15 +1868,15 @@ QVariant QTextDocument::resource(int type, const QUrl &name) const
For example, you can add an image as a resource in order to reference it
from within the document:
- \snippet snippets/textdocument-resources/main.cpp Adding a resource
+ \snippet textdocument-resources/main.cpp Adding a resource
The image can be inserted into the document using the QTextCursor API:
- \snippet snippets/textdocument-resources/main.cpp Inserting an image with a cursor
+ \snippet textdocument-resources/main.cpp Inserting an image with a cursor
Alternatively, you can insert images using the HTML \c img tag:
- \snippet snippets/textdocument-resources/main.cpp Inserting an image using HTML
+ \snippet textdocument-resources/main.cpp Inserting an image using HTML
*/
void QTextDocument::addResource(int type, const QUrl &name, const QVariant &resource)
{
@@ -2967,7 +2967,7 @@ void QTextHtmlExporter::emitFrameStyle(const QTextFrameFormat &format, FrameType
The \a encoding parameter specifies the value for the charset attribute
in the html header. For example if 'utf-8' is specified then the
beginning of the generated html will look like this:
- \snippet doc/src/snippets/code/src_gui_text_qtextdocument.cpp 0
+ \snippet code/src_gui_text_qtextdocument.cpp 0
If no encoding is specified then no such meta information is generated.
diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp
index b0bbeb7a47..2894c280e8 100644
--- a/src/gui/text/qtextdocumentwriter.cpp
+++ b/src/gui/text/qtextdocumentwriter.cpp
@@ -160,7 +160,7 @@ QTextDocumentWriter::~QTextDocumentWriter()
Sets the format used to write documents to the \a format specified.
\a format is a case insensitive text string. For example:
- \snippet doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp 0
+ \snippet code/src_gui_text_qtextdocumentwriter.cpp 0
You can call supportedDocumentFormats() for the full list of formats
QTextDocumentWriter supports.
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 9a38b1f0b2..bb3d897ebe 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -2269,7 +2269,7 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const
can be used to customize the numbers used in an ordered list so that they
appear as (1), (2), (3), etc.:
- \snippet doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp add a styled, ordered list
+ \snippet textdocument-listitemstyles/mainwindow.cpp add a styled, ordered list
\sa QTextList
*/
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 94af3edeeb..0ab964778a 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -282,10 +282,10 @@ Qt::LayoutDirection QTextInlineObject::textDirection() const
created lines.
Here is a code snippet that demonstrates the layout phase:
- \snippet doc/src/snippets/code/src_gui_text_qtextlayout.cpp 0
+ \snippet code/src_gui_text_qtextlayout.cpp 0
The text can then be rendered by calling the layout's draw() function:
- \snippet doc/src/snippets/code/src_gui_text_qtextlayout.cpp 1
+ \snippet code/src_gui_text_qtextlayout.cpp 1
For a given position in the text you can find a valid cursor position with
isValidCursorPosition(), nextCursorPosition(), and previousCursorPosition().
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp
index c3c71bc021..82d744d654 100644
--- a/src/gui/text/qtextlist.cpp
+++ b/src/gui/text/qtextlist.cpp
@@ -75,7 +75,7 @@ public:
The \l{QTextCursor::insertList()} function inserts an empty block into the
document at the cursor position, and makes it the first item in a list.
- \snippet doc/src/snippets/textdocument-lists/mainwindow.cpp 0
+ \snippet textdocument-lists/mainwindow.cpp 0
The \l{QTextCursor::createList()} function takes the contents of the
cursor's current block and turns it into the first item of a new list.
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index a9daf6ba56..d4e9c7d12c 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -939,8 +939,8 @@ bool QTextBlock::isValid() const
An iterator can be constructed and used to access the fragments within
a text block in the following way:
- \snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 4
- \snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 7
+ \snippet textblock-fragments/xmlwriter.cpp 4
+ \snippet textblock-fragments/xmlwriter.cpp 7
\sa QTextFragment
*/
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 65bc8fde1e..a9866187d3 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -510,9 +510,9 @@ void QTextTablePrivate::update() const
For example, we can insert a table with three rows and two columns at the
current cursor position in an editor using the following lines of code:
- \snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 1
+ \snippet textdocument-tables/mainwindow.cpp 1
\codeline
- \snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 3
+ \snippet textdocument-tables/mainwindow.cpp 3
The table format is either defined when the table is created or changed
later with setFormat().
@@ -545,14 +545,14 @@ void QTextTablePrivate::update() const
\li Suppose we have a 2x3 table of names and addresses. To merge both
columns in the first row we invoke mergeCells() with \a row = 0,
\a column = 0, \a numRows = 1 and \a numColumns = 2.
- \snippet doc/src/snippets/textdocument-texttable/main.cpp 0
+ \snippet textdocument-texttable/main.cpp 0
\row
\li \inlineimage texttable-merge.png
\li This gives us the following table. To split the first row of the table
back into two cells, we invoke the splitCell() function with \a numRows
and \a numCols = 1.
- \snippet doc/src/snippets/textdocument-texttable/main.cpp 1
+ \snippet textdocument-texttable/main.cpp 1
\row
\li \inlineimage texttable-split.png Split Table
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 0fba6e6f3a..5e83e7cc00 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -135,7 +135,7 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler)
URLs, and by registering a handler it becomes possible to display the help text
inside the application:
- \snippet doc/src/snippets/code/src_gui_util_qdesktopservices.cpp 0
+ \snippet code/src_gui_util_qdesktopservices.cpp 0
If inside the handler you decide that you can't open the requested
URL, you can just call QDesktopServices::openUrl() again with the
@@ -155,7 +155,7 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler)
The following example opens a file on the Windows file system residing on a path
that contains spaces:
- \snippet doc/src/snippets/code/src_gui_util_qdesktopservices.cpp 2
+ \snippet code/src_gui_util_qdesktopservices.cpp 2
If a \c mailto URL is specified, the user's e-mail client will be used to open a
composer window containing the options specified in the URL, similar to the way
@@ -164,7 +164,7 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler)
For example, the following URL contains a recipient (\c{user@foo.com}), a
subject (\c{Test}), and a message body (\c{Just a test}):
- \snippet doc/src/snippets/code/src_gui_util_qdesktopservices.cpp 1
+ \snippet code/src_gui_util_qdesktopservices.cpp 1
\warning Although many e-mail clients can send attachments and are
Unicode-aware, the user may have configured their client without these features.
diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp
index 3103cc7424..84a5b4c54c 100644
--- a/src/gui/util/qvalidator.cpp
+++ b/src/gui/util/qvalidator.cpp
@@ -303,12 +303,12 @@ void QValidator::fixup(QString &) const
Example of use:
- \snippet doc/src/snippets/code/src_gui_widgets_qvalidator.cpp 0
+ \snippet code/src_gui_util_qvalidator.cpp 0
Below we present some examples of validators. In practice they would
normally be associated with a widget as in the example above.
- \snippet doc/src/snippets/code/src_gui_widgets_qvalidator.cpp 1
+ \snippet code/src_gui_util_qvalidator.cpp 1
Notice that the value \c 999 returns Intermediate. Values
consisting of a number of digits equal to or less than the max
@@ -377,7 +377,7 @@ QIntValidator::~QIntValidator()
the user might be just about to type the minus (especially for right-to-left
languages).
- \snippet doc/src/snippets/code/src_gui_widgets_qvalidator.cpp 2
+ \snippet code/src_gui_util_qvalidator.cpp 2
By default, the \a pos parameter is not used by this validator.
*/
@@ -812,12 +812,12 @@ QDoubleValidator::Notation QDoubleValidator::notation() const
For a brief introduction to Qt's regexp engine, see \l QRegExp.
Example of use:
- \snippet doc/src/snippets/code/src_gui_widgets_qvalidator.cpp 3
+ \snippet code/src_gui_util_qvalidator.cpp 3
Below we present some examples of validators. In practice they would
normally be associated with a widget as in the example above.
- \snippet doc/src/snippets/code/src_gui_widgets_qvalidator.cpp 4
+ \snippet code/src_gui_util_qvalidator.cpp 4
\sa QRegExp, QIntValidator, QDoubleValidator, {Settings Editor Example}
*/
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index ba30ad08ba..324126baae 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1361,7 +1361,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
e.g. if you want to connect and login to a FTP server. This is
simply achieved:
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 0
+ \snippet code/src_network_access_qftp.cpp 0
In this case two FTP commands have been scheduled. When the last
scheduled command has finished, a done() signal is emitted with
@@ -1379,12 +1379,12 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
Example: If you want to download the INSTALL file from the Qt
FTP server, you would write this:
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 1
+ \snippet code/src_network_access_qftp.cpp 1
For this example the following sequence of signals is emitted
(with small variations, depending on network traffic, etc.):
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 2
+ \snippet code/src_network_access_qftp.cpp 2
The dataTransferProgress() signal in the above example is useful
if you want to show a \link QProgressBar progress bar \endlink to
@@ -1397,7 +1397,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
If the login fails for the above example, the signals would look
like this:
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 3
+ \snippet code/src_network_access_qftp.cpp 3
You can then get details about the error with the error() and
errorString() functions.
diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp
index 27164d69ae..ca7e2f6be8 100644
--- a/src/network/access/qhttpmultipart.cpp
+++ b/src/network/access/qhttpmultipart.cpp
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
and a data block, which are separated by each other by two
consecutive new lines. An example for one part would be:
- \snippet doc/src/snippets/code/src_network_access_qhttppart.cpp 0
+ \snippet code/src_network_access_qhttppart.cpp 0
For setting headers, use setHeader() and setRawHeader(), which behave
exactly like QNetworkRequest::setHeader() and QNetworkRequest::setRawHeader().
@@ -77,12 +77,12 @@ QT_BEGIN_NAMESPACE
To construct a QHttpPart with a small body, consider the following snippet
(this produces the data shown in the example above):
- \snippet doc/src/snippets/code/src_network_access_qhttppart.cpp 1
+ \snippet code/src_network_access_qhttppart.cpp 1
To construct a QHttpPart reading from a device (e.g. a file), the following
can be applied:
- \snippet doc/src/snippets/code/src_network_access_qhttppart.cpp 2
+ \snippet code/src_network_access_qhttppart.cpp 2
Be aware that QHttpPart does not take ownership of the device when set, so
it is the developer's responsibility to destroy it when it is not needed anymore.
@@ -226,7 +226,7 @@ void QHttpPart::setBodyDevice(QIODevice *device)
As an example, consider the following code snippet, which constructs a multipart
message containing a text part followed by an image part:
- \snippet doc/src/snippets/code/src_network_access_qhttpmultipart.cpp 0
+ \snippet code/src_network_access_qhttpmultipart.cpp 0
\sa QHttpPart, QNetworkAccessManager::post()
*/
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index b539ed4d9a..66d8a66b43 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -178,7 +178,7 @@ static void ensureInitialized()
returned in response to the corresponding request.
A simple download off the network could be accomplished with:
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 0
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 0
QNetworkAccessManager has an asynchronous API.
When the \tt replyFinished slot above is called, the parameter it
@@ -197,7 +197,7 @@ static void ensureInitialized()
A more involved example, assuming the manager is already existent,
can be:
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 1
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 1
\section1 Network and Roaming support
@@ -283,11 +283,11 @@ static void ensureInitialized()
By default the value of this property reflects the physical state of the device. Applications
may override it to disable all network requests via this network access manager by calling
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 4
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 4
Network requests can be reenabled again by calling
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 5
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 5
\note Calling setNetworkAccessible() does not change the network state.
*/
@@ -805,12 +805,12 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ
To restore the default network configuration set the network configuration to the value
returned from QNetworkConfigurationManager::defaultConfiguration().
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 2
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 2
If an invalid network configuration is set, a network session will not be created. In this
case network requests will be processed regardless, but may fail. For example:
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 3
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 3
\sa configuration(), QNetworkSession
*/
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index bcaf81a6a0..0a1d43f70f 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -88,17 +88,17 @@ QT_BEGIN_NAMESPACE
A network disk cache can be enabled by:
- \snippet doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp 0
+ \snippet code/src_network_access_qnetworkdiskcache.cpp 0
When sending requests, to control the preference of when to use the cache
and when to use the network, consider the following:
- \snippet doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp 1
+ \snippet code/src_network_access_qnetworkdiskcache.cpp 1
To check whether the response came from the cache or from the network, the
following can be applied:
- \snippet doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp 2
+ \snippet code/src_network_access_qnetworkdiskcache.cpp 2
*/
/*!
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index aefe07223f..3b6ec5d4b5 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -616,7 +616,7 @@ void QNetworkReply::setSslConfiguration(const QSslConfiguration &config)
If, for instance, you want to issue a request to a server that uses
a self-signed certificate, consider the following snippet:
- \snippet doc/src/snippets/code/src_network_access_qnetworkreply.cpp 0
+ \snippet code/src_network_access_qnetworkreply.cpp 0
Multiple calls to this function will replace the list of errors that
were passed in previous calls.
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 1c8655e9ae..9df06328a1 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -487,7 +487,7 @@ QList<QByteArray> QNetworkRequest::rawHeaderList() const
the corresponding "cooked" header will be set as well.
For example:
- \snippet doc/src/snippets/code/src_network_access_qnetworkrequest.cpp 0
+ \snippet code/src_network_access_qnetworkrequest.cpp 0
will also set the known header LastModifiedHeader to be the
QDateTime object of the parsed date.
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index 511bec8f23..0561ea93d1 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -321,7 +321,7 @@ QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(
This is equivalent to the following code snippet:
- \snippet doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp 0
+ \snippet code/src_network_bearer_qnetworkconfigmanager.cpp 0
\sa onlineStateChanged()
*/
diff --git a/src/network/doc/doc.pri b/src/network/doc/doc.pri
deleted file mode 100644
index 7ca0ad07d4..0000000000
--- a/src/network/doc/doc.pri
+++ /dev/null
@@ -1,3 +0,0 @@
-qtPrepareTool(QDOC, qdoc)
-docs.commands += $$QDOC $$QT.network.sources/doc/qtnetwork.qdocconf
-QMAKE_EXTRA_TARGETS += docs
diff --git a/doc/src/images/roaming-states.png b/src/network/doc/images/roaming-states.png
index bc61cac219..bc61cac219 100644
--- a/doc/src/images/roaming-states.png
+++ b/src/network/doc/images/roaming-states.png
Binary files differ
diff --git a/doc/src/images/tcpstream.png b/src/network/doc/images/tcpstream.png
index 7975376c8c..7975376c8c 100644
--- a/doc/src/images/tcpstream.png
+++ b/src/network/doc/images/tcpstream.png
Binary files differ
diff --git a/doc/src/images/udppackets.png b/src/network/doc/images/udppackets.png
index bd66c3f65e..bd66c3f65e 100644
--- a/doc/src/images/udppackets.png
+++ b/src/network/doc/images/udppackets.png
Binary files differ
diff --git a/src/network/doc/qtnetwork.qdocconf b/src/network/doc/qtnetwork.qdocconf
index 2e58ad65c9..e14fb32232 100644
--- a/src/network/doc/qtnetwork.qdocconf
+++ b/src/network/doc/qtnetwork.qdocconf
@@ -2,7 +2,7 @@ include(../../../doc/global/qt-cpp-ignore.qdocconf)
project = QtNetwork
description = Qt Network Reference Documentation
-url = http://qt-project.org/doc/qt-5.0/qtsql
+url = http://qt-project.org/doc/qt-5.0/qtnetwork
version = 5.0.0
sourceencoding = UTF-8
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.cpp b/src/network/doc/snippets/code/doc_src_qtnetwork.cpp
index 7fa8a29db0..7fa8a29db0 100644
--- a/doc/src/snippets/code/doc_src_qtnetwork.cpp
+++ b/src/network/doc/snippets/code/doc_src_qtnetwork.cpp
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.pro b/src/network/doc/snippets/code/doc_src_qtnetwork.pro
index a100943e58..a100943e58 100644
--- a/doc/src/snippets/code/doc_src_qtnetwork.pro
+++ b/src/network/doc/snippets/code/doc_src_qtnetwork.pro
diff --git a/doc/src/snippets/code/src_network_access_qftp.cpp b/src/network/doc/snippets/code/src_network_access_qftp.cpp
index db1817ce9f..db1817ce9f 100644
--- a/doc/src/snippets/code/src_network_access_qftp.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qftp.cpp
diff --git a/doc/src/snippets/code/src_network_access_qhttpmultipart.cpp b/src/network/doc/snippets/code/src_network_access_qhttpmultipart.cpp
index 981a93a3ca..981a93a3ca 100644
--- a/doc/src/snippets/code/src_network_access_qhttpmultipart.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qhttpmultipart.cpp
diff --git a/doc/src/snippets/code/src_network_access_qhttppart.cpp b/src/network/doc/snippets/code/src_network_access_qhttppart.cpp
index 1dca3d6683..1dca3d6683 100644
--- a/doc/src/snippets/code/src_network_access_qhttppart.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qhttppart.cpp
diff --git a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp
index ab8fc97d04..ab8fc97d04 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qnetworkaccessmanager.cpp
diff --git a/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp b/src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp
index bc272a2223..bc272a2223 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qnetworkdiskcache.cpp
diff --git a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp b/src/network/doc/snippets/code/src_network_access_qnetworkreply.cpp
index 0f1b4c2014..0f1b4c2014 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qnetworkreply.cpp
diff --git a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp b/src/network/doc/snippets/code/src_network_access_qnetworkrequest.cpp
index bdf696e851..bdf696e851 100644
--- a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
+++ b/src/network/doc/snippets/code/src_network_access_qnetworkrequest.cpp
diff --git a/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp b/src/network/doc/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
index 2d62d758b7..2d62d758b7 100644
--- a/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
+++ b/src/network/doc/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
diff --git a/doc/src/snippets/code/src_network_kernel_qdnslookup.cpp b/src/network/doc/snippets/code/src_network_kernel_qdnslookup.cpp
index f2e530ff96..f2e530ff96 100644
--- a/doc/src/snippets/code/src_network_kernel_qdnslookup.cpp
+++ b/src/network/doc/snippets/code/src_network_kernel_qdnslookup.cpp
diff --git a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp b/src/network/doc/snippets/code/src_network_kernel_qhostaddress.cpp
index c03054c243..c03054c243 100644
--- a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
+++ b/src/network/doc/snippets/code/src_network_kernel_qhostaddress.cpp
diff --git a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp b/src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp
index 7607841ac5..7607841ac5 100644
--- a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
+++ b/src/network/doc/snippets/code/src_network_kernel_qhostinfo.cpp
diff --git a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp b/src/network/doc/snippets/code/src_network_kernel_qnetworkproxy.cpp
index eadf4f91a5..eadf4f91a5 100644
--- a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
+++ b/src/network/doc/snippets/code/src_network_kernel_qnetworkproxy.cpp
diff --git a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp b/src/network/doc/snippets/code/src_network_socket_qabstractsocket.cpp
index b419b33c92..b419b33c92 100644
--- a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
+++ b/src/network/doc/snippets/code/src_network_socket_qabstractsocket.cpp
diff --git a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp b/src/network/doc/snippets/code/src_network_socket_qlocalsocket_unix.cpp
index 947e89900a..947e89900a 100644
--- a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
+++ b/src/network/doc/snippets/code/src_network_socket_qlocalsocket_unix.cpp
diff --git a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp b/src/network/doc/snippets/code/src_network_socket_qnativesocketengine.cpp
index 98ac70cc49..98ac70cc49 100644
--- a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
+++ b/src/network/doc/snippets/code/src_network_socket_qnativesocketengine.cpp
diff --git a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp b/src/network/doc/snippets/code/src_network_socket_qtcpserver.cpp
index 90c4a86836..90c4a86836 100644
--- a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
+++ b/src/network/doc/snippets/code/src_network_socket_qtcpserver.cpp
diff --git a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp b/src/network/doc/snippets/code/src_network_socket_qudpsocket.cpp
index 2a90772623..2a90772623 100644
--- a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
+++ b/src/network/doc/snippets/code/src_network_socket_qudpsocket.cpp
diff --git a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
index 0538990a3d..0538990a3d 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
+++ b/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
diff --git a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp
index a3a08f68d1..a3a08f68d1 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
+++ b/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp
diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp
index 4d8e3668b5..4d8e3668b5 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
+++ b/src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp
diff --git a/doc/src/snippets/network/tcpwait.cpp b/src/network/doc/snippets/network/tcpwait.cpp
index 9ee68e5b13..9ee68e5b13 100644
--- a/doc/src/snippets/network/tcpwait.cpp
+++ b/src/network/doc/snippets/network/tcpwait.cpp
diff --git a/doc/src/network/network-programming/bearermanagement.qdoc b/src/network/doc/src/bearermanagement.qdoc
index 91dc32c5a5..91dc32c5a5 100644
--- a/doc/src/network/network-programming/bearermanagement.qdoc
+++ b/src/network/doc/src/bearermanagement.qdoc
diff --git a/doc/src/network/network-programming/qtnetwork.qdoc b/src/network/doc/src/network-programming.qdoc
index 0701b04f6f..0701b04f6f 100644
--- a/doc/src/network/network-programming/qtnetwork.qdoc
+++ b/src/network/doc/src/network-programming.qdoc
diff --git a/doc/src/network/qtnetwork.qdoc b/src/network/doc/src/qtnetwork.qdoc
index bd88f797c1..092880ef59 100644
--- a/doc/src/network/qtnetwork.qdoc
+++ b/src/network/doc/src/qtnetwork.qdoc
@@ -36,10 +36,10 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtnetwork.cpp 1
+ \snippet code/doc_src_qtnetwork.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtnetwork.pro 0
+ \snippet code/doc_src_qtnetwork.pro 0
*/
diff --git a/doc/src/network/network-programming/ssl.qdoc b/src/network/doc/src/ssl.qdoc
index 21828d7af9..21828d7af9 100644
--- a/doc/src/network/network-programming/ssl.qdoc
+++ b/src/network/doc/src/ssl.qdoc
diff --git a/src/network/kernel/qdnslookup.cpp b/src/network/kernel/qdnslookup.cpp
index 7a1d4e45de..a826422978 100644
--- a/src/network/kernel/qdnslookup.cpp
+++ b/src/network/kernel/qdnslookup.cpp
@@ -171,11 +171,11 @@ static void qt_qdnsservicerecord_sort(QList<QDnsServiceRecord> &records)
For example, you can determine which servers an XMPP chat client should
connect to for a given domain with:
- \snippet doc/src/snippets/code/src_network_kernel_qdnslookup.cpp 0
+ \snippet code/src_network_kernel_qdnslookup.cpp 0
Once the request finishes you can handle the results with:
- \snippet doc/src/snippets/code/src_network_kernel_qdnslookup.cpp 1
+ \snippet code/src_network_kernel_qdnslookup.cpp 1
\note If you simply want to find the IP address(es) associated with a host
name, or the host name associated with an IP address you should use
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 56473e2982..3ca0f84c39 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -644,7 +644,7 @@ QAbstractSocket::NetworkLayerProtocol QHostAddress::protocol() const
Returns the IPv6 address as a Q_IPV6ADDR structure. The structure
consists of 16 unsigned characters.
- \snippet doc/src/snippets/code/src_network_kernel_qhostaddress.cpp 0
+ \snippet code/src_network_kernel_qhostaddress.cpp 0
This value is valid if the protocol() is
\l{QAbstractSocket::}{IPv6Protocol}.
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 085f2f6651..32cf90145c 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -83,7 +83,7 @@ Q_GLOBAL_STATIC(QHostInfoLookupManager, theHostInfoLookupManager)
Example:
- \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 0
+ \snippet code/src_network_kernel_qhostinfo.cpp 0
The slot is invoked when the results are ready. The results are
@@ -97,7 +97,7 @@ Q_GLOBAL_STATIC(QHostInfoLookupManager, theHostInfoLookupManager)
If you want a blocking lookup, use the QHostInfo::fromName() function:
- \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 1
+ \snippet code/src_network_kernel_qhostinfo.cpp 1
QHostInfo supports Internationalized Domain Names (IDNs) through the
IDNA and Punycode standards.
@@ -126,12 +126,12 @@ static QBasicAtomicInt theIdCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
The lookup is performed by a single function call, for example:
- \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 2
+ \snippet code/src_network_kernel_qhostinfo.cpp 2
The implementation of the slot prints basic information about the
addresses returned by the lookup, or reports an error if it failed:
- \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 3
+ \snippet code/src_network_kernel_qhostinfo.cpp 3
If you pass a literal IP address to \a name instead of a host name,
QHostInfo will search for the domain name for the IP (i.e., QHostInfo will
@@ -139,7 +139,7 @@ static QBasicAtomicInt theIdCounter = Q_BASIC_ATOMIC_INITIALIZER(1);
contain both the resolved domain name and IP addresses for the host
name. Example:
- \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 4
+ \snippet code/src_network_kernel_qhostinfo.cpp 4
\note There is no guarantee on the order the signals will be emitted
if you start multiple requests with lookupHost().
@@ -311,7 +311,7 @@ QHostInfo::~QHostInfo()
Example:
- \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 5
+ \snippet code/src_network_kernel_qhostinfo.cpp 5
\sa hostName(), error()
*/
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 6c1ee0ef42..50bf670e7e 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -59,14 +59,14 @@
network-enabled applications that you have written should
automatically support network proxy using the following code.
- \snippet doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp 0
+ \snippet code/src_network_kernel_qnetworkproxy.cpp 0
An alternative to setting an application wide proxy is to specify
the proxy for individual sockets using QAbstractSocket::setProxy()
and QTcpServer::setProxy(). In this way, it is possible to disable
the use of a proxy for specific sockets using the following code:
- \snippet doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp 1
+ \snippet code/src_network_kernel_qnetworkproxy.cpp 1
Network proxy is not used if the address used in \l
{QAbstractSocket::connectToHost()}{connectToHost()}, \l
@@ -800,7 +800,7 @@ QList<QByteArray> QNetworkProxy::rawHeaderList() const
the corresponding "cooked" header will be set as well.
For example:
- \snippet doc/src/snippets/code/src_network_access_qnetworkrequest.cpp 0
+ \snippet code/src_network_access_qnetworkrequest.cpp 0
will also set the known header LastModifiedHeader to be the
QDateTime object of the parsed date.
diff --git a/src/network/network.pro b/src/network/network.pro
index a6597338f5..3e1bc6d4e5 100644
--- a/src/network/network.pro
+++ b/src/network/network.pro
@@ -24,9 +24,11 @@ load(qt_module_config)
HEADERS += $$QT_SOURCE_TREE/src/network/qtnetworkversion.h
+QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
include(access/access.pri)
include(bearer/bearer.pri)
-include(doc/doc.pri)
include(kernel/kernel.pri)
include(socket/socket.pri)
include(ssl/ssl.pri)
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 9d95d3a70e..9a974c1326 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -142,7 +142,7 @@
We show an example:
- \snippet doc/src/snippets/network/tcpwait.cpp 0
+ \snippet network/tcpwait.cpp 0
If \l{QIODevice::}{waitForReadyRead()} returns false, the
connection has been closed or an error has occurred.
@@ -1937,7 +1937,7 @@ static int qt_timeout_value(int msecs, int elapsed)
The following example waits up to one second for a connection
to be established:
- \snippet doc/src/snippets/code/src_network_socket_qabstractsocket.cpp 0
+ \snippet code/src_network_socket_qabstractsocket.cpp 0
If msecs is -1, this function will not time out.
@@ -2182,7 +2182,7 @@ bool QAbstractSocket::waitForBytesWritten(int msecs)
The following example waits up to one second for a connection
to be closed:
- \snippet doc/src/snippets/code/src_network_socket_qabstractsocket.cpp 1
+ \snippet code/src_network_socket_qabstractsocket.cpp 1
If msecs is -1, this function will not time out.
@@ -2285,7 +2285,7 @@ bool QAbstractSocket::isSequential() const
This function is most commonly used when reading data from the
socket in a loop. For example:
- \snippet doc/src/snippets/code/src_network_socket_qabstractsocket.cpp 2
+ \snippet code/src_network_socket_qabstractsocket.cpp 2
\sa bytesAvailable(), readyRead()
*/
@@ -2873,7 +2873,7 @@ void QAbstractSocket::setSocketError(SocketError socketError)
To disable the use of a proxy for this socket, use the
QNetworkProxy::NoProxy proxy type:
- \snippet doc/src/snippets/code/src_network_socket_qabstractsocket.cpp 3
+ \snippet code/src_network_socket_qabstractsocket.cpp 3
The default value for the proxy is QNetworkProxy::DefaultProxy,
which means the socket will use the application settings: if a
diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp
index ced7bba09b..9947f3d16e 100644
--- a/src/network/socket/qlocalsocket.cpp
+++ b/src/network/socket/qlocalsocket.cpp
@@ -255,7 +255,7 @@ QT_BEGIN_NAMESPACE
The following example waits up to one second for a connection
to be established:
- \snippet doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp 0
+ \snippet code/src_network_socket_qlocalsocket_unix.cpp 0
If \a msecs is -1, this function will not time out.
@@ -274,7 +274,7 @@ QT_BEGIN_NAMESPACE
The following example waits up to one second for a connection
to be closed:
- \snippet doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp 1
+ \snippet code/src_network_socket_qlocalsocket_unix.cpp 1
If \a msecs is -1, this function will not time out.
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index 8fac3613c0..f2e2f692ac 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -494,7 +494,7 @@ qintptr QNativeSocketEngine::socketDescriptor() const
waitForWrite().
Example:
- \snippet doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp 0
+ \snippet code/src_network_socket_qnativesocketengine.cpp 0
Otherwise, error() should be called to determine the cause of the
error.
@@ -590,7 +590,7 @@ bool QNativeSocketEngine::bind(const QHostAddress &address, quint16 port)
the blocking function waitForRead().
Example:
- \snippet doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp 1
+ \snippet code/src_network_socket_qnativesocketengine.cpp 1
\sa bind(), accept()
*/
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 42f0056524..9cca943189 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -654,7 +654,7 @@ QString QTcpServer::errorString() const
To disable the use of a proxy for this socket, use the
QNetworkProxy::NoProxy proxy type:
- \snippet doc/src/snippets/code/src_network_socket_qtcpserver.cpp 0
+ \snippet code/src_network_socket_qtcpserver.cpp 0
\sa proxy(), QNetworkProxy
*/
diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp
index 23c1956ec5..8e3c427d45 100644
--- a/src/network/socket/qudpsocket.cpp
+++ b/src/network/socket/qudpsocket.cpp
@@ -75,7 +75,7 @@
Example:
- \snippet doc/src/snippets/code/src_network_socket_qudpsocket.cpp 0
+ \snippet code/src_network_socket_qudpsocket.cpp 0
QUdpSocket also supports UDP multicast. Use joinMulticastGroup() and
leaveMulticastGroup() to control group membership, and
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 1fc84cbec1..ba07e7ef06 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -834,7 +834,7 @@ QByteArray QSslCertificate::toText() const
Example:
- \snippet doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp 0
+ \snippet code/src_network_ssl_qsslcertificate.cpp 0
\sa fromData()
*/
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index ec49c0f56e..bdd10e7834 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -102,7 +102,7 @@ const QSsl::SslOptions QSslConfigurationPrivate::defaultSslOptions = QSsl::SslOp
achieve that. The following example illustrates how to change the
protocol to TLSv1_0 in a QSslSocket object:
- \snippet doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp 0
+ \snippet code/src_network_ssl_qsslconfiguration.cpp 0
\sa QSsl::SslProtocol, QSslCertificate, QSslCipher, QSslKey
QSslSocket, QNetworkAccessManager,
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index a041a2aaf1..936f46d95f 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -71,7 +71,7 @@
This method starts an immediate SSL handshake once the connection
has been established.
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 0
+ \snippet code/src_network_ssl_qsslsocket.cpp 0
As with a plain QTcpSocket, QSslSocket enters the HostLookupState,
ConnectingState, and finally the ConnectedState, if the connection
@@ -94,7 +94,7 @@
the existing one passed in. It then initiates the SSL handshake
by calling startServerEncryption().
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 1
+ \snippet code/src_network_ssl_qsslsocket.cpp 1
If an error occurs, QSslSocket emits the sslErrors() signal. In this
case, if no action is taken to ignore the error(s), the connection
@@ -122,7 +122,7 @@
waitForEncrypted(), which will block the calling thread until an
encrypted connection has been established.
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 2
+ \snippet code/src_network_ssl_qsslsocket.cpp 2
QSslSocket provides an extensive, easy-to-use API for handling
cryptographic ciphers, private keys, and local, peer, and
@@ -397,7 +397,7 @@ void QSslSocket::resume()
If the SSL handshake is successful, QSslSocket emits encrypted().
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 3
+ \snippet code/src_network_ssl_qsslsocket.cpp 3
\b{Note:} The example above shows that text can be written to
the socket immediately after requesting the encrypted connection,
@@ -1149,7 +1149,7 @@ void QSslSocket::setCiphers(const QList<QSslCipher> &ciphers)
is a colon-separated list of cipher suite names. The ciphers are listed in
order of preference, starting with the most preferred cipher. For example:
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 4
+ \snippet code/src_network_ssl_qsslsocket.cpp 4
Each cipher name in \a ciphers must be the name of a cipher in the
list returned by supportedCiphers(). Restricting the cipher suite
@@ -1438,7 +1438,7 @@ bool QSslSocket::waitForConnected(int msecs)
The following example waits up to one second for the socket to be
encrypted:
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 5
+ \snippet code/src_network_ssl_qsslsocket.cpp 5
If msecs is -1, this function will not time out.
@@ -1736,7 +1736,7 @@ void QSslSocket::ignoreSslErrors()
If, for instance, you want to connect to a server that uses
a self-signed certificate, consider the following snippet:
- \snippet doc/src/snippets/code/src_network_ssl_qsslsocket.cpp 6
+ \snippet code/src_network_ssl_qsslsocket.cpp 6
Multiple calls to this function will replace the list of errors that
were passed in previous calls.
diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf
new file mode 100644
index 0000000000..f631f03b90
--- /dev/null
+++ b/src/opengl/doc/qtopengl.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtOpenGL
+description = Qt OpenGL Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtopengl
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtOpenGL
+
+qhp.QtOpenGL.file = qtopengl.qhp
+qhp.QtOpenGL.namespace = org.qt-project.qtopengl.500
+qhp.QtOpenGL.virtualFolder = qdoc
+qhp.QtOpenGL.indexTitle = Qt OpenGL Reference Documentation
+qhp.QtOpenGL.indexRoot =
+
+qhp.QtOpenGL.filterAttributes = qtopengl 5.0.0 qtrefdoc
+qhp.QtOpenGL.customFilters.Qt.name = QtOpenGL 5.0.0
+qhp.QtOpenGL.customFilters.Qt.filterAttributes = qtopengl 5.0.0
+qhp.QtOpenGL.subprojects = classes overviews examples
+qhp.QtOpenGL.subprojects.classes.title = Classes
+qhp.QtOpenGL.subprojects.classes.indexTitle = Qt OpenGL's Classes
+qhp.QtOpenGL.subprojects.classes.selectors = class fake:headerfile
+qhp.QtOpenGL.subprojects.classes.sortPages = true
+qhp.QtOpenGL.subprojects.overviews.title = Overviews
+qhp.QtOpenGL.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtOpenGL.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtOpenGL.subprojects.examples.title = Qt OpenGL Examples
+qhp.QtOpenGL.subprojects.examples.indexTitle = Qt OpenGL Examples
+qhp.QtOpenGL.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qtopengl
+tagfile = ../../../doc/qtopengl/qtopengl.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore qtgui qtwidgets
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/src/opengl/doc/snippets/code/doc_src_qtopengl.cpp b/src/opengl/doc/snippets/code/doc_src_qtopengl.cpp
new file mode 100644
index 0000000000..d14a1ede1a
--- /dev/null
+++ b/src/opengl/doc/snippets/code/doc_src_qtopengl.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtOpenGL>
+//! [0]
diff --git a/src/opengl/doc/snippets/code/doc_src_qtopengl.pro b/src/opengl/doc/snippets/code/doc_src_qtopengl.pro
new file mode 100644
index 0000000000..72adc2140b
--- /dev/null
+++ b/src/opengl/doc/snippets/code/doc_src_qtopengl.pro
@@ -0,0 +1,3 @@
+#! [1]
+QT += opengl
+#! [1]
diff --git a/doc/src/snippets/code/src_opengl_qgl.cpp b/src/opengl/doc/snippets/code/src_opengl_qgl.cpp
index 4adc126159..4adc126159 100644
--- a/doc/src/snippets/code/src_opengl_qgl.cpp
+++ b/src/opengl/doc/snippets/code/src_opengl_qgl.cpp
diff --git a/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/src/opengl/doc/snippets/code/src_opengl_qglcolormap.cpp
index 04384c1af8..04384c1af8 100644
--- a/doc/src/snippets/code/src_opengl_qglcolormap.cpp
+++ b/src/opengl/doc/snippets/code/src_opengl_qglcolormap.cpp
diff --git a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp b/src/opengl/doc/snippets/code/src_opengl_qglpixelbuffer.cpp
index e44ac23d1a..e44ac23d1a 100644
--- a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
+++ b/src/opengl/doc/snippets/code/src_opengl_qglpixelbuffer.cpp
diff --git a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/src/opengl/doc/snippets/code/src_opengl_qglshaderprogram.cpp
index d0474c1899..d0474c1899 100644
--- a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/src/opengl/doc/snippets/code/src_opengl_qglshaderprogram.cpp
diff --git a/src/opengl/doc/src/qtopengl.qdoc b/src/opengl/doc/src/qtopengl.qdoc
new file mode 100644
index 0000000000..0fa28eed8c
--- /dev/null
+++ b/src/opengl/doc/src/qtopengl.qdoc
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtOpenGL
+ \title QtOpenGL Module
+ \ingroup modules
+ \ingroup technology-apis
+
+ \brief The QtOpenGL module offers classes that make it easy to
+ use OpenGL in Qt applications.
+
+ OpenGL is a standard API for rendering 3D graphics. OpenGL only
+ deals with 3D rendering and provides little or no support for GUI
+ programming issues. The user interface for an OpenGL application
+ must be created with another toolkit, such as Motif on the X
+ platform, Microsoft Foundation Classes (MFC) under Windows, or Qt
+ on both platforms.
+
+ \note OpenGL is a trademark of Silicon Graphics, Inc. in
+ the United States and other countries.
+
+ The Qt OpenGL module makes it easy to use OpenGL in Qt applications.
+ It provides an OpenGL widget class that can be used just like any
+ other Qt widget, except that it opens an OpenGL display buffer where
+ you can use the OpenGL API to render the contents.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet code/doc_src_qtopengl.cpp 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet code/doc_src_qtopengl.pro 1
+
+ The Qt OpenGL module is implemented as a platform-independent Qt/C++
+ wrapper around the platform-dependent GLX (version 1.3 or later),
+ WGL, or AGL C APIs. Although the basic functionality provided is very
+ similar to Mark Kilgard's GLUT library, applications using the Qt
+ OpenGL module can take advantage of the whole Qt API for
+ non-OpenGL-specific GUI functionality.
+*/
+
+
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index b2b3790b29..f1589694a8 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -24,6 +24,9 @@ contains(QT_CONFIG, opengles1):CONFIG += opengles1
contains(QT_CONFIG, opengles2):CONFIG += opengles2
contains(QT_CONFIG, egl):CONFIG += egl
+QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
HEADERS += qgl.h \
qgl_p.h \
qglcolormap.h \
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index d298777c30..263aa639a7 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -208,15 +208,15 @@ QGLSignalProxy *QGLSignalProxy::instance()
There are different ways to define the display characteristics of
a rendering context. One is to create a QGLFormat and make it the
default for the entire application:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 0
+ \snippet code/src_opengl_qgl.cpp 0
Or you can specify the desired format when creating an object of
your QGLWidget subclass:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 1
+ \snippet code/src_opengl_qgl.cpp 1
After the widget has been created, you can find out which of the
requested features the system was able to provide:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 2
+ \snippet code/src_opengl_qgl.cpp 2
\legalese
OpenGL is a trademark of Silicon Graphics, Inc. in the
@@ -305,7 +305,7 @@ QGLFormat::QGLFormat()
This constructor makes it easy to specify a certain desired format
in classes derived from QGLWidget, for example:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 3
+ \snippet code/src_opengl_qgl.cpp 3
Note that there are QGL::FormatOption values to turn format settings
both on and off, e.g. QGL::DepthBuffer and QGL::NoDepthBuffer,
@@ -1323,7 +1323,7 @@ QGLFormat QGLFormat::defaultFormat()
Sets a new default QGLFormat for the application to \a f. For
example, to set single buffering as the default instead of double
buffering, your main() might contain code like this:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 4
+ \snippet code/src_opengl_qgl.cpp 4
\sa defaultFormat()
*/
@@ -1368,13 +1368,13 @@ QGLFormat QGLFormat::defaultOverlayFormat()
For example, to get a double buffered overlay context (if
available), use code like this:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 5
+ \snippet code/src_opengl_qgl.cpp 5
As usual, you can find out after widget creation whether the
underlying OpenGL system was able to provide the requested
specification:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 6
+ \snippet code/src_opengl_qgl.cpp 6
\sa defaultOverlayFormat()
*/
@@ -2808,7 +2808,7 @@ int QGLContext::textureCacheLimit()
Call create() to create a new GL context that tries to match the
new format.
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 7
+ \snippet code/src_opengl_qgl.cpp 7
\sa format(), reset(), create()
*/
@@ -3226,7 +3226,7 @@ void QGLContextPrivate::setCurrentContext(QGLContext *context)
Here is a rough outline of how a QGLWidget subclass might look:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 8
+ \snippet code/src_opengl_qgl.cpp 8
If you need to trigger a repaint from places other than paintGL()
(a typical example is when using \link QTimer timers\endlink to
diff --git a/src/opengl/qglcolormap.cpp b/src/opengl/qglcolormap.cpp
index 6698de52b2..92552fe41c 100644
--- a/src/opengl/qglcolormap.cpp
+++ b/src/opengl/qglcolormap.cpp
@@ -69,7 +69,7 @@
optimization.
Example of use:
- \snippet doc/src/snippets/code/src_opengl_qglcolormap.cpp 0
+ \snippet code/src_opengl_qglcolormap.cpp 0
\sa QGLWidget::setColormap(), QGLWidget::colormap()
*/
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index bccac7e9a0..ca7568d78e 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -257,7 +257,7 @@ bool QGLPixelBuffer::doneCurrent()
Example:
- \snippet doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp 0
+ \snippet code/src_opengl_qglpixelbuffer.cpp 0
\warning This function uses the \c {render_texture} extension,
which is currently not supported under X11. An alternative that
@@ -292,7 +292,7 @@ bool QGLPixelBuffer::doneCurrent()
Example:
- \snippet doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp 1
+ \snippet code/src_opengl_qglpixelbuffer.cpp 1
An alternative on Windows and Mac OS X systems that support the
\c render_texture extension is to use bindToDynamicTexture() to
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index ab5fa6a747..e73e63f6a3 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE
program is activated in the current QGLContext by calling
QGLShaderProgram::bind():
- \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 0
+ \snippet code/src_opengl_qglshaderprogram.cpp 0
\section1 Writing portable shaders
@@ -97,12 +97,12 @@ QT_BEGIN_NAMESPACE
\section1 Simple shader example
- \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 1
+ \snippet code/src_opengl_qglshaderprogram.cpp 1
With the above shader program active, we can draw a green triangle
as follows:
- \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 2
+ \snippet code/src_opengl_qglshaderprogram.cpp 2
\section1 Binary shaders and programs
diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp
index 4e3586f646..841a9e688e 100644
--- a/src/printsupport/dialogs/qabstractprintdialog.cpp
+++ b/src/printsupport/dialogs/qabstractprintdialog.cpp
@@ -379,7 +379,7 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
Typically, QPrintDialog objects are constructed with a QPrinter
object, and executed using the exec() function.
- \snippet doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp 0
+ \snippet code/src_gui_dialogs_qabstractprintdialog.cpp 0
If the dialog is accepted by the user, the QPrinter object is
correctly configured for printing.
diff --git a/src/printsupport/doc/images/plastique-printdialog-properties.png b/src/printsupport/doc/images/plastique-printdialog-properties.png
new file mode 100644
index 0000000000..38c1ae7038
--- /dev/null
+++ b/src/printsupport/doc/images/plastique-printdialog-properties.png
Binary files differ
diff --git a/src/printsupport/doc/images/plastique-printdialog.png b/src/printsupport/doc/images/plastique-printdialog.png
new file mode 100644
index 0000000000..3f8af01790
--- /dev/null
+++ b/src/printsupport/doc/images/plastique-printdialog.png
Binary files differ
diff --git a/src/printsupport/doc/images/printer-rects.png b/src/printsupport/doc/images/printer-rects.png
new file mode 100644
index 0000000000..8ebea60da8
--- /dev/null
+++ b/src/printsupport/doc/images/printer-rects.png
Binary files differ
diff --git a/src/printsupport/doc/qtprintsupport.qdocconf b/src/printsupport/doc/qtprintsupport.qdocconf
new file mode 100644
index 0000000000..a21639bbc9
--- /dev/null
+++ b/src/printsupport/doc/qtprintsupport.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtPrintSupport
+description = Qt Print Support Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtprintsupport
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtPrintSupport
+
+qhp.QtPrintSupport.file = qtprintsupport.qhp
+qhp.QtPrintSupport.namespace = org.qt-project.qtprintsupport.500
+qhp.QtPrintSupport.virtualFolder = qdoc
+qhp.QtPrintSupport.indexTitle = Qt Print Support Reference Documentation
+qhp.QtPrintSupport.indexRoot =
+
+qhp.QtPrintSupport.filterAttributes = qtprintsupport 5.0.0 qtrefdoc
+qhp.QtPrintSupport.customFilters.Qt.name = QtPrintSupport 5.0.0
+qhp.QtPrintSupport.customFilters.Qt.filterAttributes = qtprintsupport 5.0.0
+qhp.QtPrintSupport.subprojects = classes overviews examples
+qhp.QtPrintSupport.subprojects.classes.title = Classes
+qhp.QtPrintSupport.subprojects.classes.indexTitle = Qt Print Support's Classes
+qhp.QtPrintSupport.subprojects.classes.selectors = class fake:headerfile
+qhp.QtPrintSupport.subprojects.classes.sortPages = true
+qhp.QtPrintSupport.subprojects.overviews.title = Overviews
+qhp.QtPrintSupport.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtPrintSupport.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtPrintSupport.subprojects.examples.title = Qt Print Support Examples
+qhp.QtPrintSupport.subprojects.examples.indexTitle = Qt Print Support Examples
+qhp.QtPrintSupport.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qtprintsupport
+tagfile = ../../../doc/qtprintsupport/qtprintsupport.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore qtgui qtwidgets
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp
new file mode 100644
index 0000000000..ca022c4cd5
--- /dev/null
+++ b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [1]
+#include <QtPrintSupport>
+//! [1]
diff --git a/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro
new file mode 100644
index 0000000000..39dd838120
--- /dev/null
+++ b/src/printsupport/doc/snippets/code/doc_src_qtprintsupport.pro
@@ -0,0 +1,3 @@
+#! [0]
+QT += printsupport
+#! [0]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp b/src/printsupport/doc/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
index 41a6e1e622..41a6e1e622 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
+++ b/src/printsupport/doc/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
diff --git a/doc/src/snippets/printing-qprinter/errors.cpp b/src/printsupport/doc/snippets/printing-qprinter/errors.cpp
index f202d4f6a1..f202d4f6a1 100644
--- a/doc/src/snippets/printing-qprinter/errors.cpp
+++ b/src/printsupport/doc/snippets/printing-qprinter/errors.cpp
diff --git a/doc/src/snippets/printing-qprinter/object.cpp b/src/printsupport/doc/snippets/printing-qprinter/object.cpp
index 4125c9757c..4125c9757c 100644
--- a/doc/src/snippets/printing-qprinter/object.cpp
+++ b/src/printsupport/doc/snippets/printing-qprinter/object.cpp
diff --git a/doc/src/snippets/widgetprinting.cpp b/src/printsupport/doc/snippets/widgetprinting.cpp
index bf0f005ba2..bf0f005ba2 100644
--- a/doc/src/snippets/widgetprinting.cpp
+++ b/src/printsupport/doc/snippets/widgetprinting.cpp
diff --git a/doc/src/printsupport/printing.qdoc b/src/printsupport/doc/src/printing.qdoc
index 5447032a2b..cc79b41704 100644
--- a/doc/src/printsupport/printing.qdoc
+++ b/src/printsupport/doc/src/printing.qdoc
@@ -74,7 +74,7 @@
a QPrintDialog, allowing the user to specify the printer to use, paper size, and
other printing properties.
- \snippet examples/richtext/orderform/mainwindow.cpp 18
+ \snippet richtext/orderform/mainwindow.cpp 18
It is also possible to set certain default properties by modifying the QPrinter
before it is supplied to the print dialog. For example, applications that
@@ -88,7 +88,7 @@
to perform painting operations on it. We can construct and set up a painter in
the following way:
- \snippet doc/src/snippets/printing-qprinter/object.cpp 0
+ \snippet printing-qprinter/object.cpp 0
Since the QPrinter starts with a blank page, we only need to call the
\l{QPrinter::}{newPage()} function after drawing each page, except for the
@@ -143,7 +143,7 @@
will have to scale the painter. You may also want to position the widget on the
page. The following code sample shows how this may look.
- \snippet doc/src/snippets/widgetprinting.cpp 0
+ \snippet widgetprinting.cpp 0
This will center the widget on the page and scale it so that it fits the page.
diff --git a/doc/src/printsupport/qtprintsupport.qdoc b/src/printsupport/doc/src/qtprintsupport.qdoc
index 7eea8203aa..d6ba0c88f0 100644
--- a/doc/src/printsupport/qtprintsupport.qdoc
+++ b/src/printsupport/doc/src/qtprintsupport.qdoc
@@ -36,11 +36,11 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtprintsupport.cpp 1
+ \snippet code/doc_src_qtprintsupport.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtprintsupport.pro 0
+ \snippet code/doc_src_qtprintsupport.pro 0
*/
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index 4929b3308e..d7a2a302e4 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -740,7 +740,7 @@ void QPrinter::setPrinterName(const QString &name)
To detect other failures check the output of QPainter::begin() or QPrinter::newPage().
- \snippet doc/src/snippets/printing-qprinter/errors.cpp 0
+ \snippet printing-qprinter/errors.cpp 0
\sa setPrinterName()
*/
diff --git a/src/printsupport/printsupport.pro b/src/printsupport/printsupport.pro
index 0aa92a95de..9002ba3996 100644
--- a/src/printsupport/printsupport.pro
+++ b/src/printsupport/printsupport.pro
@@ -15,6 +15,9 @@ load(qt_module_config)
HEADERS += $$QT_SOURCE_TREE/src/printsupport/qtprintsupportversion.h
+QMAKE_DOCS = $$PWD/doc/qtprintsupport.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
QMAKE_LIBS += $$QMAKE_LIBS_PRINTSUPPORT
include(kernel/kernel.pri)
diff --git a/src/sql/doc/doc.pri b/src/sql/doc/doc.pri
deleted file mode 100644
index 2bc2e005d4..0000000000
--- a/src/sql/doc/doc.pri
+++ /dev/null
@@ -1,3 +0,0 @@
-qtPrepareTool(QDOC, qdoc)
-docs.commands += $$QDOC $$QT.sql.sources/doc/qtsql.qdocconf
-QMAKE_EXTRA_TARGETS += docs
diff --git a/src/sql/sql.pro b/src/sql/sql.pro
index e3f81f3498..c2345d92ef 100644
--- a/src/sql/sql.pro
+++ b/src/sql/sql.pro
@@ -21,7 +21,9 @@ DEFINES += QT_NO_CAST_FROM_ASCII
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
SQL_P = sql
-include(doc/doc.pri)
+QMAKE_DOCS = $$PWD/doc/qtsql.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
include(kernel/kernel.pri)
include(drivers/drivers.pri)
include(models/models.pri)
diff --git a/src/testlib/doc/qttest.qdocconf b/src/testlib/doc/qttest.qdocconf
new file mode 100644
index 0000000000..5f9ea96a28
--- /dev/null
+++ b/src/testlib/doc/qttest.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtTest
+description = Qt Test Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qttest
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtTest
+
+qhp.QtTest.file = qttest.qhp
+qhp.QtTest.namespace = org.qt-project.qttest.500
+qhp.QtTest.virtualFolder = qdoc
+qhp.QtTest.indexTitle = Qt Test Reference Documentation
+qhp.QtTest.indexRoot =
+
+qhp.QtTest.filterAttributes = qttest 5.0.0 qtrefdoc
+qhp.QtTest.customFilters.Qt.name = QtTest 5.0.0
+qhp.QtTest.customFilters.Qt.filterAttributes = qttest 5.0.0
+qhp.QtTest.subprojects = classes overviews examples
+qhp.QtTest.subprojects.classes.title = Classes
+qhp.QtTest.subprojects.classes.indexTitle = Qt Test's Classes
+qhp.QtTest.subprojects.classes.selectors = class fake:headerfile
+qhp.QtTest.subprojects.classes.sortPages = true
+qhp.QtTest.subprojects.overviews.title = Overviews
+qhp.QtTest.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtTest.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtTest.subprojects.examples.title = Qt Test Examples
+qhp.QtTest.subprojects.examples.indexTitle = Qt Test Examples
+qhp.QtTest.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qttest
+tagfile = ../../../doc/qttest/qttest.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/doc/src/snippets/code/doc_src_qsignalspy.cpp b/src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp
index a957285cea..a957285cea 100644
--- a/doc/src/snippets/code/doc_src_qsignalspy.cpp
+++ b/src/testlib/doc/snippets/code/doc_src_qsignalspy.cpp
diff --git a/doc/src/snippets/code/doc_src_qtestevent.cpp b/src/testlib/doc/snippets/code/doc_src_qtestevent.cpp
index 787a8e666b..787a8e666b 100644
--- a/doc/src/snippets/code/doc_src_qtestevent.cpp
+++ b/src/testlib/doc/snippets/code/doc_src_qtestevent.cpp
diff --git a/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp b/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp
new file mode 100644
index 0000000000..8bad7cca48
--- /dev/null
+++ b/src/testlib/doc/snippets/code/doc_src_qtestlib.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+class MyFirstTest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase()
+ { qDebug("called before everything else"); }
+ void myFirstTest()
+ { QVERIFY(1 == 1); }
+ void mySecondTest()
+ { QVERIFY(1 != 2); }
+ void cleanupTestCase()
+ { qDebug("called after myFirstTest and mySecondTest"); }
+};
+//! [0]
+
+
+//! [8]
+void TestQString::toUpper()
+{
+ QString str = "Hello";
+ QVERIFY(str.toUpper() == "HELLO");
+}
+//! [8]
+
+
+//! [11]
+QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("Hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HellO").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HELLO").toUpper(), QString("HELLO"));
+//! [11]
+
+//! [12]
+class MyFirstBenchmark: public QObject
+{
+ Q_OBJECT
+private slots:
+ void myFirstBenchmark()
+ {
+ QString string1;
+ QString string2;
+ QBENCHMARK {
+ string1.localeAwareCompare(string2);
+ }
+ }
+};
+//! [12]
diff --git a/src/testlib/doc/snippets/code/doc_src_qtestlib.pro b/src/testlib/doc/snippets/code/doc_src_qtestlib.pro
new file mode 100644
index 0000000000..c514d26075
--- /dev/null
+++ b/src/testlib/doc/snippets/code/doc_src_qtestlib.pro
@@ -0,0 +1,7 @@
+#! [1]
+QT += testlib
+#! [1]
+
+#! [2]
+CONFIG += testcase
+#! [2]
diff --git a/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc b/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc
new file mode 100644
index 0000000000..05759b0ccb
--- /dev/null
+++ b/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [2]
+testname [options] [testfunctions[:testdata]]...
+//! [2]
+
+
+//! [3]
+/myTestDirectory$ testQString toUpper
+//! [3]
+
+
+//! [4]
+/myTestDirectory$ testQString toUpper toInt:zero
+//! [4]
+
+
+//! [5]
+/myTestDirectory$ testMyWidget -vs -eventdelay 500
+//! [5]
+
+
+//! [6]
+cetest [options] ...
+//! [6]
+
+
+//! [7]
+set INCLUDE=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc;%INCLUDE%
+set LIB=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Lib;%LIB%
+//! [7]
+
+
+//! [9]
+/myTestDirectory$ qmake -project "QT += testlib"
+/myTestDirectory$ qmake
+/myTestDirectory$ make
+//! [9]
+
+
+//! [10]
+********* Start testing of TestQString *********
+Config: Using QTest library %VERSION%, Qt %VERSION%
+PASS : TestQString::initTestCase()
+PASS : TestQString::toUpper()
+PASS : TestQString::cleanupTestCase()
+Totals: 3 passed, 0 failed, 0 skipped
+********* Finished testing of TestQString *********
+//! [10]
diff --git a/src/testlib/doc/snippets/code/doc_src_qttest.cpp b/src/testlib/doc/snippets/code/doc_src_qttest.cpp
new file mode 100644
index 0000000000..21860fd7c4
--- /dev/null
+++ b/src/testlib/doc/snippets/code/doc_src_qttest.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtTest>
+//! [0]
diff --git a/src/testlib/doc/snippets/code/doc_src_qttest.pro b/src/testlib/doc/snippets/code/doc_src_qttest.pro
new file mode 100644
index 0000000000..62b8fb064c
--- /dev/null
+++ b/src/testlib/doc/snippets/code/doc_src_qttest.pro
@@ -0,0 +1,3 @@
+#! [1]
+QT += testlib
+#! [1]
diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp
index 2c6565edf5..2c6565edf5 100644
--- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
+++ b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp
diff --git a/src/testlib/doc/src/qttest.qdoc b/src/testlib/doc/src/qttest.qdoc
new file mode 100644
index 0000000000..b1242202a8
--- /dev/null
+++ b/src/testlib/doc/src/qttest.qdoc
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtTest
+ \title QtTest Module
+ \ingroup modules
+
+ \keyword QtTest
+
+ \brief The QtTest module provides classes for unit testing Qt applications and libraries.
+
+ Applications that use Qt's unit testing classes need to
+ be configured to be built against the QtTest module.
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet code/doc_src_qttest.cpp 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet code/doc_src_qttest.pro 1
+
+ See the \l{QTestLib Manual} for a detailed introduction on how to use
+ Qt's unit testing features with your applications.
+
+ The QtTest module is part of all \l{Qt editions}.
+*/
+
diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc
new file mode 100644
index 0000000000..06b1ea7861
--- /dev/null
+++ b/src/testlib/doc/src/qttestlib-manual.qdoc
@@ -0,0 +1,840 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtestlib-manual.html
+ \title QTestLib Manual
+ \brief An overview of Qt's unit testing framework.
+
+ \ingroup frameworks-technologies
+ \ingroup qt-basic-concepts
+
+ \keyword qtestlib
+
+ The QTestLib framework, provided by Nokia, is a tool for unit
+ testing Qt based applications and libraries. QTestLib provides
+ all the functionality commonly found in unit testing frameworks as
+ well as extensions for testing graphical user interfaces.
+
+ \section1 QTestLib Features
+
+ QTestLib is designed to ease the writing of unit tests for Qt
+ based applications and libraries:
+
+ \table
+ \header \li Feature \li Details
+ \row
+ \li \b Lightweight
+ \li QTestLib consists of about 6000 lines of code and 60
+ exported symbols.
+ \row
+ \li \b Self-contained
+ \li QTestLib requires only a few symbols from the Qt Core library
+ for non-gui testing.
+ \row
+ \li \b {Rapid testing}
+ \li QTestLib needs no special test-runners; no special
+ registration for tests.
+ \row
+ \li \b {Data-driven testing}
+ \li A test can be executed multiple times with different test data.
+ \row
+ \li \b {Basic GUI testing}
+ \li QTestLib offers functionality for mouse and keyboard simulation.
+ \row
+ \li \b {Benchmarking}
+ \li QTestLib supports benchmarking and provides several measurement back-ends.
+ \row
+ \li \b {IDE friendly}
+ \li QTestLib outputs messages that can be interpreted by Visual
+ Studio and KDevelop.
+ \row
+ \li \b Thread-safety
+ \li The error reporting is thread safe and atomic.
+ \row
+ \li \b Type-safety
+ \li Extensive use of templates prevent errors introduced by
+ implicit type casting.
+ \row
+ \li \b {Easily extendable}
+ \li Custom types can easily be added to the test data and test output.
+ \endtable
+
+ \note For higher-level GUI and application testing needs, please
+ see the \l{Partner Directory} for Qt testing products provided by
+ Nokia partners.
+
+
+ \section1 QTestLib API
+
+ All public methods are in the \l QTest namespace. In addition, the
+ \l QSignalSpy class provides easy introspection for Qt's signals and slots.
+
+
+ \section1 Using QTestLib
+
+ \section2 Creating a Test
+
+ To create a test, subclass QObject and add one or more private slots to it. Each
+ private slot is a testfunction in your test. QTest::qExec() can be used to execute
+ all testfunctions in the test object.
+
+ In addition, there are four private slots that are \e not treated as testfunctions.
+ They will be executed by the testing framework and can be used to initialize and
+ clean up either the entire test or the current test function.
+
+ \list
+ \li \c{initTestCase()} will be called before the first testfunction is executed.
+ \li \c{cleanupTestCase()} will be called after the last testfunction was executed.
+ \li \c{init()} will be called before each testfunction is executed.
+ \li \c{cleanup()} will be called after every testfunction.
+ \endlist
+
+ If \c{initTestCase()} fails, no testfunction will be executed. If \c{init()} fails,
+ the following testfunction will not be executed, the test will proceed to the next
+ testfunction.
+
+ Example:
+ \snippet code/doc_src_qtestlib.cpp 0
+
+ For more examples, refer to the \l{QTestLib Tutorial}.
+
+ \section2 Building a Test
+
+ If you are using \c qmake as your build tool, just add the
+ following to your project file:
+
+ \snippet code/doc_src_qtestlib.pro 1
+
+ If you would like to run the test via \c{make check}, add the
+ additional line:
+
+ \snippet code/doc_src_qtestlib.pro 2
+
+ See \l{qmake Common Projects#building-a-testcase}{the qmake manual} for
+ more information about \c{make check}.
+
+ If you are using other build tools, make sure that you add the location
+ of the QTestLib header files to your include path (usually \c{include/QtTest}
+ under your Qt installation directory). If you are using a release build
+ of Qt, link your test to the \c QtTest library. For debug builds, use
+ \c{QtTest_debug}.
+
+ See \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test} for a step by
+ step explanation.
+
+ \section2 QTestLib Command Line Arguments
+
+ \section3 Syntax
+
+ The syntax to execute an autotest takes the following simple form:
+
+ \snippet code/doc_src_qtestlib.qdoc 2
+
+ Substitute \c testname with the name of your executable. \c
+ testfunctions can contain names of test functions to be
+ executed. If no \c testfunctions are passed, all tests are run. If you
+ append the name of an entry in \c testdata, the test function will be
+ run only with that test data.
+
+ For example:
+
+ \snippet code/doc_src_qtestlib.qdoc 3
+
+ Runs the test function called \c toUpper with all available test data.
+
+ \snippet code/doc_src_qtestlib.qdoc 4
+
+ Runs the \c toUpper test function with all available test data,
+ and the \c toInt test function with the testdata called \c
+ zero (if the specified test data doesn't exist, the associated test
+ will fail).
+
+ \snippet code/doc_src_qtestlib.qdoc 5
+
+ Runs the testMyWidget function test, outputs every signal
+ emission and waits 500 milliseconds after each simulated
+ mouse/keyboard event.
+
+ \section3 Options
+
+ \section4 Logging Options
+
+ The following command line options determine how test results are reported:
+
+ \list
+ \li \c -o \e{filename,format} \BR
+ write output to the specified file, in the specified format (one of
+ \c txt, \c xml, \c lightxml or \c xunitxml). The special filename \c -
+ may be used to log to standard output.
+ \li \c -o \e filename \BR
+ write output to the specified file.
+ \li \c -txt \BR
+ outputs results in plain text.
+ \li \c -xml \BR
+ outputs results as an XML document.
+ \li \c -lightxml \BR
+ outputs results as a stream of XML tags.
+ \li \c -xunitxml \BR
+ outputs results as an Xunit XML document.
+ \endlist
+
+ The first version of the \c -o option may be repeated in order to log
+ test results in multiple formats, but no more than one instance of this
+ option can log test results to standard output.
+
+ If the first version of the \c -o option is used, neither the second version
+ of the \c -o option nor the \c -txt, \c -xml, \c -lightxml or \c -xunitxml
+ options should be used.
+
+ If neither version of the \c -o option is used, test results will be logged to
+ standard output. If no format option is used, test results will be logged in
+ plain text.
+
+ \section4 Test Log Detail Options
+
+ The following command line options control how much detail is reported
+ in test logs:
+
+ \list
+ \li \c -silent \BR
+ silent output, only shows fatal errors, test failures and minimal status messages.
+ \li \c -v1 \BR
+ verbose output; shows when each test function is entered.
+ (This option only affects plain text output.)
+ \li \c -v2 \BR
+ extended verbose output; shows each \l QCOMPARE() and \l QVERIFY().
+ (This option affects all output formats and implies \c -v1 for plain text output.)
+ \li \c -vs \BR
+ shows every signal that gets emitted and the slot invocations resulting from those signals.
+ (This option affects all output formats.)
+ \endlist
+
+ \section4 Testing Options
+
+ The following command-line options influence how tests are run:
+
+ \list
+ \li \c -functions \BR
+ outputs all test functions available in the test, then quits.
+ \li \c -datatags \BR
+ outputs all data tags available in the test.
+ A global data tag is preceded by ' __global__ '.
+ \li \c -eventdelay \e ms \BR
+ if no delay is specified for keyboard or mouse simulation
+ (\l QTest::keyClick(),
+ \l QTest::mouseClick() etc.), the value from this parameter
+ (in milliseconds) is substituted.
+ \li \c -keydelay \e ms \BR
+ like -eventdelay, but only influences keyboard simulation and not mouse
+ simulation.
+ \li \c -mousedelay \e ms \BR
+ like -eventdelay, but only influences mouse simulation and not keyboard
+ simulation.
+ \li \c -maxwarnings \e number\BR
+ sets the maximum number of warnings to output. 0 for unlimited, defaults to 2000.
+ \li \c -nocrashhandler \BR
+ disables the crash handler on Unix platforms.
+ \endlist
+
+ \section4 Benchmarking Options
+
+ The following command line options control benchmark testing:
+
+ \list
+ \li \c -callgrind \BR
+ use callgrind to time benchmarks (Linux only).
+ \li \c -tickcounter \BR
+ use CPU tick counters to time benchmarks.
+ \li \c -eventcounter \BR
+ counts events received during benchmarks.
+ \li \c -minimumvalue \e n \BR
+ sets the minimum acceptable measurement value.
+ \li \c -iterations \e n \BR
+ sets the number of accumulation iterations.
+ \li \c -median \e n \BR
+ sets the number of median iterations.
+ \li \c -vb \BR
+ output verbose benchmarking information.
+ \endlist
+
+ \section4 Miscellaneous Options
+
+ \list
+ \li \c -help \BR
+ outputs the possible command line arguments and give some useful help.
+ \endlist
+
+ \section2 Creating a Benchmark
+
+ To create a benchmark, follow the instructions for creating a test and then add a
+ QBENCHMARK macro to the test function that you want to benchmark.
+
+ \snippet code/doc_src_qtestlib.cpp 12
+
+ The code inside the QBENCHMARK macro will be measured, and possibly also repeated
+ several times in order to get an accurate measurement. This depends on the selected
+ measurement back-end. Several back-ends are available. They can be selected on the
+ command line:
+
+ \target testlib-benchmarking-measurement
+
+ \table
+ \header \li Name
+ \li Commmand-line Argument
+ \li Availability
+ \row \li Walltime
+ \li (default)
+ \li All platforms
+ \row \li CPU tick counter
+ \li -tickcounter
+ \li Windows, Mac OS X, Linux, many UNIX-like systems.
+ \row \li Valgrind/Callgrind
+ \li -callgrind
+ \li Linux (if installed)
+ \row \li Event Counter
+ \li -eventcounter
+ \li All platforms
+ \endtable
+
+ In short, walltime is always available but requires many repetitions to
+ get a useful result.
+ Tick counters are usually available and can provide
+ results with fewer repetitions, but can be susceptible to CPU frequency
+ scaling issues.
+ Valgrind provides exact results, but does not take
+ I/O waits into account, and is only available on a limited number of
+ platforms.
+ Event counting is available on all platforms and it provides the number of events
+ that were received by the event loop before they are sent to their corresponding
+ targets (this might include non-Qt events).
+
+ \note Depending on the device configuration, Tick counters on the
+ Windows CE platform may not be as fine-grained, compared to other platforms.
+ Devices that do not support high-resolution timers default to
+ one-millisecond granularity.
+
+ See the chapter 5 in the \l{QTestLib Tutorial} for more benchmarking examples.
+
+ \section1 Using QTestLib remotely on Windows CE
+ \c cetest is a convenience application which helps the user to launch an
+ application remotely on a Windows CE device or emulator.
+
+ It needs to be executed after the unit test has been successfully compiled.
+
+ Prior to launching, the following files are copied to the device:
+
+ \list
+ \li all Qt libraries the project links to
+ \li \l {QtRemote}{QtRemote.dll}
+ \li the c runtime library specified during installation
+ \li all files specified in the \c .pro file following the \l DEPLOYMENT rules.
+ \endlist
+
+ \section2 Using \c cetest
+ \section3 Syntax
+ The syntax to execute an autotest takes the following simple form:
+
+ \snippet code/doc_src_qtestlib.qdoc 6
+
+ \section3 Options
+ \c cetest provides the same options as those for unit-testing on non cross-compiled
+ platforms. See \l {QTestLib Command Line Arguments} {Command Line Arguments} for
+ more information.
+
+ The following commands are also included:
+
+ \list
+ \li \c -debug \BR
+ Test version compiled in debug mode.
+ \li \c -release \BR
+ Test version compiled in release mode.
+ \li \c -libpath \e path \BR
+ Target path to copy Qt libraries to.
+ \li \c -qt-delete \BR
+ Delete Qt libraries after execution.
+ \li \c -project-delete \BR
+ Delete project files after execution.
+ \li \c -delete \BR
+ Delete project and Qt libraries after execution.
+ \li \c -conf \BR
+ Specifies a qt.conf file to be deployed to remote directory.
+ \endlist
+
+ \note \c{debug} is the default build option.
+
+ \section2 QtRemote
+ \c QtRemote is a small library which is build after QTestLib. It allows the host
+ system to create a process on a remote device and waits until its execution has
+ been finished.
+
+ \section2 Requirements
+ \c cetest uses Microsoft ActiveSync to establish a remote connection between the
+ host computer and the device. Thus header files and libraries are needed to compile
+ cetest and QtRemote successfully.
+
+ Prior to \l{Installing Qt for Windows CE}{installation} of Qt, you need to set your
+ \c INCLUDE and \c LIB environment variables properly.
+
+ A default installation of Windows Mobile 5 for Pocket PC can be obtained by:
+
+ \snippet code/doc_src_qtestlib.qdoc 7
+
+ Note that Qt will remember the path, so you do not need to set it again
+ after switching the environments for cross-compilation.
+
+ \section1 3rd Party Code
+
+ The CPU tick counters used for benchmarking is licensed under the following
+ license: (from src/testlib/3rdparty/cycle.h)
+
+ \legalese
+ Copyright (c) 2003, 2006 Matteo Frigo\br
+ Copyright (c) 2003, 2006 Massachusetts Institute of Technology
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ \endlegalese
+*/
+
+/*!
+ \page qtestlib-tutorial.html
+ \brief A short introduction to testing with QTestLib.
+ \contentspage QTestLib Manual
+ \nextpage {Chapter 1: Writing a Unit Test}{Chapter 1}
+ \ingroup best-practices
+
+ \title QTestLib Tutorial
+
+ This tutorial gives a short introduction to how to use some of the
+ features of the QTestLib framework. It is divided into five
+ chapters:
+
+ \list 1
+ \li \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test}
+ \li \l {Chapter 2: Data Driven Testing}{Data Driven Testing}
+ \li \l {Chapter 3: Simulating GUI Events}{Simulating GUI Events}
+ \li \l {Chapter 4: Replaying GUI Events}{Replaying GUI Events}
+ \li \l {Chapter 5: Writing a Benchmark}{Writing a Benchmark}
+ \endlist
+
+*/
+
+
+/*!
+ \example qtestlib/tutorial1
+
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 2: Data Driven Testing}{Chapter 2}
+
+ \title Chapter 1: Writing a Unit Test
+
+ In this first chapter we will see how to write a simple unit test
+ for a class, and how to execute it.
+
+ \section1 Writing a Test
+
+ Let's assume you want to test the behavior of our QString class.
+ First, you need a class that contains your test functions. This class
+ has to inherit from QObject:
+
+ \snippet qtestlib/tutorial1/testqstring.cpp 0
+
+ Note that you need to include the QTest header, and that the
+ test functions have to be declared as private slots so the
+ test framework finds and executes it.
+
+ Then you need to implement the test function itself. The
+ implementation could look like this:
+
+ \snippet code/doc_src_qtestlib.cpp 8
+
+ The \l QVERIFY() macro evaluates the expression passed as its
+ argument. If the expression evaluates to true, the execution of
+ the test function continues. Otherwise, a message describing the
+ failure is appended to the test log, and the test function stops
+ executing.
+
+ But if you want a more verbose output to the test log, you should
+ use the \l QCOMPARE() macro instead:
+
+ \snippet qtestlib/tutorial1/testqstring.cpp 1
+
+ If the strings are not equal, the contents of both strings is
+ appended to the test log, making it immediately visible why the
+ comparison failed.
+
+ Finally, to make our test case a stand-alone executable, the
+ following two lines are needed:
+
+ \snippet qtestlib/tutorial1/testqstring.cpp 2
+
+ The \l QTEST_MAIN() macro expands to a simple \c main()
+ method that runs all the test functions. Note that if both the
+ declaration and the implementation of our test class are in a \c
+ .cpp file, we also need to include the generated moc file to make
+ Qt's introspection work.
+
+ \section1 Executing a Test
+
+ Now that we finished writing our test, we want to execute
+ it. Assuming that our test was saved as \c testqstring.cpp in an
+ empty directory: we build the test using qmake to create a project
+ and generate a makefile.
+
+ \snippet code/doc_src_qtestlib.qdoc 9
+
+ \b {Note:}If you're using windows, replace \c make with \c
+ nmake or whatever build tool you use.
+
+ Running the resulting executable should give you the following
+ output:
+
+ \snippet code/doc_src_qtestlib.qdoc 10
+
+ Congratulations! You just wrote and executed your first unit test
+ using the QTestLib framework.
+*/
+
+/*!
+ \example qtestlib/tutorial2
+
+ \previouspage {Chapter 1: Writing a Unit Test}{Chapter 1}
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 3: Simulating Gui Events}{Chapter 3}
+
+ \title Chapter 2: Data Driven Testing
+
+ In this chapter we will demonstrate how to execute a test
+ multiple times with different test data.
+
+ So far, we have hard coded the data we wanted to test into our
+ test function. If we add more test data, the function might look like
+ this:
+
+ \snippet code/doc_src_qtestlib.cpp 11
+
+ To prevent that the function ends up being cluttered by repetitive
+ code, QTestLib supports adding test data to a test function. All
+ we need is to add another private slot to our test class:
+
+ \snippet qtestlib/tutorial2/testqstring.cpp 0
+
+ \section1 Writing the Data Function
+
+ A test function's associated data function carries the same name,
+ appended by \c{_data}. Our data function looks like this:
+
+ \snippet qtestlib/tutorial2/testqstring.cpp 1
+
+ First, we define the two elements of our test table using the \l
+ QTest::addColumn() function: A test string, and the
+ expected result of applying the QString::toUpper() function to
+ that string.
+
+ Then we add some data to the table using the \l
+ QTest::newRow() function. Each set of data will become a
+ separate row in the test table.
+
+ \l QTest::newRow() takes one argument: A name that will be
+ associated with the data set. If the test fails, the name will be
+ used in the test log, referencing the failed data. Then we
+ stream the data set into the new table row: First an arbitrary
+ string, and then the expected result of applying the
+ QString::toUpper() function to that string.
+
+ You can think of the test data as a two-dimensional table. In
+ our case, it has two columns called \c string and \c result and
+ three rows. In addition a name as well as an index is associated
+ with each row:
+
+ \table
+ \header
+ \li index
+ \li name
+ \li string
+ \li result
+ \row
+ \li 0
+ \li all lower
+ \li "hello"
+ \li HELLO
+ \row
+ \li 1
+ \li mixed
+ \li "Hello"
+ \li HELLO
+ \row
+ \li 2
+ \li all upper
+ \li "HELLO"
+ \li HELLO
+ \endtable
+
+ \section1 Rewriting the Test Function
+
+ Our test function can now be rewritten:
+
+ \snippet qtestlib/tutorial2/testqstring.cpp 2
+
+ The TestQString::toUpper() function will be executed three times,
+ once for each entry in the test table that we created in the
+ associated TestQString::toUpper_data() function.
+
+ First, we fetch the two elements of the data set using the \l
+ QFETCH() macro. \l QFETCH() takes two arguments: The data type of
+ the element and the element name. Then we perform the test using
+ the \l QCOMPARE() macro.
+
+ This approach makes it very easy to add new data to the test
+ without modifying the test itself.
+
+ And again, to make our test case a stand-alone executable,
+ the following two lines are needed:
+
+ \snippet qtestlib/tutorial2/testqstring.cpp 3
+
+ As before, the QTEST_MAIN() macro expands to a simple main()
+ method that runs all the test functions, and since both the
+ declaration and the implementation of our test class are in a .cpp
+ file, we also need to include the generated moc file to make Qt's
+ introspection work.
+*/
+
+/*!
+ \example qtestlib/tutorial3
+
+ \previouspage {Chapter 2: Data Driven Testing}{Chapter 2}
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 4: Replaying GUI Events}{Chapter 4}
+
+ \title Chapter 3: Simulating GUI Events
+
+ QTestLib features some mechanisms to test graphical user
+ interfaces. Instead of simulating native window system events,
+ QTestLib sends internal Qt events. That means there are no
+ side-effects on the machine the tests are running on.
+
+ In this chapter we will se how to write a simple GUI test.
+
+ \section1 Writing a GUI test
+
+ This time, let's assume you want to test the behavior of our
+ QLineEdit class. As before, you will need a class that contains
+ your test function:
+
+ \snippet qtestlib/tutorial3/testgui.cpp 0
+
+ The only difference is that you need to include the QtGui class
+ definitions in addition to the QTest namespace.
+
+ \snippet qtestlib/tutorial3/testgui.cpp 1
+
+ In the implementation of the test function we first create a
+ QLineEdit. Then we simulate writing "hello world" in the line edit
+ using the \l QTest::keyClicks() function.
+
+ \note The widget must also be shown in order to correctly test keyboard
+ shortcuts.
+
+ QTest::keyClicks() simulates clicking a sequence of keys on a
+ widget. Optionally, a keyboard modifier can be specified as well
+ as a delay (in milliseconds) of the test after each key click. In
+ a similar way, you can use the QTest::keyClick(),
+ QTest::keyPress(), QTest::keyRelease(), QTest::mouseClick(),
+ QTest::mouseDClick(), QTest::mouseMove(), QTest::mousePress()
+ and QTest::mouseRelease() functions to simulate the associated
+ GUI events.
+
+ Finally, we use the \l QCOMPARE() macro to check if the line edit's
+ text is as expected.
+
+ As before, to make our test case a stand-alone executable, the
+ following two lines are needed:
+
+ \snippet qtestlib/tutorial3/testgui.cpp 2
+
+ The QTEST_MAIN() macro expands to a simple main() method that
+ runs all the test functions, and since both the declaration and
+ the implementation of our test class are in a .cpp file, we also
+ need to include the generated moc file to make Qt's introspection
+ work.
+*/
+
+/*!
+ \example qtestlib/tutorial4
+
+ \previouspage {Chapter 3: Simulating GUI Event}{Chapter 3}
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 5: Writing a Benchmark}{Chapter 5}
+
+ \title Chapter 4: Replaying GUI Events
+
+ In this chapter, we will show how to simulate a GUI event,
+ and how to store a series of GUI events as well as replay them on
+ a widget.
+
+ The approach to storing a series of events and replay them, is
+ quite similar to the approach explained in \l {Chapter 2:
+ Data Driven Testing}{chapter 2}; all you need is to add a data
+ function to your test class:
+
+ \snippet qtestlib/tutorial4/testgui.cpp 0
+
+ \section1 Writing the Data Function
+
+ As before, a test function's associated data function carries the
+ same name, appended by \c{_data}.
+
+ \snippet qtestlib/tutorial4/testgui.cpp 1
+
+ First, we define the elements of the table using the
+ QTest::addColumn() function: A list of GUI events, and the
+ expected result of applying the list of events on a QWidget. Note
+ that the type of the first element is \l QTestEventList.
+
+ A QTestEventList can be populated with GUI events that can be
+ stored as test data for later usage, or be replayed on any
+ QWidget.
+
+ In our current data function, we create two \l
+ {QTestEventList}s. The first list consists of a single click to
+ the 'a' key. We add the event to the list using the
+ QTestEventList::addKeyClick() function. Then we use the
+ QTest::newRow() function to give the data set a name, and
+ stream the event list and the expected result into the table.
+
+ The second list consists of two key clicks: an 'a' with a
+ following 'backspace'. Again we use the
+ QTestEventList::addKeyClick() to add the events to the list, and
+ QTest::newRow() to put the event list and the expected
+ result into the table with an associated name.
+
+ \section1 Rewriting the Test Function
+
+ Our test can now be rewritten:
+
+ \snippet qtestlib/tutorial4/testgui.cpp 2
+
+ The TestGui::testGui() function will be executed two times,
+ once for each entry in the test data that we created in the
+ associated TestGui::testGui_data() function.
+
+ First, we fetch the two elements of the data set using the \l
+ QFETCH() macro. \l QFETCH() takes two arguments: The data type of
+ the element and the element name. Then we create a QLineEdit, and
+ apply the list of events on that widget using the
+ QTestEventList::simulate() function.
+
+ Finally, we use the QCOMPARE() macro to check if the line edit's
+ text is as expected.
+
+ As before, to make our test case a stand-alone executable,
+ the following two lines are needed:
+
+ \snippet qtestlib/tutorial4/testgui.cpp 3
+
+ The QTEST_MAIN() macro expands to a simple main() method that
+ runs all the test functions, and since both the declaration and
+ the implementation of our test class are in a .cpp file, we also
+ need to include the generated moc file to make Qt's introspection
+ work.
+*/
+
+/*!
+ \example qtestlib/tutorial5
+
+ \previouspage {Chapter 4: Replaying GUI Events}{Chapter 4}
+ \contentspage {QTestLib Tutorial}{Contents}
+
+ \title Chapter 5: Writing a Benchmark
+
+ In this final chapter we will demonstrate how to write benchmarks
+ using QTestLib.
+
+ \section1 Writing a Benchmark
+ To create a benchmark we extend a test function with a QBENCHMARK macro.
+ A benchmark test function will then typically consist of setup code and
+ a QBENCHMARK macro that contains the code to be measured. This test
+ function benchmarks QString::localeAwareCompare().
+
+ \snippet qtestlib/tutorial5/benchmarking.cpp 0
+
+ Setup can be done at the beginning of the function, the clock is not
+ running at this point. The code inside the QBENCHMARK macro will be
+ measured, and possibly repeated several times in order to get an
+ accurate measurement.
+
+ Several \l {testlib-benchmarking-measurement}{back-ends} are available
+ and can be selected on the command line.
+
+ \section1 Data Functions
+
+ Data functions are useful for creating benchmarks that compare
+ multiple data inputs, for example locale aware compare against standard
+ compare.
+
+ \snippet qtestlib/tutorial5/benchmarking.cpp 1
+
+ The test function then uses the data to determine what to benchmark.
+
+ \snippet qtestlib/tutorial5/benchmarking.cpp 2
+
+ The "if (useLocaleCompare)" switch is placed outside the QBENCHMARK
+ macro to avoid measuring its overhead. Each benchmark test function
+ can have one active QBENCHMARK macro.
+
+ \section1 External Tools
+
+ Tools for handling and visualizing test data are available as part of
+ the \l {qtestlib-tools} project in the \l{Qt Labs} web site.
+ These include a tool for comparing performance data obtained from test
+ runs and a utility to generate Web-based graphs of performance data.
+
+ See the \l{qtestlib-tools Announcement}{qtestlib-tools announcement}
+ for more information on these tools and a simple graphing example.
+
+*/
+
+
+
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index dddaed74f6..7ce0a51505 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -38,7 +38,7 @@
The following example records all signal emissions for the \c clicked() signal
of a QCheckBox:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 0
+ \snippet code/doc_src_qsignalspy.cpp 0
\c{spy.takeFirst()} returns the arguments for the first emitted signal, as a
list of QVariant objects. The \c clicked() signal has a single bool argument,
@@ -46,17 +46,17 @@
The example below catches a signal from a custom object:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 1
+ \snippet code/doc_src_qsignalspy.cpp 1
\b {Note:} Non-standard data types need to be registered, using
the qRegisterMetaType() function, before you can create a
QSignalSpy. For example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 2
+ \snippet code/doc_src_qsignalspy.cpp 2
To retrieve the \c QModelIndex, you can use qvariant_cast:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 3
+ \snippet code/doc_src_qsignalspy.cpp 3
*/
/*! \fn QSignalSpy::QSignalSpy(QObject *object, const char *signal)
@@ -69,7 +69,7 @@
return false.
Example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 4
+ \snippet code/doc_src_qsignalspy.cpp 4
*/
/*! \fn QSignalSpy::isValid() const
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 245245e1ca..21468f0585 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -113,7 +113,7 @@ QT_BEGIN_NAMESPACE
by the test framework.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 0
+ \snippet code/src_qtestlib_qtestcase.cpp 0
\sa QCOMPARE(), QTRY_VERIFY()
*/
@@ -127,7 +127,7 @@ QT_BEGIN_NAMESPACE
C string.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 1
+ \snippet code/src_qtestlib_qtestcase.cpp 1
\sa QVERIFY(), QCOMPARE()
*/
@@ -160,7 +160,7 @@ QT_BEGIN_NAMESPACE
by the test framework.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 2
+ \snippet code/src_qtestlib_qtestcase.cpp 2
\sa QVERIFY(), QTRY_COMPARE(), QTest::toString()
*/
@@ -236,12 +236,12 @@ QT_BEGIN_NAMESPACE
Assuming a test has the following data:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 3
+ \snippet code/src_qtestlib_qtestcase.cpp 3
The test data has two elements, a QString called \c aString and an integer
called \c expected. To fetch these values in the actual test:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 4
+ \snippet code/src_qtestlib_qtestcase.cpp 4
\c aString and \c expected are variables on the stack that are initialized with
the current test data.
@@ -271,7 +271,7 @@ QT_BEGIN_NAMESPACE
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 5
+ \snippet code/src_qtestlib_qtestcase.cpp 5
*/
/*! \macro QTEST(actual, testElement)
@@ -286,11 +286,11 @@ QT_BEGIN_NAMESPACE
Instead of writing:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 6
+ \snippet code/src_qtestlib_qtestcase.cpp 6
you can write:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 7
+ \snippet code/src_qtestlib_qtestcase.cpp 7
\sa QCOMPARE()
*/
@@ -320,7 +320,7 @@ QT_BEGIN_NAMESPACE
function that is invoked by the test framework.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 8
+ \snippet code/src_qtestlib_qtestcase.cpp 8
*/
/*! \macro QEXPECT_FAIL(dataIndex, comment, mode)
@@ -347,7 +347,7 @@ QT_BEGIN_NAMESPACE
by the test framework.
Example 1:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 9
+ \snippet code/src_qtestlib_qtestcase.cpp 9
In the example above, an expected fail will be written into the test output
if the variable \c i is not 42. If the variable \c i is 42, an unexpected pass
@@ -355,7 +355,7 @@ QT_BEGIN_NAMESPACE
statement in the example.
Example 2:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 10
+ \snippet code/src_qtestlib_qtestcase.cpp 10
The above testfunction will not continue executing for the test data
entry \c{data27}.
@@ -391,7 +391,7 @@ QT_BEGIN_NAMESPACE
a warning is printed to the test log.
For example, in this code:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 26
+ \snippet code/src_qtestlib_qtestcase.cpp 26
The testdata file will be resolved as the first existing file from:
@@ -441,7 +441,7 @@ QT_BEGIN_NAMESPACE
\l {QApplication::setNavigationMode()}.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 11
+ \snippet code/src_qtestlib_qtestcase.cpp 11
\sa QTEST_APPLESS_MAIN(), QTEST_GUILESS_MAIN(), QTest::qExec(),
QApplication::setNavigationMode()
@@ -486,7 +486,7 @@ QT_BEGIN_NAMESPACE
For example:
- \snippet examples/qtestlib/tutorial5/benchmarking.cpp 0
+ \snippet qtestlib/tutorial5/benchmarking.cpp 0
\sa {QTestLib Manual#Creating a Benchmark}{Creating a Benchmark},
{Chapter 5: Writing a Benchmark}{Writing a Benchmark}
@@ -556,7 +556,7 @@ QT_BEGIN_NAMESPACE
before clicking the key.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 13
+ \snippet code/src_qtestlib_qtestcase.cpp 13
The example above simulates clicking \c a on \c myWidget without
any keyboard modifiers and without delay of the test.
@@ -571,7 +571,7 @@ QT_BEGIN_NAMESPACE
before clicking the key.
Examples:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 14
+ \snippet code/src_qtestlib_qtestcase.cpp 14
The first example above simulates clicking the \c escape key on \c
myWidget without any keyboard modifiers and without delay. The
@@ -650,7 +650,7 @@ QT_BEGIN_NAMESPACE
click.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 15
+ \snippet code/src_qtestlib_qtestcase.cpp 15
The example above simulates clicking the sequence of keys
representing "hello world" on \c myWidget without any keyboard
@@ -726,7 +726,7 @@ QT_BEGIN_NAMESPACE
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 16
+ \snippet code/src_qtestlib_qtestcase.cpp 16
The example above defines a toString() specialization for a class
called \c MyPoint. Whenever a comparison of two instances of \c
@@ -851,7 +851,7 @@ QT_BEGIN_NAMESPACE
your test will stay responsive to user interface events or network communication.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 17
+ \snippet code/src_qtestlib_qtestcase.cpp 17
The code above will wait until the network server is responding for a
maximum of about 12.5 seconds.
@@ -867,7 +867,7 @@ QT_BEGIN_NAMESPACE
time after being asked to show itself on the screen. Returns true.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 24
+ \snippet code/src_qtestlib_qtestcase.cpp 24
*/
/*! \fn bool QTest::qWaitForWindowShown(QWindow *window, int timeout)
@@ -914,7 +914,7 @@ QT_BEGIN_NAMESPACE
instance run out of scope to commit the sequence to the event system.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 25
+ \snippet code/src_qtestlib_qtestcase.cpp 25
*/
/*!
@@ -2023,7 +2023,7 @@ FatalSignalHandler::~FatalSignalHandler()
The following example will run all tests in \c MyTestObject:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 18
+ \snippet code/src_qtestlib_qtestcase.cpp 18
This function returns 0 if no tests failed, or a value other than 0 if one
or more tests failed or in case of unhandled exceptions. (Skipped tests do
@@ -2237,7 +2237,7 @@ void QTest::qWarn(const char *message, const char *file, int line)
call ignoreMessage() twice, too.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 19
+ \snippet code/src_qtestlib_qtestcase.cpp 19
The example above tests that QDir::mkdir() outputs the right warning when invoked
with an invalid file name.
@@ -2397,7 +2397,7 @@ void QTest::addColumnInternal(int id, const char *name)
that can be used to stream in data.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 20
+ \snippet code/src_qtestlib_qtestcase.cpp 20
\b {Note:} This macro can only be used in a test's data function
that is invoked by the test framework.
@@ -2427,7 +2427,7 @@ QTestData &QTest::newRow(const char *dataTag)
\l QFETCH() to fetch the data in the actual test.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 21
+ \snippet code/src_qtestlib_qtestcase.cpp 21
To add custom types to the testdata, the type must be registered with
QMetaType via \l Q_DECLARE_METATYPE().
@@ -2446,7 +2446,7 @@ QTestData &QTest::newRow(const char *dataTag)
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 22
+ \snippet code/src_qtestlib_qtestcase.cpp 22
*/
const char *QTest::currentTestFunction()
{
@@ -2483,7 +2483,7 @@ bool QTest::currentTestFailed()
qSleep() depends on the operating system.
Example:
- \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 23
+ \snippet code/src_qtestlib_qtestcase.cpp 23
\sa qWait()
*/
diff --git a/src/testlib/qtestevent.qdoc b/src/testlib/qtestevent.qdoc
index d20cfa95d6..b9290045f7 100644
--- a/src/testlib/qtestevent.qdoc
+++ b/src/testlib/qtestevent.qdoc
@@ -39,7 +39,7 @@
QWidget.
Example:
- \snippet doc/src/snippets/code/doc_src_qtestevent.cpp 0
+ \snippet code/doc_src_qtestevent.cpp 0
The example above simulates the user entering the character \c a
followed by a backspace, waiting for 200 milliseconds and
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index e4ff21e2aa..47a52318e8 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -13,6 +13,9 @@ unix:!embedded:QMAKE_PKGCONFIG_DESCRIPTION = Qt \
Testing \
Library
+QMAKE_DOCS = $$PWD/doc/qttest.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
HEADERS = qbenchmark.h \
qbenchmark_p.h \
qbenchmarkmeasurement_p.h \
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 21fc2f9ca5..37b4c3dd1d 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -127,3 +127,6 @@ freeze_target.target = freeze
freeze_target.commands =
freeze_target.depends = first
QMAKE_EXTRA_TARGETS += freeze_target
+docs.commands =
+docs.depends = first
+QMAKE_EXTRA_TARGETS += docs
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index f9d6864567..2fbe38b6ee 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -1155,24 +1155,3 @@ int main(int argc, char **argv)
return 0;
}
-/*!
- \page qdbusxml2cpp.html
- \title QtDBus XML compiler (qdbusxml2cpp)
- \keyword qdbusxml2cpp
-
- The QtDBus XML compiler is a tool that can be used to parse interface descriptions and produce
- static code representing those interfaces, which can then be used to make calls to remote
- objects or implement said interfaces.
-
- \c qdbusxml2cpp has two modes of operation, that correspond to the two possible outputs it can
- produce: the interface (proxy) class or the adaptor class. The latter consists of both a C++
- header and a source file, which are meant to be edited and adapted to your needs.
-
- The \c qdbusxml2cpp tool is not meant to be run every time you compile your
- application. Instead, it's meant to be used when developing the code or when the interface
- changes.
-
- The adaptor classes generated by \c qdbusxml2cpp are just a skeleton that must be completed. It
- generates, by default, calls to slots with the same name on the object the adaptor is attached
- to. However, you may modify those slots or the property accessor functions to suit your needs.
-*/
diff --git a/src/tools/qdoc/qdoc.pro b/src/tools/qdoc/qdoc.pro
index 484b0c6ba1..1e570583f5 100644
--- a/src/tools/qdoc/qdoc.pro
+++ b/src/tools/qdoc/qdoc.pro
@@ -116,4 +116,10 @@ QMAKE_EXTRA_TARGETS += html-docs qch-docs
target.path = $$[QT_HOST_BINS]
INSTALLS += target
+
+# Ensure that qdoc is built before we generate the docs
+docs.commands =
+docs.depends = first
+QMAKE_EXTRA_TARGET += docs
+
load(qt_targets)
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index d7a8f5dc21..f034590ccb 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1717,7 +1717,7 @@ QColor QColorDialog::currentColor() const
}
/*!
- Returns the color that the user selected by clicking the \gui{OK}
+ Returns the color that the user selected by clicking the \uicontrol{OK}
or equivalent button.
\note This color is not always the same as the color held by the
@@ -1795,7 +1795,7 @@ QColorDialog::ColorDialogOptions QColorDialog::options() const
of a color dialog.
\value ShowAlphaChannel Allow the user to select the alpha component of a color.
- \value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
+ \value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
\value DontUseNativeDialog Use Qt's standard color dialog on the Mac instead of Apple's
native color panel.
@@ -1819,7 +1819,7 @@ bool QColorDialogPrivate::sharedColorPanelAvailable = true;
/*!
\fn void QColorDialog::colorSelected(const QColor &color);
- This signal is emitted just after the user has clicked \gui{OK} to
+ This signal is emitted just after the user has clicked \uicontrol{OK} to
select a color to use. The chosen color is specified by \a color.
\sa color, currentColorChanged()
@@ -1933,7 +1933,7 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr
initially set to \a initial. The dialog is a child of \a parent.
If \a ok is non-null, \e *\a ok is set to true if the user clicked
- \gui{OK}, and to false if the user clicked Cancel.
+ \uicontrol{OK}, and to false if the user clicked Cancel.
If the user clicks Cancel, the \a initial value is returned.
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 29a8576e6b..dbe5da8ed4 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -180,8 +180,8 @@ void QDialogPrivate::deleteNativeDialog()
exec() function. When the user closes the dialog, exec() will
provide a useful \link #return return value\endlink. Typically,
to get the dialog to close and return the appropriate value, we
- connect a default button, e.g. \gui OK, to the accept() slot and a
- \gui Cancel button to the reject() slot.
+ connect a default button, e.g. \uicontrol OK, to the accept() slot and a
+ \uicontrol Cancel button to the reject() slot.
Alternatively you can call the done() slot with \c Accepted or
\c Rejected.
@@ -238,7 +238,7 @@ void QDialogPrivate::deleteNativeDialog()
partial dialog that shows the most commonly used options, and a
full dialog that shows all the options. Typically an extensible
dialog will initially appear as a partial dialog, but with a
- \gui More toggle button. If the user presses the \gui More button down,
+ \uicontrol More toggle button. If the user presses the \uicontrol More button down,
the dialog is expanded. The \l{Extension Example} shows how to achieve
extensible dialogs using Qt.
@@ -246,8 +246,8 @@ void QDialogPrivate::deleteNativeDialog()
\section1 Return Value (Modal Dialogs)
Modal dialogs are often used in situations where a return value is
- required, e.g. to indicate whether the user pressed \gui OK or
- \gui Cancel. A dialog can be closed by calling the accept() or the
+ required, e.g. to indicate whether the user pressed \uicontrol OK or
+ \uicontrol Cancel. A dialog can be closed by calling the accept() or the
reject() slots, and exec() will return \c Accepted or \c Rejected
as appropriate. The exec() call returns the result of the dialog.
The result is also available from result() if the dialog has not
@@ -264,11 +264,11 @@ void QDialogPrivate::deleteNativeDialog()
A modal dialog:
- \snippet doc/src/snippets/dialogs/dialogs.cpp 1
+ \snippet dialogs/dialogs.cpp 1
A modeless dialog:
- \snippet doc/src/snippets/dialogs/dialogs.cpp 0
+ \snippet dialogs/dialogs.cpp 0
\sa QDialogButtonBox, QTabWidget, QWidget, QProgressDialog,
{fowler}{GUI Design Handbook: Dialogs, Standard}, {Extension Example},
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 15a85c98d9..a87d811d30 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -108,7 +108,7 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
functions. On Windows, Mac OS X, KDE and GNOME, these static functions will
call the native file dialog when possible.
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 0
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 0
In the above example, a modal QFileDialog is created using a static
function. The dialog initially displays the contents of the "/home/jana"
@@ -119,13 +119,13 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
If you want to use multiple filters, separate each one with
\e two semicolons. For example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 1
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 1
You can create your own QFileDialog without using the static
functions. By calling setFileMode(), you can specify what the user must
select in the dialog:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 2
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 2
In the above example, the mode of the file dialog is set to
AnyFile, meaning that the user can select any file, or even specify a
@@ -138,7 +138,7 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
this indicates what types of objects the user is expected to select.
Use setNameFilter() to set the dialog's file filter. For example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 3
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 3
In the above example, the filter is set to \c{"Images (*.png *.xpm *.jpg)"},
this means that only files with the extension \c png, \c xpm,
@@ -154,12 +154,12 @@ Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_h
information alongside each name, such as the file size and modification
date. Set the mode with setViewMode():
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 4
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 4
The last important function you will need to use when creating your
own file dialog is selectedFiles().
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 5
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 5
In the above example, a modal file dialog is created and shown. If
the user clicked OK, the file they selected is put in \c fileName.
@@ -375,7 +375,7 @@ QFileDialog::~QFileDialog()
For instance:
- \snippet doc/src/snippets/filedialogurls.cpp 0
+ \snippet filedialogurls.cpp 0
The file dialog will then look like this:
@@ -1098,7 +1098,7 @@ QStringList qt_make_filter_list(const QString &filter)
text contained in the parentheses is used as the filter. This means
that these calls are all equivalent:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 6
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 6
\sa setNameFilters()
*/
@@ -1154,7 +1154,7 @@ QStringList qt_strip_filters(const QStringList &filters)
Sets the \a filters used in the file dialog.
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 7
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 7
*/
void QFileDialog::setNameFilters(const QStringList &filters)
{
@@ -1705,7 +1705,7 @@ extern QString qt_win_get_existing_directory(const QFileDialogArgs &args);
This is a convenience static function that returns an existing file
selected by the user. If the user presses Cancel, it returns a null string.
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 8
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 8
The function creates a modal file dialog with the given \a parent widget.
If \a parent is not 0, the dialog will be shown centered over the parent
@@ -1787,7 +1787,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
This is a convenience static function that will return one or more existing
files selected by the user.
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 9
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 9
This function creates a modal file dialog with the given \a parent widget.
If \a parent is not 0, the dialog will be shown centered over the parent
@@ -1824,7 +1824,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
\note If you want to iterate over the list of files, you should iterate
over a copy. For example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 10
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 10
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
@@ -1876,7 +1876,7 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
\a parent is not 0, the dialog will be shown centered over the parent
widget.
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 11
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 11
The file dialog's working directory will be set to \a dir. If \a dir
includes a file name, the file will be selected. Only files that match the
@@ -1960,7 +1960,7 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
This is a convenience static function that will return an existing
directory selected by the user.
- \snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 12
+ \snippet code/src_gui_dialogs_qfiledialog.cpp 12
This function creates a modal file dialog with the given \a parent widget.
If \a parent is not 0, the dialog will be shown centered over the parent
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 40cc100c53..06733a8932 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -95,16 +95,16 @@ QT_BEGIN_NAMESPACE
A directory model that displays the contents of a default directory
is usually constructed with a parent object:
- \snippet doc/src/snippets/shareddirmodel/main.cpp 2
+ \snippet shareddirmodel/main.cpp 2
A tree view can be used to display the contents of the model
- \snippet doc/src/snippets/shareddirmodel/main.cpp 4
+ \snippet shareddirmodel/main.cpp 4
and the contents of a particular directory can be displayed by
setting the tree view's root index:
- \snippet doc/src/snippets/shareddirmodel/main.cpp 7
+ \snippet shareddirmodel/main.cpp 7
The view's root index can be used to control how much of a
hierarchical model is displayed. QDirModel provides a convenience
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index b267f67422..23fac31822 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -122,10 +122,10 @@ static const Qt::WindowFlags DefaultWindowFlags =
Examples:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 0
+ \snippet code/src_gui_dialogs_qfontdialog.cpp 0
The dialog can also be used to set a widget's font directly:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 1
+ \snippet code/src_gui_dialogs_qfontdialog.cpp 1
If the user clicks OK the font they chose will be used for myWidget,
and if they click Cancel the original font is used.
@@ -345,20 +345,20 @@ QFontDialog::~QFontDialog()
/*!
Executes a modal font dialog and returns a font.
- If the user clicks \gui OK, the selected font is returned. If the user
- clicks \gui Cancel, the \a initial font is returned.
+ If the user clicks \uicontrol OK, the selected font is returned. If the user
+ clicks \uicontrol Cancel, the \a initial font is returned.
The dialog is constructed with the given \a parent and the options specified
in \a options. \a title is shown as the window title of the dialog and \a
initial is the initially selected font. If the \a ok parameter is not-null,
- the value it refers to is set to true if the user clicks \gui OK, and set to
- false if the user clicks \gui Cancel.
+ the value it refers to is set to true if the user clicks \uicontrol OK, and set to
+ false if the user clicks \uicontrol Cancel.
Examples:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 2
+ \snippet code/src_gui_dialogs_qfontdialog.cpp 2
The dialog can also be used to set a widget's font directly:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 3
+ \snippet code/src_gui_dialogs_qfontdialog.cpp 3
In this example, if the user clicks OK the font they chose will be
used, and if they click Cancel the original font is used.
@@ -377,16 +377,16 @@ QFont QFontDialog::getFont(bool *ok, const QFont &initial, QWidget *parent, cons
Executes a modal font dialog and returns a font.
- If the user clicks \gui OK, the selected font is returned. If the user
- clicks \gui Cancel, the Qt default font is returned.
+ If the user clicks \uicontrol OK, the selected font is returned. If the user
+ clicks \uicontrol Cancel, the Qt default font is returned.
The dialog is constructed with the given \a parent.
If the \a ok parameter is not-null, the value it refers to is set
- to true if the user clicks \gui OK, and false if the user clicks
- \gui Cancel.
+ to true if the user clicks \uicontrol OK, and false if the user clicks
+ \uicontrol Cancel.
Example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp 4
+ \snippet code/src_gui_dialogs_qfontdialog.cpp 4
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -829,7 +829,7 @@ QFont QFontDialog::currentFont() const
}
/*!
- Returns the font that the user selected by clicking the \gui{OK}
+ Returns the font that the user selected by clicking the \uicontrol{OK}
or equivalent button.
\note This font is not always the same as the font held by the
@@ -849,7 +849,7 @@ QFont QFontDialog::selectedFont() const
This enum specifies various options that affect the look and feel
of a font dialog.
- \value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
+ \value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
\value DontUseNativeDialog Use Qt's standard font dialog on the Mac instead of Apple's
native font panel. (Currently, the native dialog is never used,
but this is likely to change in future Qt releases.)
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index 737d6bb467..13be3fcbe4 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -442,9 +442,9 @@ void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
getDouble(), and getItem(). All the functions can be used in a similar way,
for example:
- \snippet examples/dialogs/standarddialogs/dialog.cpp 3
+ \snippet dialogs/standarddialogs/dialog.cpp 3
- The \c ok variable is set to true if the user clicks \gui OK; otherwise it
+ The \c ok variable is set to true if the user clicks \uicontrol OK; otherwise it
is set to false.
\img inputdialogs.png Input Dialogs
@@ -576,7 +576,7 @@ QString QInputDialog::labelText() const
This enum specifies various options that affect the look and feel
of an input dialog.
- \value NoButtons Don't display \gui{OK} and \gui{Cancel} buttons. (Useful for "live dialogs".)
+ \value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".)
\value UseListViewForComboBoxItems Use a QListView rather than a non-editable QComboBox for
displaying the items set with setComboBoxItems().
@@ -1133,7 +1133,7 @@ void QInputDialog::done(int result)
edit widget if an input method is active.
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
- \gui OK and to false if the user pressed \gui Cancel. The dialog's parent
+ \uicontrol OK and to false if the user pressed \uicontrol Cancel. The dialog's parent
is \a parent. The dialog will be modal and uses the specified widget
\a flags.
@@ -1142,7 +1142,7 @@ void QInputDialog::done(int result)
Use this static function like this:
- \snippet examples/dialogs/standarddialogs/dialog.cpp 3
+ \snippet dialogs/standarddialogs/dialog.cpp 3
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
@@ -1185,8 +1185,8 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
\a step is the amount by which the values change as the user presses the
arrow buttons to increment or decrement the value.
- If \a ok is nonnull *\a ok will be set to true if the user pressed \gui OK
- and to false if the user pressed \gui Cancel. The dialog's parent is
+ If \a ok is nonnull *\a ok will be set to true if the user pressed \uicontrol OK
+ and to false if the user pressed \uicontrol Cancel. The dialog's parent is
\a parent. The dialog will be modal and uses the widget \a flags.
On success, this function returns the integer which has been entered by the
@@ -1194,7 +1194,7 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
Use this static function like this:
- \snippet examples/dialogs/standarddialogs/dialog.cpp 0
+ \snippet dialogs/standarddialogs/dialog.cpp 0
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
@@ -1234,8 +1234,8 @@ int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &l
\a min and \a max are the minimum and maximum values the user may choose.
\a decimals is the maximum number of decimal places the number may have.
- If \a ok is nonnull, *\a ok will be set to true if the user pressed \gui OK
- and to false if the user pressed \gui Cancel. The dialog's parent is
+ If \a ok is nonnull, *\a ok will be set to true if the user pressed \uicontrol OK
+ and to false if the user pressed \uicontrol Cancel. The dialog's parent is
\a parent. The dialog will be modal and uses the widget \a flags.
This function returns the floating point number which has been entered by
@@ -1243,7 +1243,7 @@ int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &l
Use this static function like this:
- \snippet examples/dialogs/standarddialogs/dialog.cpp 1
+ \snippet dialogs/standarddialogs/dialog.cpp 1
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
@@ -1289,7 +1289,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
user may only select one of the existing items.
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
- \gui OK and to false if the user pressed \gui Cancel. The dialog's parent
+ \uicontrol OK and to false if the user pressed \uicontrol Cancel. The dialog's parent
is \a parent. The dialog will be modal and uses the widget \a flags.
This function returns the text of the current item, or if \a editable is
@@ -1297,7 +1297,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
Use this static function like this:
- \snippet examples/dialogs/standarddialogs/dialog.cpp 2
+ \snippet dialogs/standarddialogs/dialog.cpp 2
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
@@ -1379,7 +1379,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
\fn void QInputDialog::doubleValueSelected(double value)
This signal is emitted whenever the user selects a double value by
- accepting the dialog; for example, by clicking the \gui{OK} button.
+ accepting the dialog; for example, by clicking the \uicontrol{OK} button.
The selected value is specified by \a value.
This signal is only relevant when the input dialog is used in
@@ -1400,7 +1400,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
\fn void QInputDialog::intValueSelected(int value)
This signal is emitted whenever the user selects a integer value by
- accepting the dialog; for example, by clicking the \gui{OK} button.
+ accepting the dialog; for example, by clicking the \uicontrol{OK} button.
The selected value is specified by \a value.
This signal is only relevant when the input dialog is used in
@@ -1421,7 +1421,7 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
\fn void QInputDialog::textValueSelected(const QString &text)
This signal is emitted whenever the user selects a text string by
- accepting the dialog; for example, by clicking the \gui{OK} button.
+ accepting the dialog; for example, by clicking the \uicontrol{OK} button.
The selected string is specified by \a text.
This signal is only relevant when the input dialog is used in
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 784748fe73..cb32de4bca 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -498,9 +498,9 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
the message. The simplest configuration is to set only the
\l{QMessageBox::text} {message text} property.
- \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 5
+ \snippet code/src_gui_dialogs_qmessagebox.cpp 5
- The user must click the \gui{OK} button to dismiss the message
+ The user must click the \uicontrol{OK} button to dismiss the message
box. The rest of the GUI is blocked until the message box is
dismissed.
@@ -514,13 +514,13 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
responses. The buttons are specified by combining values from
StandardButtons using the bitwise OR operator. The display order
for the buttons is platform-dependent. For example, on Windows,
- \gui{Save} is displayed to the left of \gui{Cancel}, whereas on
+ \uicontrol{Save} is displayed to the left of \uicontrol{Cancel}, whereas on
Mac OS, the order is reversed.
Mark one of your standard buttons to be your
\l{QMessageBox::defaultButton()} {default button}.
- \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 6
+ \snippet code/src_gui_dialogs_qmessagebox.cpp 6
This is the approach recommended in the
\l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID}
@@ -534,16 +534,16 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
The exec() slot returns the StandardButtons value of the button
that was clicked.
- \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 7
+ \snippet code/src_gui_dialogs_qmessagebox.cpp 7
To give the user more information to help him answer the question,
set the \l{QMessageBox::detailedText} {detailed text} property. If
the \l{QMessageBox::detailedText} {detailed text} property is set,
- the \gui{Show Details...} button will be shown.
+ the \uicontrol{Show Details...} button will be shown.
\image msgbox3.png
- Clicking the \gui{Show Details...} button displays the detailed text.
+ Clicking the \uicontrol{Show Details...} button displays the detailed text.
\image msgbox4.png
@@ -632,7 +632,7 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
Static functions are available for creating information(),
question(), warning(), and critical() message boxes.
- \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 0
+ \snippet code/src_gui_dialogs_qmessagebox.cpp 0
The \l{dialogs/standarddialogs}{Standard Dialogs} example shows
how to use QMessageBox and the other built-in Qt dialogs.
@@ -647,7 +647,7 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
platform). You can test the value of clickedButton() after calling
exec(). For example,
- \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 2
+ \snippet code/src_gui_dialogs_qmessagebox.cpp 2
\section1 Default and Escape Keys
@@ -1028,7 +1028,7 @@ void QMessageBoxPrivate::detectEscapeButton()
Example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp 3
+ \snippet code/src_gui_dialogs_qmessagebox.cpp 3
\sa standardButton(), button()
*/
@@ -1707,7 +1707,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
and centered over \a parent (if \a parent is not 0). The message
includes the version number of Qt being used by the application.
- This is useful for inclusion in the \gui Help menu of an application,
+ This is useful for inclusion in the \uicontrol Help menu of an application,
as shown in the \l{mainwindows/menus}{Menus} example.
QApplication provides this functionality as a slot.
@@ -1964,7 +1964,7 @@ void QMessageBoxPrivate::retranslateStrings()
to make it the cancel or close button (clicked when \key Esc is
pressed).
- \snippet doc/src/snippets/dialogs/dialogs.cpp 2
+ \snippet dialogs/dialogs.cpp 2
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index 350fb57e20..97e628e96b 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -244,7 +244,7 @@ void QProgressDialogPrivate::_q_disconnectOnClose()
to use for the programmer. Do the operation in a loop, call \l setValue() at
intervals, and check for cancellation with wasCanceled(). For example:
- \snippet doc/src/snippets/dialogs/dialogs.cpp 3
+ \snippet dialogs/dialogs.cpp 3
A modeless progress dialog is suitable for operations that take
place in the background, where the user is able to interact with the
@@ -257,11 +257,11 @@ void QProgressDialogPrivate::_q_disconnectOnClose()
canceled() signal to a slot that stops the operation, and call \l
setValue() at intervals. For example:
- \snippet doc/src/snippets/dialogs/dialogs.cpp 4
+ \snippet dialogs/dialogs.cpp 4
\codeline
- \snippet doc/src/snippets/dialogs/dialogs.cpp 5
+ \snippet dialogs/dialogs.cpp 5
\codeline
- \snippet doc/src/snippets/dialogs/dialogs.cpp 6
+ \snippet dialogs/dialogs.cpp 6
In both modes the progress dialog may be customized by
replacing the child widgets with custom widgets by using setLabel(),
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index ac19ec8d22..36327741c8 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -1809,17 +1809,17 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
\l{dialogs/classwizard}{Class Wizard} and \l{dialogs/licensewizard}{License
Wizard}.
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 1
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 3
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 1
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 3
\dots
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 4
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 4
\codeline
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 5
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 7
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 5
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 7
\dots
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 8
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 8
\codeline
- \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 10
+ \snippet dialogs/trivialwizard/trivialwizard.cpp 10
\section1 Wizard Look and Feel
@@ -1856,19 +1856,19 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
In addition to the wizard style, there are several options that
control the look and feel of the wizard. These can be set using
setOption() or setOptions(). For example, HaveHelpButton makes
- QWizard show a \gui Help button along with the other wizard
+ QWizard show a \uicontrol Help button along with the other wizard
buttons.
You can even change the order of the wizard buttons to any
arbitrary order using setButtonLayout(), and you can add up to
- three custom buttons (e.g., a \gui Print button) to the button
+ three custom buttons (e.g., a \uicontrol Print button) to the button
row. This is achieved by calling setButton() or setButtonText()
with CustomButton1, CustomButton2, or CustomButton3 to set up the
button, and by enabling the HaveCustomButton1, HaveCustomButton2,
or HaveCustomButton3 options. Whenever the user clicks a custom
button, customButtonClicked() is emitted. For example:
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 29
+ \snippet dialogs/licensewizard/licensewizard.cpp 29
\section1 Elements of a Wizard Page
@@ -1936,12 +1936,12 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
To register a field, call QWizardPage::registerField() field.
For example:
- \snippet examples/dialogs/classwizard/classwizard.cpp 8
+ \snippet dialogs/classwizard/classwizard.cpp 8
\dots
- \snippet examples/dialogs/classwizard/classwizard.cpp 10
- \snippet examples/dialogs/classwizard/classwizard.cpp 11
+ \snippet dialogs/classwizard/classwizard.cpp 10
+ \snippet dialogs/classwizard/classwizard.cpp 11
\dots
- \snippet examples/dialogs/classwizard/classwizard.cpp 13
+ \snippet dialogs/classwizard/classwizard.cpp 13
The above code registers three fields, \c className, \c
baseClass, and \c qobjectMacro, which are associated with three
@@ -1952,7 +1952,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
The fields of any page are accessible from any other page. For
example:
- \snippet examples/dialogs/classwizard/classwizard.cpp 17
+ \snippet dialogs/classwizard/classwizard.cpp 17
Here, we call QWizardPage::field() to access the contents of the
\c className field (which was defined in the \c ClassInfoPage)
@@ -1971,7 +1971,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
If an asterisk (\c *) is appended to the name when the property
is registered, the field is a \e{mandatory field}. When a page has
- mandatory fields, the \gui Next and/or \gui Finish buttons are
+ mandatory fields, the \uicontrol Next and/or \uicontrol Finish buttons are
enabled only when all mandatory fields are filled.
To consider a field "filled", QWizard simply checks that the
@@ -1987,7 +1987,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
QWizardPage::completeChanged() signal whenever the page becomes
complete or incomplete.
- The enabled/disabled state of the \gui Next and/or \gui Finish
+ The enabled/disabled state of the \uicontrol Next and/or \uicontrol Finish
buttons is one way to perform validation on the user input.
Another way is to reimplement validateCurrentPage() (or
QWizardPage::validatePage()) to perform some last-minute
@@ -2005,9 +2005,9 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
them using addPage(). By default, the pages are shown in the
order in which they were added. For example:
- \snippet examples/dialogs/classwizard/classwizard.cpp 0
+ \snippet dialogs/classwizard/classwizard.cpp 0
\dots
- \snippet examples/dialogs/classwizard/classwizard.cpp 2
+ \snippet dialogs/classwizard/classwizard.cpp 2
When a page is about to be shown, QWizard calls initializePage()
(which in turn calls QWizardPage::initializePage()) to fill the
@@ -2016,11 +2016,11 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
based on other pages' fields (see the \l{initialize page}{example
above}).
- If the user presses \gui Back, cleanupPage() is called (which in
+ If the user presses \uicontrol Back, cleanupPage() is called (which in
turn calls QWizardPage::cleanupPage()). The default
implementation resets the page's fields to their original values
(the values they had before initializePage() was called). If you
- want the \gui Back button to be non-destructive and keep the
+ want the \uicontrol Back button to be non-destructive and keep the
values entered by the user, simply enable the IndependentPages
option.
@@ -2037,37 +2037,37 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
In complex wizards, pages are identified by IDs. These IDs are
typically defined using an enum. For example:
- \snippet examples/dialogs/licensewizard/licensewizard.h 0
+ \snippet dialogs/licensewizard/licensewizard.h 0
\dots
- \snippet examples/dialogs/licensewizard/licensewizard.h 2
+ \snippet dialogs/licensewizard/licensewizard.h 2
\dots
- \snippet examples/dialogs/licensewizard/licensewizard.h 3
+ \snippet dialogs/licensewizard/licensewizard.h 3
The pages are inserted using setPage(), which takes an ID and an
instance of QWizardPage (or of a subclass):
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 1
+ \snippet dialogs/licensewizard/licensewizard.cpp 1
\dots
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 8
+ \snippet dialogs/licensewizard/licensewizard.cpp 8
By default, the pages are shown in increasing ID order. To
provide a dynamic order that depends on the options chosen by the
user, we must reimplement QWizardPage::nextId(). For example:
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 18
+ \snippet dialogs/licensewizard/licensewizard.cpp 18
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 23
+ \snippet dialogs/licensewizard/licensewizard.cpp 23
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 24
+ \snippet dialogs/licensewizard/licensewizard.cpp 24
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 25
+ \snippet dialogs/licensewizard/licensewizard.cpp 25
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 26
+ \snippet dialogs/licensewizard/licensewizard.cpp 26
It would also be possible to put all the logic in one place, in a
QWizard::nextId() reimplementation. For example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qwizard.cpp 0
+ \snippet code/src_gui_dialogs_qwizard.cpp 0
To start at another page than the page with the lowest ID, call
setStartId().
@@ -2075,7 +2075,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
To test whether a page has been visited or not, call
hasVisitedPage(). For example:
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 27
+ \snippet dialogs/licensewizard/licensewizard.cpp 27
\sa QWizardPage, {Class Wizard Example}, {License Wizard Example}
*/
@@ -2085,12 +2085,12 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
This enum specifies the buttons in a wizard.
- \value BackButton The \gui Back button (\gui {Go Back} on Mac OS X)
- \value NextButton The \gui Next button (\gui Continue on Mac OS X)
- \value CommitButton The \gui Commit button
- \value FinishButton The \gui Finish button (\gui Done on Mac OS X)
- \value CancelButton The \gui Cancel button (see also NoCancelButton)
- \value HelpButton The \gui Help button (see also HaveHelpButton)
+ \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on Mac OS X)
+ \value NextButton The \uicontrol Next button (\uicontrol Continue on Mac OS X)
+ \value CommitButton The \uicontrol Commit button
+ \value FinishButton The \uicontrol Finish button (\uicontrol Done on Mac OS X)
+ \value CancelButton The \uicontrol Cancel button (see also NoCancelButton)
+ \value HelpButton The \uicontrol Help button (see also HaveHelpButton)
\value CustomButton1 The first user-defined button (see also HaveCustomButton1)
\value CustomButton2 The second user-defined button (see also HaveCustomButton2)
\value CustomButton3 The third user-defined button (see also HaveCustomButton3)
@@ -2148,18 +2148,18 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *)
\value IgnoreSubTitles Don't show any subtitles, even if they are set.
\value ExtendedWatermarkPixmap Extend any WatermarkPixmap all the
way down to the window's edge.
- \value NoDefaultButton Don't make the \gui Next or \gui Finish button the
+ \value NoDefaultButton Don't make the \uicontrol Next or \uicontrol Finish button the
dialog's \l{QPushButton::setDefault()}{default button}.
- \value NoBackButtonOnStartPage Don't show the \gui Back button on the start page.
- \value NoBackButtonOnLastPage Don't show the \gui Back button on the last page.
- \value DisabledBackButtonOnLastPage Disable the \gui Back button on the last page.
- \value HaveNextButtonOnLastPage Show the (disabled) \gui Next button on the last page.
- \value HaveFinishButtonOnEarlyPages Show the (disabled) \gui Finish button on non-final pages.
- \value NoCancelButton Don't show the \gui Cancel button.
- \value CancelButtonOnLeft Put the \gui Cancel button on the left of \gui Back (rather than on
- the right of \gui Finish or \gui Next).
- \value HaveHelpButton Show the \gui Help button.
- \value HelpButtonOnRight Put the \gui Help button on the far right of the button layout
+ \value NoBackButtonOnStartPage Don't show the \uicontrol Back button on the start page.
+ \value NoBackButtonOnLastPage Don't show the \uicontrol Back button on the last page.
+ \value DisabledBackButtonOnLastPage Disable the \uicontrol Back button on the last page.
+ \value HaveNextButtonOnLastPage Show the (disabled) \uicontrol Next button on the last page.
+ \value HaveFinishButtonOnEarlyPages Show the (disabled) \uicontrol Finish button on non-final pages.
+ \value NoCancelButton Don't show the \uicontrol Cancel button.
+ \value CancelButtonOnLeft Put the \uicontrol Cancel button on the left of \uicontrol Back (rather than on
+ the right of \uicontrol Finish or \uicontrol Next).
+ \value HaveHelpButton Show the \uicontrol Help button.
+ \value HelpButtonOnRight Put the \uicontrol Help button on the far right of the button layout
(rather than on the far left).
\value HaveCustomButton1 Show the first user-defined button (CustomButton1).
\value HaveCustomButton2 Show the second user-defined button (CustomButton2).
@@ -2363,7 +2363,7 @@ QWizardPage *QWizard::page(int theid) const
Returns true if the page history contains page \a id; otherwise,
returns false.
- Pressing \gui Back marks the current page as "unvisited" again.
+ Pressing \uicontrol Back marks the current page as "unvisited" again.
\sa visitedPages()
*/
@@ -2377,7 +2377,7 @@ bool QWizard::hasVisitedPage(int theid) const
Returns the list of IDs of visited pages, in the order in which the pages
were visited.
- Pressing \gui Back marks the current page as "unvisited" again.
+ Pressing \uicontrol Back marks the current page as "unvisited" again.
\sa hasVisitedPage()
*/
@@ -2635,10 +2635,10 @@ QWizard::WizardOptions QWizard::options() const
Sets the text on button \a which to be \a text.
By default, the text on buttons depends on the wizardStyle. For
- example, on Mac OS X, the \gui Next button is called \gui
+ example, on Mac OS X, the \uicontrol Next button is called \uicontrol
Continue.
- To add extra buttons to the wizard (e.g., a \gui Print button),
+ To add extra buttons to the wizard (e.g., a \uicontrol Print button),
one way is to call setButtonText() with CustomButton1,
CustomButton2, or CustomButton3 to set their text, and make the
buttons visible using the HaveCustomButton1, HaveCustomButton2,
@@ -2667,7 +2667,7 @@ void QWizard::setButtonText(WizardButton which, const QString &text)
If a text has ben set using setButtonText(), this text is returned.
By default, the text on buttons depends on the wizardStyle. For
- example, on Mac OS X, the \gui Next button is called \gui
+ example, on Mac OS X, the \uicontrol Next button is called \uicontrol
Continue.
\sa button(), setButton(), setButtonText(), QWizardPage::buttonText(),
@@ -2704,7 +2704,7 @@ QString QWizard::buttonText(WizardButton which) const
Example:
- \snippet doc/src/snippets/code/src_gui_dialogs_qwizard.cpp 1
+ \snippet code/src_gui_dialogs_qwizard.cpp 1
\sa setButton(), setButtonText(), setOptions()
*/
@@ -2738,7 +2738,7 @@ void QWizard::setButtonLayout(const QList<WizardButton> &layout)
/*!
Sets the button corresponding to role \a which to \a button.
- To add extra buttons to the wizard (e.g., a \gui Print button),
+ To add extra buttons to the wizard (e.g., a \uicontrol Print button),
one way is to call setButton() with CustomButton1 to
CustomButton3, and make the buttons visible using the
HaveCustomButton1 to HaveCustomButton3 options.
@@ -3029,27 +3029,27 @@ QSize QWizard::sizeHint() const
/*!
\fn void QWizard::helpRequested()
- This signal is emitted when the user clicks the \gui Help button.
+ This signal is emitted when the user clicks the \uicontrol Help button.
- By default, no \gui Help button is shown. Call
+ By default, no \uicontrol Help button is shown. Call
setOption(HaveHelpButton, true) to have one.
Example:
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 0
+ \snippet dialogs/licensewizard/licensewizard.cpp 0
\dots
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 5
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 7
+ \snippet dialogs/licensewizard/licensewizard.cpp 5
+ \snippet dialogs/licensewizard/licensewizard.cpp 7
\dots
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 8
+ \snippet dialogs/licensewizard/licensewizard.cpp 8
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 10
+ \snippet dialogs/licensewizard/licensewizard.cpp 10
\dots
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 12
+ \snippet dialogs/licensewizard/licensewizard.cpp 12
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 14
+ \snippet dialogs/licensewizard/licensewizard.cpp 14
\codeline
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 15
+ \snippet dialogs/licensewizard/licensewizard.cpp 15
\sa customButtonClicked()
*/
@@ -3070,7 +3070,7 @@ QSize QWizard::sizeHint() const
/*!
Goes back to the previous page.
- This is equivalent to pressing the \gui Back button.
+ This is equivalent to pressing the \uicontrol Back button.
\sa next(), accept(), reject(), restart()
*/
@@ -3086,7 +3086,7 @@ void QWizard::back()
/*!
Advances to the next page.
- This is equivalent to pressing the \gui Next or \gui Commit button.
+ This is equivalent to pressing the \uicontrol Next or \uicontrol Commit button.
\sa nextId(), back(), accept(), reject(), restart()
*/
@@ -3253,7 +3253,7 @@ void QWizard::done(int result)
This virtual function is called by QWizard to prepare page \a id
just before it is shown either as a result of QWizard::restart()
- being called, or as a result of the user clicking \gui Next. (However, if the \l
+ being called, or as a result of the user clicking \uicontrol Next. (However, if the \l
QWizard::IndependentPages option is set, this function is only
called the first time the page is shown.)
@@ -3277,7 +3277,7 @@ void QWizard::initializePage(int theid)
\fn void QWizard::cleanupPage(int id)
This virtual function is called by QWizard to clean up page \a id just before the
- user leaves it by clicking \gui Back (unless the \l QWizard::IndependentPages option is set).
+ user leaves it by clicking \uicontrol Back (unless the \l QWizard::IndependentPages option is set).
The default implementation calls QWizardPage::cleanupPage() on
page(\a id).
@@ -3293,15 +3293,15 @@ void QWizard::cleanupPage(int theid)
/*!
This virtual function is called by QWizard when the user clicks
- \gui Next or \gui Finish to perform some last-minute validation.
+ \uicontrol Next or \uicontrol Finish to perform some last-minute validation.
If it returns true, the next page is shown (or the wizard
finishes); otherwise, the current page stays up.
The default implementation calls QWizardPage::validatePage() on
the currentPage().
- When possible, it is usually better style to disable the \gui
- Next or \gui Finish button (by specifying \l{mandatory fields} or
+ When possible, it is usually better style to disable the \uicontrol
+ Next or \uicontrol Finish button (by specifying \l{mandatory fields} or
by reimplementing QWizardPage::isComplete()) than to reimplement
validateCurrentPage().
@@ -3318,7 +3318,7 @@ bool QWizard::validateCurrentPage()
/*!
This virtual function is called by QWizard to find out which page
- to show when the user clicks the \gui Next button.
+ to show when the user clicks the \uicontrol Next button.
The return value is the ID of the next page, or -1 if no page follows.
@@ -3362,29 +3362,29 @@ int QWizard::nextId() const
\list
\li initializePage() is called to initialize the page's contents
- when the user clicks the wizard's \gui Next button. If you
+ when the user clicks the wizard's \uicontrol Next button. If you
want to derive the page's default from what the user entered
on previous pages, this is the function to reimplement.
\li cleanupPage() is called to reset the page's contents when the
- user clicks the wizard's \gui Back button.
- \li validatePage() validates the page when the user clicks \gui
- Next or \gui Finish. It is often used to show an error message
+ user clicks the wizard's \uicontrol Back button.
+ \li validatePage() validates the page when the user clicks \uicontrol
+ Next or \uicontrol Finish. It is often used to show an error message
if the user has entered incomplete or invalid information.
\li nextId() returns the ID of the next page. It is useful when
\l{creating non-linear wizards}, which allow different
traversal paths based on the information provided by the user.
- \li isComplete() is called to determine whether the \gui Next
- and/or \gui Finish button should be enabled or disabled. If
+ \li isComplete() is called to determine whether the \uicontrol Next
+ and/or \uicontrol Finish button should be enabled or disabled. If
you reimplement isComplete(), also make sure that
completeChanged() is emitted whenever the complete state
changes.
\endlist
- Normally, the \gui Next button and the \gui Finish button of a
- wizard are mutually exclusive. If isFinalPage() returns true, \gui
- Finish is available; otherwise, \gui Next is available. By
+ Normally, the \uicontrol Next button and the \uicontrol Finish button of a
+ wizard are mutually exclusive. If isFinalPage() returns true, \uicontrol
+ Finish is available; otherwise, \uicontrol Next is available. By
default, isFinalPage() is true only when nextId() returns -1. If
- you want to show \gui Next and \gui Final simultaneously for a
+ you want to show \uicontrol Next and \uicontrol Final simultaneously for a
page (letting the user perform an "early finish"), call
setFinalPage(true) on that page. For wizards that support early
finishes, you might also want to set the
@@ -3532,7 +3532,7 @@ QPixmap QWizardPage::pixmap(QWizard::WizardPixmap which) const
/*!
This virtual function is called by QWizard::initializePage() to
prepare the page just before it is shown either as a result of QWizard::restart()
- being called, or as a result of the user clicking \gui Next.
+ being called, or as a result of the user clicking \uicontrol Next.
(However, if the \l QWizard::IndependentPages option is set, this function is only
called the first time the page is shown.)
@@ -3540,7 +3540,7 @@ QPixmap QWizardPage::pixmap(QWizard::WizardPixmap which) const
fields are properly initialized based on fields from previous
pages. For example:
- \snippet examples/dialogs/classwizard/classwizard.cpp 17
+ \snippet dialogs/classwizard/classwizard.cpp 17
The default implementation does nothing.
@@ -3552,7 +3552,7 @@ void QWizardPage::initializePage()
/*!
This virtual function is called by QWizard::cleanupPage() when
- the user leaves the page by clicking \gui Back (unless the \l QWizard::IndependentPages
+ the user leaves the page by clicking \uicontrol Back (unless the \l QWizard::IndependentPages
option is set).
The default implementation resets the page's fields to their
@@ -3576,14 +3576,14 @@ void QWizardPage::cleanupPage()
/*!
This virtual function is called by QWizard::validateCurrentPage()
- when the user clicks \gui Next or \gui Finish to perform some
+ when the user clicks \uicontrol Next or \uicontrol Finish to perform some
last-minute validation. If it returns true, the next page is shown
(or the wizard finishes); otherwise, the current page stays up.
The default implementation returns true.
- When possible, it is usually better style to disable the \gui
- Next or \gui Finish button (by specifying \l{mandatory fields} or
+ When possible, it is usually better style to disable the \uicontrol
+ Next or \uicontrol Finish button (by specifying \l{mandatory fields} or
reimplementing isComplete()) than to reimplement validatePage().
\sa QWizard::validateCurrentPage(), isComplete()
@@ -3595,7 +3595,7 @@ bool QWizardPage::validatePage()
/*!
This virtual function is called by QWizard to determine whether
- the \gui Next or \gui Finish button should be enabled or
+ the \uicontrol Next or \uicontrol Finish button should be enabled or
disabled.
The default implementation returns true if all \l{mandatory
@@ -3645,7 +3645,7 @@ bool QWizardPage::isComplete() const
/*!
Explicitly sets this page to be final if \a finalPage is true.
- After calling setFinalPage(true), isFinalPage() returns true and the \gui
+ After calling setFinalPage(true), isFinalPage() returns true and the \uicontrol
Finish button is visible (and enabled if isComplete() returns
true).
@@ -3664,7 +3664,7 @@ void QWizardPage::setFinalPage(bool finalPage)
}
/*!
- This function is called by QWizard to determine whether the \gui
+ This function is called by QWizard to determine whether the \uicontrol
Finish button should be shown for this page or not.
By default, it returns true if there is no next page
@@ -3695,12 +3695,12 @@ bool QWizardPage::isFinalPage() const
sets it to be a normal page.
A commit page is a page that represents an action which cannot be undone
- by clicking \gui Back or \gui Cancel.
+ by clicking \uicontrol Back or \uicontrol Cancel.
- A \gui Commit button replaces the \gui Next button on a commit page. Clicking this
- button simply calls QWizard::next() just like clicking \gui Next does.
+ A \uicontrol Commit button replaces the \uicontrol Next button on a commit page. Clicking this
+ button simply calls QWizard::next() just like clicking \uicontrol Next does.
- A page entered directly from a commit page has its \gui Back button disabled.
+ A page entered directly from a commit page has its \uicontrol Back button disabled.
\sa isCommitPage()
*/
@@ -3748,7 +3748,7 @@ void QWizardPage::setButtonText(QWizard::WizardButton which, const QString &text
this text is returned.
By default, the text on buttons depends on the QWizard::wizardStyle.
- For example, on Mac OS X, the \gui Next button is called \gui
+ For example, on Mac OS X, the \uicontrol Next button is called \uicontrol
Continue.
\sa setButtonText(), QWizard::buttonText(), QWizard::setButtonText()
@@ -3768,7 +3768,7 @@ QString QWizardPage::buttonText(QWizard::WizardButton which) const
/*!
This virtual function is called by QWizard::nextId() to find
- out which page to show when the user clicks the \gui Next button.
+ out which page to show when the user clicks the \uicontrol Next button.
The return value is the ID of the next page, or -1 if no page follows.
@@ -3778,7 +3778,7 @@ QString QWizardPage::buttonText(QWizard::WizardButton which) const
By reimplementing this function, you can specify a dynamic page
order. For example:
- \snippet examples/dialogs/licensewizard/licensewizard.cpp 18
+ \snippet dialogs/licensewizard/licensewizard.cpp 18
\sa QWizard::nextId()
*/
@@ -3845,7 +3845,7 @@ void QWizardPage::setField(const QString &name, const QVariant &value)
Example:
- \snippet examples/dialogs/classwizard/classwizard.cpp 17
+ \snippet dialogs/classwizard/classwizard.cpp 17
\sa QWizard::field(), setField(), registerField()
*/
@@ -3868,8 +3868,8 @@ QVariant QWizardPage::field(const QString &name) const
explicitly about each other.
If \a name ends with an asterisk (\c *), the field is a mandatory
- field. When a page has mandatory fields, the \gui Next and/or
- \gui Finish buttons are enabled only when all mandatory fields
+ field. When a page has mandatory fields, the \uicontrol Next and/or
+ \uicontrol Finish buttons are enabled only when all mandatory fields
are filled. This requires a \a changedSignal to be specified, to
tell QWizard to recheck the value stored by the mandatory field.
diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png b/src/widgets/doc/images/addressbook-tutorial-part1-labeled-layout.png
index b19cb360a1..b19cb360a1 100644
--- a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part1-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-part1-labeled-screenshot.png
index f9b91eebe6..f9b91eebe6 100644
--- a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part1-labeled-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-part1-screenshot.png
index 454b0959e6..454b0959e6 100644
--- a/doc/src/images/addressbook-tutorial-part1-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part1-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-contact.png b/src/widgets/doc/images/addressbook-tutorial-part2-add-contact.png
index 6f2b947b21..6f2b947b21 100644
--- a/doc/src/images/addressbook-tutorial-part2-add-contact.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part2-add-contact.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-flowchart.png b/src/widgets/doc/images/addressbook-tutorial-part2-add-flowchart.png
index ca9af3720d..ca9af3720d 100644
--- a/doc/src/images/addressbook-tutorial-part2-add-flowchart.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part2-add-flowchart.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-successful.png b/src/widgets/doc/images/addressbook-tutorial-part2-add-successful.png
index 99a2154007..99a2154007 100644
--- a/doc/src/images/addressbook-tutorial-part2-add-successful.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part2-add-successful.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png b/src/widgets/doc/images/addressbook-tutorial-part2-labeled-layout.png
index 1e000c8f31..1e000c8f31 100644
--- a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part2-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-signals-and-slots.png b/src/widgets/doc/images/addressbook-tutorial-part2-signals-and-slots.png
index e49f8dc262..e49f8dc262 100644
--- a/doc/src/images/addressbook-tutorial-part2-signals-and-slots.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part2-signals-and-slots.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-stretch-effects.png b/src/widgets/doc/images/addressbook-tutorial-part2-stretch-effects.png
index d9f7f31227..d9f7f31227 100644
--- a/doc/src/images/addressbook-tutorial-part2-stretch-effects.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part2-stretch-effects.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png b/src/widgets/doc/images/addressbook-tutorial-part3-labeled-layout.png
index 1981ba8cb6..1981ba8cb6 100644
--- a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part3-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-linkedlist.png b/src/widgets/doc/images/addressbook-tutorial-part3-linkedlist.png
index e7f4725dce..e7f4725dce 100644
--- a/doc/src/images/addressbook-tutorial-part3-linkedlist.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part3-linkedlist.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-part3-screenshot.png
index 75159b4045..75159b4045 100644
--- a/doc/src/images/addressbook-tutorial-part3-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part3-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part4-remove.png b/src/widgets/doc/images/addressbook-tutorial-part4-remove.png
index 8eb259ef02..8eb259ef02 100644
--- a/doc/src/images/addressbook-tutorial-part4-remove.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part4-remove.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-finddialog.png b/src/widgets/doc/images/addressbook-tutorial-part5-finddialog.png
index 743d92ef6f..743d92ef6f 100644
--- a/doc/src/images/addressbook-tutorial-part5-finddialog.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part5-finddialog.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-notfound.png b/src/widgets/doc/images/addressbook-tutorial-part5-notfound.png
index 2d35766ab5..2d35766ab5 100644
--- a/doc/src/images/addressbook-tutorial-part5-notfound.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part5-notfound.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-part5-screenshot.png
index 3abe2775c2..3abe2775c2 100644
--- a/doc/src/images/addressbook-tutorial-part5-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part5-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-signals-and-slots.png b/src/widgets/doc/images/addressbook-tutorial-part5-signals-and-slots.png
index 1771e7bbbf..1771e7bbbf 100644
--- a/doc/src/images/addressbook-tutorial-part5-signals-and-slots.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part5-signals-and-slots.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-load.png b/src/widgets/doc/images/addressbook-tutorial-part6-load.png
index a027a1decb..a027a1decb 100644
--- a/doc/src/images/addressbook-tutorial-part6-load.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part6-load.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-save.png b/src/widgets/doc/images/addressbook-tutorial-part6-save.png
index 757feeb9ac..757feeb9ac 100644
--- a/doc/src/images/addressbook-tutorial-part6-save.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part6-save.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-part6-screenshot.png
index 7bb2f749bf..7bb2f749bf 100644
--- a/doc/src/images/addressbook-tutorial-part6-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part6-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part7-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-part7-screenshot.png
index 3e7b3ca522..3e7b3ca522 100644
--- a/doc/src/images/addressbook-tutorial-part7-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-part7-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-screenshot.png b/src/widgets/doc/images/addressbook-tutorial-screenshot.png
index 3fba6e849e..3fba6e849e 100644
--- a/doc/src/images/addressbook-tutorial-screenshot.png
+++ b/src/widgets/doc/images/addressbook-tutorial-screenshot.png
Binary files differ
diff --git a/src/widgets/doc/images/assistant-toolbar.png b/src/widgets/doc/images/assistant-toolbar.png
new file mode 100644
index 0000000000..1b41825c64
--- /dev/null
+++ b/src/widgets/doc/images/assistant-toolbar.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-gnomelayout-horizontal.png b/src/widgets/doc/images/buttonbox-gnomelayout-horizontal.png
new file mode 100644
index 0000000000..b2f74bb6c6
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-gnomelayout-horizontal.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-gnomelayout-vertical.png b/src/widgets/doc/images/buttonbox-gnomelayout-vertical.png
new file mode 100644
index 0000000000..e7843dc22d
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-gnomelayout-vertical.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-kdelayout-horizontal.png b/src/widgets/doc/images/buttonbox-kdelayout-horizontal.png
new file mode 100644
index 0000000000..5da11f4d7a
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-kdelayout-horizontal.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-kdelayout-vertical.png b/src/widgets/doc/images/buttonbox-kdelayout-vertical.png
new file mode 100644
index 0000000000..6f5dfc6b65
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-kdelayout-vertical.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-mac-modeless-horizontal.png b/src/widgets/doc/images/buttonbox-mac-modeless-horizontal.png
new file mode 100644
index 0000000000..2e853d34fb
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-mac-modeless-horizontal.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-mac-modeless-vertical.png b/src/widgets/doc/images/buttonbox-mac-modeless-vertical.png
new file mode 100644
index 0000000000..f59bd8ddaf
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-mac-modeless-vertical.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-maclayout-horizontal.png b/src/widgets/doc/images/buttonbox-maclayout-horizontal.png
new file mode 100644
index 0000000000..89ae84dea0
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-maclayout-horizontal.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-maclayout-vertical.png b/src/widgets/doc/images/buttonbox-maclayout-vertical.png
new file mode 100644
index 0000000000..728760029f
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-maclayout-vertical.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-winlayout-horizontal.png b/src/widgets/doc/images/buttonbox-winlayout-horizontal.png
new file mode 100644
index 0000000000..dd4ce1c313
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-winlayout-horizontal.png
Binary files differ
diff --git a/src/widgets/doc/images/buttonbox-winlayout-vertical.png b/src/widgets/doc/images/buttonbox-winlayout-vertical.png
new file mode 100644
index 0000000000..539de1aa1a
--- /dev/null
+++ b/src/widgets/doc/images/buttonbox-winlayout-vertical.png
Binary files differ
diff --git a/doc/src/images/cde-calendarwidget.png b/src/widgets/doc/images/cde-calendarwidget.png
index 9615eaeab8..9615eaeab8 100644
--- a/doc/src/images/cde-calendarwidget.png
+++ b/src/widgets/doc/images/cde-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/cde-checkbox.png b/src/widgets/doc/images/cde-checkbox.png
index b2528dc5de..b2528dc5de 100644
--- a/doc/src/images/cde-checkbox.png
+++ b/src/widgets/doc/images/cde-checkbox.png
Binary files differ
diff --git a/doc/src/images/cde-combobox.png b/src/widgets/doc/images/cde-combobox.png
index 74586433eb..74586433eb 100644
--- a/doc/src/images/cde-combobox.png
+++ b/src/widgets/doc/images/cde-combobox.png
Binary files differ
diff --git a/doc/src/images/cde-dateedit.png b/src/widgets/doc/images/cde-dateedit.png
index ebb24d59cf..ebb24d59cf 100644
--- a/doc/src/images/cde-dateedit.png
+++ b/src/widgets/doc/images/cde-dateedit.png
Binary files differ
diff --git a/doc/src/images/cde-datetimeedit.png b/src/widgets/doc/images/cde-datetimeedit.png
index 9ac659a3f3..9ac659a3f3 100644
--- a/doc/src/images/cde-datetimeedit.png
+++ b/src/widgets/doc/images/cde-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/cde-dial.png b/src/widgets/doc/images/cde-dial.png
index 956d19cb6c..956d19cb6c 100644
--- a/doc/src/images/cde-dial.png
+++ b/src/widgets/doc/images/cde-dial.png
Binary files differ
diff --git a/doc/src/images/cde-doublespinbox.png b/src/widgets/doc/images/cde-doublespinbox.png
index 30a9af66fa..30a9af66fa 100644
--- a/doc/src/images/cde-doublespinbox.png
+++ b/src/widgets/doc/images/cde-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/cde-fontcombobox.png b/src/widgets/doc/images/cde-fontcombobox.png
index 043ca1d20f..043ca1d20f 100644
--- a/doc/src/images/cde-fontcombobox.png
+++ b/src/widgets/doc/images/cde-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/cde-frame.png b/src/widgets/doc/images/cde-frame.png
index 221576e849..221576e849 100644
--- a/doc/src/images/cde-frame.png
+++ b/src/widgets/doc/images/cde-frame.png
Binary files differ
diff --git a/doc/src/images/cde-groupbox.png b/src/widgets/doc/images/cde-groupbox.png
index 8bad69be4e..8bad69be4e 100644
--- a/doc/src/images/cde-groupbox.png
+++ b/src/widgets/doc/images/cde-groupbox.png
Binary files differ
diff --git a/doc/src/images/cde-horizontalscrollbar.png b/src/widgets/doc/images/cde-horizontalscrollbar.png
index 6e7cde8da1..6e7cde8da1 100644
--- a/doc/src/images/cde-horizontalscrollbar.png
+++ b/src/widgets/doc/images/cde-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/cde-label.png b/src/widgets/doc/images/cde-label.png
index 4e906eaa00..4e906eaa00 100644
--- a/doc/src/images/cde-label.png
+++ b/src/widgets/doc/images/cde-label.png
Binary files differ
diff --git a/doc/src/images/cde-lcdnumber.png b/src/widgets/doc/images/cde-lcdnumber.png
index 97324c1a6c..97324c1a6c 100644
--- a/doc/src/images/cde-lcdnumber.png
+++ b/src/widgets/doc/images/cde-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/cde-lineedit.png b/src/widgets/doc/images/cde-lineedit.png
index 6c1527ba19..6c1527ba19 100644
--- a/doc/src/images/cde-lineedit.png
+++ b/src/widgets/doc/images/cde-lineedit.png
Binary files differ
diff --git a/doc/src/images/cde-listview.png b/src/widgets/doc/images/cde-listview.png
index 2e58140880..2e58140880 100644
--- a/doc/src/images/cde-listview.png
+++ b/src/widgets/doc/images/cde-listview.png
Binary files differ
diff --git a/doc/src/images/cde-progressbar.png b/src/widgets/doc/images/cde-progressbar.png
index 41715deb48..41715deb48 100644
--- a/doc/src/images/cde-progressbar.png
+++ b/src/widgets/doc/images/cde-progressbar.png
Binary files differ
diff --git a/doc/src/images/cde-pushbutton.png b/src/widgets/doc/images/cde-pushbutton.png
index 2d9bdd25a4..2d9bdd25a4 100644
--- a/doc/src/images/cde-pushbutton.png
+++ b/src/widgets/doc/images/cde-pushbutton.png
Binary files differ
diff --git a/doc/src/images/cde-radiobutton.png b/src/widgets/doc/images/cde-radiobutton.png
index e053665f5a..e053665f5a 100644
--- a/doc/src/images/cde-radiobutton.png
+++ b/src/widgets/doc/images/cde-radiobutton.png
Binary files differ
diff --git a/doc/src/images/cde-slider.png b/src/widgets/doc/images/cde-slider.png
index bd84371898..bd84371898 100644
--- a/doc/src/images/cde-slider.png
+++ b/src/widgets/doc/images/cde-slider.png
Binary files differ
diff --git a/doc/src/images/cde-spinbox.png b/src/widgets/doc/images/cde-spinbox.png
index 5f53c8e902..5f53c8e902 100644
--- a/doc/src/images/cde-spinbox.png
+++ b/src/widgets/doc/images/cde-spinbox.png
Binary files differ
diff --git a/doc/src/images/cde-tableview.png b/src/widgets/doc/images/cde-tableview.png
index 7a99217560..7a99217560 100644
--- a/doc/src/images/cde-tableview.png
+++ b/src/widgets/doc/images/cde-tableview.png
Binary files differ
diff --git a/doc/src/images/cde-tabwidget.png b/src/widgets/doc/images/cde-tabwidget.png
index 8cf5473fc2..8cf5473fc2 100644
--- a/doc/src/images/cde-tabwidget.png
+++ b/src/widgets/doc/images/cde-tabwidget.png
Binary files differ
diff --git a/doc/src/images/cde-textedit.png b/src/widgets/doc/images/cde-textedit.png
index c65b8da8f4..c65b8da8f4 100644
--- a/doc/src/images/cde-textedit.png
+++ b/src/widgets/doc/images/cde-textedit.png
Binary files differ
diff --git a/doc/src/images/cde-timeedit.png b/src/widgets/doc/images/cde-timeedit.png
index 6a5a4b953f..6a5a4b953f 100644
--- a/doc/src/images/cde-timeedit.png
+++ b/src/widgets/doc/images/cde-timeedit.png
Binary files differ
diff --git a/doc/src/images/cde-toolbox.png b/src/widgets/doc/images/cde-toolbox.png
index c0dd4e9400..c0dd4e9400 100644
--- a/doc/src/images/cde-toolbox.png
+++ b/src/widgets/doc/images/cde-toolbox.png
Binary files differ
diff --git a/doc/src/images/cde-toolbutton.png b/src/widgets/doc/images/cde-toolbutton.png
index baff25c25b..baff25c25b 100644
--- a/doc/src/images/cde-toolbutton.png
+++ b/src/widgets/doc/images/cde-toolbutton.png
Binary files differ
diff --git a/doc/src/images/cde-treeview.png b/src/widgets/doc/images/cde-treeview.png
index df3184b31b..df3184b31b 100644
--- a/doc/src/images/cde-treeview.png
+++ b/src/widgets/doc/images/cde-treeview.png
Binary files differ
diff --git a/src/widgets/doc/images/checkboxes-exclusive.png b/src/widgets/doc/images/checkboxes-exclusive.png
new file mode 100644
index 0000000000..0ada3a046a
--- /dev/null
+++ b/src/widgets/doc/images/checkboxes-exclusive.png
Binary files differ
diff --git a/src/widgets/doc/images/checkboxes-non-exclusive.png b/src/widgets/doc/images/checkboxes-non-exclusive.png
new file mode 100644
index 0000000000..4211aaedfb
--- /dev/null
+++ b/src/widgets/doc/images/checkboxes-non-exclusive.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-calendarwidget.png b/src/widgets/doc/images/cleanlooks-calendarwidget.png
index 99c57b61ee..99c57b61ee 100644
--- a/doc/src/images/cleanlooks-calendarwidget.png
+++ b/src/widgets/doc/images/cleanlooks-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-checkbox.png b/src/widgets/doc/images/cleanlooks-checkbox.png
index aaf2daae4e..aaf2daae4e 100644
--- a/doc/src/images/cleanlooks-checkbox.png
+++ b/src/widgets/doc/images/cleanlooks-checkbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-combobox.png b/src/widgets/doc/images/cleanlooks-combobox.png
index 5fff4c87f6..5fff4c87f6 100644
--- a/doc/src/images/cleanlooks-combobox.png
+++ b/src/widgets/doc/images/cleanlooks-combobox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-dateedit.png b/src/widgets/doc/images/cleanlooks-dateedit.png
index 384136a162..384136a162 100644
--- a/doc/src/images/cleanlooks-dateedit.png
+++ b/src/widgets/doc/images/cleanlooks-dateedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-datetimeedit.png b/src/widgets/doc/images/cleanlooks-datetimeedit.png
index 7a62cebfb4..7a62cebfb4 100644
--- a/doc/src/images/cleanlooks-datetimeedit.png
+++ b/src/widgets/doc/images/cleanlooks-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-dial.png b/src/widgets/doc/images/cleanlooks-dial.png
index 259a0888b6..259a0888b6 100644
--- a/doc/src/images/cleanlooks-dial.png
+++ b/src/widgets/doc/images/cleanlooks-dial.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-doublespinbox.png b/src/widgets/doc/images/cleanlooks-doublespinbox.png
index 93b11f919a..93b11f919a 100644
--- a/doc/src/images/cleanlooks-doublespinbox.png
+++ b/src/widgets/doc/images/cleanlooks-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-fontcombobox.png b/src/widgets/doc/images/cleanlooks-fontcombobox.png
index 47a5907f56..47a5907f56 100644
--- a/doc/src/images/cleanlooks-fontcombobox.png
+++ b/src/widgets/doc/images/cleanlooks-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-frame.png b/src/widgets/doc/images/cleanlooks-frame.png
index 2427b08d8f..2427b08d8f 100644
--- a/doc/src/images/cleanlooks-frame.png
+++ b/src/widgets/doc/images/cleanlooks-frame.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-groupbox.png b/src/widgets/doc/images/cleanlooks-groupbox.png
index 89c6eb2f39..89c6eb2f39 100644
--- a/doc/src/images/cleanlooks-groupbox.png
+++ b/src/widgets/doc/images/cleanlooks-groupbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-horizontalscrollbar.png b/src/widgets/doc/images/cleanlooks-horizontalscrollbar.png
index ca1c806c91..ca1c806c91 100644
--- a/doc/src/images/cleanlooks-horizontalscrollbar.png
+++ b/src/widgets/doc/images/cleanlooks-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-label.png b/src/widgets/doc/images/cleanlooks-label.png
index 199758fd69..199758fd69 100644
--- a/doc/src/images/cleanlooks-label.png
+++ b/src/widgets/doc/images/cleanlooks-label.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-lcdnumber.png b/src/widgets/doc/images/cleanlooks-lcdnumber.png
index c6e34127cf..c6e34127cf 100644
--- a/doc/src/images/cleanlooks-lcdnumber.png
+++ b/src/widgets/doc/images/cleanlooks-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-lineedit.png b/src/widgets/doc/images/cleanlooks-lineedit.png
index 3e9f1a4be3..3e9f1a4be3 100644
--- a/doc/src/images/cleanlooks-lineedit.png
+++ b/src/widgets/doc/images/cleanlooks-lineedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-listview.png b/src/widgets/doc/images/cleanlooks-listview.png
index 95f836c66b..95f836c66b 100644
--- a/doc/src/images/cleanlooks-listview.png
+++ b/src/widgets/doc/images/cleanlooks-listview.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-progressbar.png b/src/widgets/doc/images/cleanlooks-progressbar.png
index 53fc6c1faa..53fc6c1faa 100644
--- a/doc/src/images/cleanlooks-progressbar.png
+++ b/src/widgets/doc/images/cleanlooks-progressbar.png
Binary files differ
diff --git a/src/widgets/doc/images/cleanlooks-pushbutton-menu.png b/src/widgets/doc/images/cleanlooks-pushbutton-menu.png
new file mode 100644
index 0000000000..0d5cb59ec0
--- /dev/null
+++ b/src/widgets/doc/images/cleanlooks-pushbutton-menu.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-pushbutton.png b/src/widgets/doc/images/cleanlooks-pushbutton.png
index 7b3b3357c1..7b3b3357c1 100644
--- a/doc/src/images/cleanlooks-pushbutton.png
+++ b/src/widgets/doc/images/cleanlooks-pushbutton.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-radiobutton.png b/src/widgets/doc/images/cleanlooks-radiobutton.png
index 4e077688c2..4e077688c2 100644
--- a/doc/src/images/cleanlooks-radiobutton.png
+++ b/src/widgets/doc/images/cleanlooks-radiobutton.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-slider.png b/src/widgets/doc/images/cleanlooks-slider.png
index 8dfaa01092..8dfaa01092 100644
--- a/doc/src/images/cleanlooks-slider.png
+++ b/src/widgets/doc/images/cleanlooks-slider.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-spinbox.png b/src/widgets/doc/images/cleanlooks-spinbox.png
index ad5b5a01b6..ad5b5a01b6 100644
--- a/doc/src/images/cleanlooks-spinbox.png
+++ b/src/widgets/doc/images/cleanlooks-spinbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-tableview.png b/src/widgets/doc/images/cleanlooks-tableview.png
index d89fecc5ad..d89fecc5ad 100644
--- a/doc/src/images/cleanlooks-tableview.png
+++ b/src/widgets/doc/images/cleanlooks-tableview.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-tabwidget.png b/src/widgets/doc/images/cleanlooks-tabwidget.png
index bcff2967aa..bcff2967aa 100644
--- a/doc/src/images/cleanlooks-tabwidget.png
+++ b/src/widgets/doc/images/cleanlooks-tabwidget.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-textedit.png b/src/widgets/doc/images/cleanlooks-textedit.png
index 0c825a1e04..0c825a1e04 100644
--- a/doc/src/images/cleanlooks-textedit.png
+++ b/src/widgets/doc/images/cleanlooks-textedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-timeedit.png b/src/widgets/doc/images/cleanlooks-timeedit.png
index 00420a2f18..00420a2f18 100644
--- a/doc/src/images/cleanlooks-timeedit.png
+++ b/src/widgets/doc/images/cleanlooks-timeedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-toolbox.png b/src/widgets/doc/images/cleanlooks-toolbox.png
index 63366e5422..63366e5422 100644
--- a/doc/src/images/cleanlooks-toolbox.png
+++ b/src/widgets/doc/images/cleanlooks-toolbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-toolbutton.png b/src/widgets/doc/images/cleanlooks-toolbutton.png
index bcf86ea26f..bcf86ea26f 100644
--- a/doc/src/images/cleanlooks-toolbutton.png
+++ b/src/widgets/doc/images/cleanlooks-toolbutton.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-treeview.png b/src/widgets/doc/images/cleanlooks-treeview.png
index 5bc4a06a3c..5bc4a06a3c 100644
--- a/doc/src/images/cleanlooks-treeview.png
+++ b/src/widgets/doc/images/cleanlooks-treeview.png
Binary files differ
diff --git a/doc/src/images/clock.png b/src/widgets/doc/images/clock.png
index c7f6a1b296..c7f6a1b296 100644
--- a/doc/src/images/clock.png
+++ b/src/widgets/doc/images/clock.png
Binary files differ
diff --git a/src/widgets/doc/images/columnview.png b/src/widgets/doc/images/columnview.png
new file mode 100644
index 0000000000..127b79531f
--- /dev/null
+++ b/src/widgets/doc/images/columnview.png
Binary files differ
diff --git a/doc/src/images/designer-stylesheet-options.png b/src/widgets/doc/images/designer-stylesheet-options.png
index a6893e770b..a6893e770b 100644
--- a/doc/src/images/designer-stylesheet-options.png
+++ b/src/widgets/doc/images/designer-stylesheet-options.png
Binary files differ
diff --git a/doc/src/images/designer-stylesheet-usage.png b/src/widgets/doc/images/designer-stylesheet-usage.png
index f6875900de..f6875900de 100644
--- a/doc/src/images/designer-stylesheet-usage.png
+++ b/src/widgets/doc/images/designer-stylesheet-usage.png
Binary files differ
diff --git a/doc/src/images/designer-validator-highlighter.png b/src/widgets/doc/images/designer-validator-highlighter.png
index a6661d5c95..a6661d5c95 100644
--- a/doc/src/images/designer-validator-highlighter.png
+++ b/src/widgets/doc/images/designer-validator-highlighter.png
Binary files differ
diff --git a/doc/src/images/dummy_tree.png b/src/widgets/doc/images/dummy_tree.png
index 7373ea60f6..7373ea60f6 100644
--- a/doc/src/images/dummy_tree.png
+++ b/src/widgets/doc/images/dummy_tree.png
Binary files differ
diff --git a/doc/src/images/example_model.png b/src/widgets/doc/images/example_model.png
index 4261261c7e..4261261c7e 100644
--- a/doc/src/images/example_model.png
+++ b/src/widgets/doc/images/example_model.png
Binary files differ
diff --git a/doc/src/images/filedialogurls.png b/src/widgets/doc/images/filedialogurls.png
index 7d22ef33ae..7d22ef33ae 100644
--- a/doc/src/images/filedialogurls.png
+++ b/src/widgets/doc/images/filedialogurls.png
Binary files differ
diff --git a/doc/src/images/frames.png b/src/widgets/doc/images/frames.png
index 13c08508a2..13c08508a2 100644
--- a/doc/src/images/frames.png
+++ b/src/widgets/doc/images/frames.png
Binary files differ
diff --git a/src/widgets/doc/images/graphicsview-ellipseitem-pie.png b/src/widgets/doc/images/graphicsview-ellipseitem-pie.png
new file mode 100644
index 0000000000..136175abc2
--- /dev/null
+++ b/src/widgets/doc/images/graphicsview-ellipseitem-pie.png
Binary files differ
diff --git a/src/widgets/doc/images/graphicsview-ellipseitem.png b/src/widgets/doc/images/graphicsview-ellipseitem.png
new file mode 100644
index 0000000000..7c7a8e58d0
--- /dev/null
+++ b/src/widgets/doc/images/graphicsview-ellipseitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-items.png b/src/widgets/doc/images/graphicsview-items.png
index 73be2ddaee..73be2ddaee 100644
--- a/doc/src/images/graphicsview-items.png
+++ b/src/widgets/doc/images/graphicsview-items.png
Binary files differ
diff --git a/doc/src/images/graphicsview-pathitem.png b/src/widgets/doc/images/graphicsview-pathitem.png
index c1ddd5620a..c1ddd5620a 100644
--- a/doc/src/images/graphicsview-pathitem.png
+++ b/src/widgets/doc/images/graphicsview-pathitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-pixmapitem.png b/src/widgets/doc/images/graphicsview-pixmapitem.png
index d14fac55e0..d14fac55e0 100644
--- a/doc/src/images/graphicsview-pixmapitem.png
+++ b/src/widgets/doc/images/graphicsview-pixmapitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-polygonitem.png b/src/widgets/doc/images/graphicsview-polygonitem.png
index 3cd2232574..3cd2232574 100644
--- a/doc/src/images/graphicsview-polygonitem.png
+++ b/src/widgets/doc/images/graphicsview-polygonitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-rectitem.png b/src/widgets/doc/images/graphicsview-rectitem.png
index a5917e55dd..a5917e55dd 100644
--- a/doc/src/images/graphicsview-rectitem.png
+++ b/src/widgets/doc/images/graphicsview-rectitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-zorder.png b/src/widgets/doc/images/graphicsview-zorder.png
index a1cc3d0168..a1cc3d0168 100644
--- a/doc/src/images/graphicsview-zorder.png
+++ b/src/widgets/doc/images/graphicsview-zorder.png
Binary files differ
diff --git a/doc/src/images/gridlayout.png b/src/widgets/doc/images/gridlayout.png
index ae76c0487b..ae76c0487b 100644
--- a/doc/src/images/gridlayout.png
+++ b/src/widgets/doc/images/gridlayout.png
Binary files differ
diff --git a/doc/src/images/gtk-calendarwidget.png b/src/widgets/doc/images/gtk-calendarwidget.png
index 568cd1a5da..568cd1a5da 100644
--- a/doc/src/images/gtk-calendarwidget.png
+++ b/src/widgets/doc/images/gtk-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/gtk-checkbox.png b/src/widgets/doc/images/gtk-checkbox.png
index 1fd5fc77bf..1fd5fc77bf 100644
--- a/doc/src/images/gtk-checkbox.png
+++ b/src/widgets/doc/images/gtk-checkbox.png
Binary files differ
diff --git a/doc/src/images/gtk-combobox.png b/src/widgets/doc/images/gtk-combobox.png
index 3b4544df13..3b4544df13 100644
--- a/doc/src/images/gtk-combobox.png
+++ b/src/widgets/doc/images/gtk-combobox.png
Binary files differ
diff --git a/doc/src/images/gtk-dateedit.png b/src/widgets/doc/images/gtk-dateedit.png
index 25229f0b3b..25229f0b3b 100644
--- a/doc/src/images/gtk-dateedit.png
+++ b/src/widgets/doc/images/gtk-dateedit.png
Binary files differ
diff --git a/doc/src/images/gtk-datetimeedit.png b/src/widgets/doc/images/gtk-datetimeedit.png
index 0c934a4d0d..0c934a4d0d 100644
--- a/doc/src/images/gtk-datetimeedit.png
+++ b/src/widgets/doc/images/gtk-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/gtk-dial.png b/src/widgets/doc/images/gtk-dial.png
index 18e14b3650..18e14b3650 100644
--- a/doc/src/images/gtk-dial.png
+++ b/src/widgets/doc/images/gtk-dial.png
Binary files differ
diff --git a/doc/src/images/gtk-doublespinbox.png b/src/widgets/doc/images/gtk-doublespinbox.png
index 3a69043c0b..3a69043c0b 100644
--- a/doc/src/images/gtk-doublespinbox.png
+++ b/src/widgets/doc/images/gtk-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/gtk-fontcombobox.png b/src/widgets/doc/images/gtk-fontcombobox.png
index 4cb1bc1343..4cb1bc1343 100644
--- a/doc/src/images/gtk-fontcombobox.png
+++ b/src/widgets/doc/images/gtk-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/gtk-frame.png b/src/widgets/doc/images/gtk-frame.png
index c1bf52f6a6..c1bf52f6a6 100644
--- a/doc/src/images/gtk-frame.png
+++ b/src/widgets/doc/images/gtk-frame.png
Binary files differ
diff --git a/doc/src/images/gtk-groupbox.png b/src/widgets/doc/images/gtk-groupbox.png
index 6d217c89f9..6d217c89f9 100644
--- a/doc/src/images/gtk-groupbox.png
+++ b/src/widgets/doc/images/gtk-groupbox.png
Binary files differ
diff --git a/doc/src/images/gtk-horizontalscrollbar.png b/src/widgets/doc/images/gtk-horizontalscrollbar.png
index 2887730c13..2887730c13 100644
--- a/doc/src/images/gtk-horizontalscrollbar.png
+++ b/src/widgets/doc/images/gtk-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/gtk-label.png b/src/widgets/doc/images/gtk-label.png
index 006d0133d8..006d0133d8 100644
--- a/doc/src/images/gtk-label.png
+++ b/src/widgets/doc/images/gtk-label.png
Binary files differ
diff --git a/doc/src/images/gtk-lcdnumber.png b/src/widgets/doc/images/gtk-lcdnumber.png
index 142d298ffc..142d298ffc 100644
--- a/doc/src/images/gtk-lcdnumber.png
+++ b/src/widgets/doc/images/gtk-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/gtk-lineedit.png b/src/widgets/doc/images/gtk-lineedit.png
index 8fb513c39f..8fb513c39f 100644
--- a/doc/src/images/gtk-lineedit.png
+++ b/src/widgets/doc/images/gtk-lineedit.png
Binary files differ
diff --git a/doc/src/images/gtk-listview.png b/src/widgets/doc/images/gtk-listview.png
index d32f8e8aee..d32f8e8aee 100644
--- a/doc/src/images/gtk-listview.png
+++ b/src/widgets/doc/images/gtk-listview.png
Binary files differ
diff --git a/doc/src/images/gtk-progressbar.png b/src/widgets/doc/images/gtk-progressbar.png
index 6162484bf3..6162484bf3 100644
--- a/doc/src/images/gtk-progressbar.png
+++ b/src/widgets/doc/images/gtk-progressbar.png
Binary files differ
diff --git a/doc/src/images/gtk-pushbutton.png b/src/widgets/doc/images/gtk-pushbutton.png
index f4f4d7c1e4..f4f4d7c1e4 100644
--- a/doc/src/images/gtk-pushbutton.png
+++ b/src/widgets/doc/images/gtk-pushbutton.png
Binary files differ
diff --git a/doc/src/images/gtk-radiobutton.png b/src/widgets/doc/images/gtk-radiobutton.png
index b3620fa054..b3620fa054 100644
--- a/doc/src/images/gtk-radiobutton.png
+++ b/src/widgets/doc/images/gtk-radiobutton.png
Binary files differ
diff --git a/doc/src/images/gtk-slider.png b/src/widgets/doc/images/gtk-slider.png
index 3d8e0ee89e..3d8e0ee89e 100644
--- a/doc/src/images/gtk-slider.png
+++ b/src/widgets/doc/images/gtk-slider.png
Binary files differ
diff --git a/doc/src/images/gtk-spinbox.png b/src/widgets/doc/images/gtk-spinbox.png
index a39eb3aa93..a39eb3aa93 100644
--- a/doc/src/images/gtk-spinbox.png
+++ b/src/widgets/doc/images/gtk-spinbox.png
Binary files differ
diff --git a/doc/src/images/gtk-tableview.png b/src/widgets/doc/images/gtk-tableview.png
index a025193188..a025193188 100644
--- a/doc/src/images/gtk-tableview.png
+++ b/src/widgets/doc/images/gtk-tableview.png
Binary files differ
diff --git a/doc/src/images/gtk-tabwidget.png b/src/widgets/doc/images/gtk-tabwidget.png
index 089c76dad2..089c76dad2 100644
--- a/doc/src/images/gtk-tabwidget.png
+++ b/src/widgets/doc/images/gtk-tabwidget.png
Binary files differ
diff --git a/doc/src/images/gtk-textedit.png b/src/widgets/doc/images/gtk-textedit.png
index e4b91c01c9..e4b91c01c9 100644
--- a/doc/src/images/gtk-textedit.png
+++ b/src/widgets/doc/images/gtk-textedit.png
Binary files differ
diff --git a/doc/src/images/gtk-timeedit.png b/src/widgets/doc/images/gtk-timeedit.png
index acf6730a86..acf6730a86 100644
--- a/doc/src/images/gtk-timeedit.png
+++ b/src/widgets/doc/images/gtk-timeedit.png
Binary files differ
diff --git a/doc/src/images/gtk-toolbox.png b/src/widgets/doc/images/gtk-toolbox.png
index 25e6137699..25e6137699 100644
--- a/doc/src/images/gtk-toolbox.png
+++ b/src/widgets/doc/images/gtk-toolbox.png
Binary files differ
diff --git a/doc/src/images/gtk-toolbutton.png b/src/widgets/doc/images/gtk-toolbutton.png
index f0eb86efc5..f0eb86efc5 100644
--- a/doc/src/images/gtk-toolbutton.png
+++ b/src/widgets/doc/images/gtk-toolbutton.png
Binary files differ
diff --git a/doc/src/images/gtk-treeview.png b/src/widgets/doc/images/gtk-treeview.png
index 7b4e3044be..7b4e3044be 100644
--- a/doc/src/images/gtk-treeview.png
+++ b/src/widgets/doc/images/gtk-treeview.png
Binary files differ
diff --git a/doc/src/images/javastyle/branchindicatorimage.png b/src/widgets/doc/images/javastyle/branchindicatorimage.png
index f2cfc4b2e9..f2cfc4b2e9 100644
--- a/doc/src/images/javastyle/branchindicatorimage.png
+++ b/src/widgets/doc/images/javastyle/branchindicatorimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/button.png b/src/widgets/doc/images/javastyle/button.png
index c3a97425b1..c3a97425b1 100644
--- a/doc/src/images/javastyle/button.png
+++ b/src/widgets/doc/images/javastyle/button.png
Binary files differ
diff --git a/doc/src/images/javastyle/checkbox.png b/src/widgets/doc/images/javastyle/checkbox.png
index bc841a6a6d..bc841a6a6d 100644
--- a/doc/src/images/javastyle/checkbox.png
+++ b/src/widgets/doc/images/javastyle/checkbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/checkboxexample.png b/src/widgets/doc/images/javastyle/checkboxexample.png
index 69217fb2e5..69217fb2e5 100644
--- a/doc/src/images/javastyle/checkboxexample.png
+++ b/src/widgets/doc/images/javastyle/checkboxexample.png
Binary files differ
diff --git a/doc/src/images/javastyle/combobox.png b/src/widgets/doc/images/javastyle/combobox.png
index de9745a218..de9745a218 100644
--- a/doc/src/images/javastyle/combobox.png
+++ b/src/widgets/doc/images/javastyle/combobox.png
Binary files differ
diff --git a/doc/src/images/javastyle/comboboximage.png b/src/widgets/doc/images/javastyle/comboboximage.png
index 1f05e5fe86..1f05e5fe86 100644
--- a/doc/src/images/javastyle/comboboximage.png
+++ b/src/widgets/doc/images/javastyle/comboboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/conceptualpushbuttontree.png b/src/widgets/doc/images/javastyle/conceptualpushbuttontree.png
index 910000a6e8..910000a6e8 100644
--- a/doc/src/images/javastyle/conceptualpushbuttontree.png
+++ b/src/widgets/doc/images/javastyle/conceptualpushbuttontree.png
Binary files differ
diff --git a/doc/src/images/javastyle/dockwidget.png b/src/widgets/doc/images/javastyle/dockwidget.png
index 4bfec142bf..4bfec142bf 100644
--- a/doc/src/images/javastyle/dockwidget.png
+++ b/src/widgets/doc/images/javastyle/dockwidget.png
Binary files differ
diff --git a/doc/src/images/javastyle/dockwidgetimage.png b/src/widgets/doc/images/javastyle/dockwidgetimage.png
index eefe171e3e..eefe171e3e 100644
--- a/doc/src/images/javastyle/dockwidgetimage.png
+++ b/src/widgets/doc/images/javastyle/dockwidgetimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/groupbox.png b/src/widgets/doc/images/javastyle/groupbox.png
index a39cd42c9f..a39cd42c9f 100644
--- a/doc/src/images/javastyle/groupbox.png
+++ b/src/widgets/doc/images/javastyle/groupbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/groupboximage.png b/src/widgets/doc/images/javastyle/groupboximage.png
index 5baf6092d4..5baf6092d4 100644
--- a/doc/src/images/javastyle/groupboximage.png
+++ b/src/widgets/doc/images/javastyle/groupboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/header.png b/src/widgets/doc/images/javastyle/header.png
index b4546d840e..b4546d840e 100644
--- a/doc/src/images/javastyle/header.png
+++ b/src/widgets/doc/images/javastyle/header.png
Binary files differ
diff --git a/doc/src/images/javastyle/headerimage.png b/src/widgets/doc/images/javastyle/headerimage.png
index 41171497d5..41171497d5 100644
--- a/doc/src/images/javastyle/headerimage.png
+++ b/src/widgets/doc/images/javastyle/headerimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/menu.png b/src/widgets/doc/images/javastyle/menu.png
index 8d44da4054..8d44da4054 100644
--- a/doc/src/images/javastyle/menu.png
+++ b/src/widgets/doc/images/javastyle/menu.png
Binary files differ
diff --git a/doc/src/images/javastyle/menubar.png b/src/widgets/doc/images/javastyle/menubar.png
index e68e4a3a55..e68e4a3a55 100644
--- a/doc/src/images/javastyle/menubar.png
+++ b/src/widgets/doc/images/javastyle/menubar.png
Binary files differ
diff --git a/doc/src/images/javastyle/menubarimage.png b/src/widgets/doc/images/javastyle/menubarimage.png
index b0cf28edcc..b0cf28edcc 100644
--- a/doc/src/images/javastyle/menubarimage.png
+++ b/src/widgets/doc/images/javastyle/menubarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/menuimage.png b/src/widgets/doc/images/javastyle/menuimage.png
index 282dde7159..282dde7159 100644
--- a/doc/src/images/javastyle/menuimage.png
+++ b/src/widgets/doc/images/javastyle/menuimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/progressbar.png b/src/widgets/doc/images/javastyle/progressbar.png
index de3a838c38..de3a838c38 100644
--- a/doc/src/images/javastyle/progressbar.png
+++ b/src/widgets/doc/images/javastyle/progressbar.png
Binary files differ
diff --git a/doc/src/images/javastyle/progressbarimage.png b/src/widgets/doc/images/javastyle/progressbarimage.png
index 433b900ab5..433b900ab5 100644
--- a/doc/src/images/javastyle/progressbarimage.png
+++ b/src/widgets/doc/images/javastyle/progressbarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/pushbutton.png b/src/widgets/doc/images/javastyle/pushbutton.png
index e5f92bea12..e5f92bea12 100644
--- a/doc/src/images/javastyle/pushbutton.png
+++ b/src/widgets/doc/images/javastyle/pushbutton.png
Binary files differ
diff --git a/doc/src/images/javastyle/rubberband.png b/src/widgets/doc/images/javastyle/rubberband.png
index 087424a3f0..087424a3f0 100644
--- a/doc/src/images/javastyle/rubberband.png
+++ b/src/widgets/doc/images/javastyle/rubberband.png
Binary files differ
diff --git a/doc/src/images/javastyle/rubberbandimage.png b/src/widgets/doc/images/javastyle/rubberbandimage.png
index 2794638dbc..2794638dbc 100644
--- a/doc/src/images/javastyle/rubberbandimage.png
+++ b/src/widgets/doc/images/javastyle/rubberbandimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/scrollbar.png b/src/widgets/doc/images/javastyle/scrollbar.png
index c1ecb5d655..c1ecb5d655 100644
--- a/doc/src/images/javastyle/scrollbar.png
+++ b/src/widgets/doc/images/javastyle/scrollbar.png
Binary files differ
diff --git a/doc/src/images/javastyle/scrollbarimage.png b/src/widgets/doc/images/javastyle/scrollbarimage.png
index 6d3e29d8dd..6d3e29d8dd 100644
--- a/doc/src/images/javastyle/scrollbarimage.png
+++ b/src/widgets/doc/images/javastyle/scrollbarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/sizegrip.png b/src/widgets/doc/images/javastyle/sizegrip.png
index 667e6fb465..667e6fb465 100644
--- a/doc/src/images/javastyle/sizegrip.png
+++ b/src/widgets/doc/images/javastyle/sizegrip.png
Binary files differ
diff --git a/doc/src/images/javastyle/sizegripimage.png b/src/widgets/doc/images/javastyle/sizegripimage.png
index ccbf5254d3..ccbf5254d3 100644
--- a/doc/src/images/javastyle/sizegripimage.png
+++ b/src/widgets/doc/images/javastyle/sizegripimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/slider.png b/src/widgets/doc/images/javastyle/slider.png
index a382233f58..a382233f58 100644
--- a/doc/src/images/javastyle/slider.png
+++ b/src/widgets/doc/images/javastyle/slider.png
Binary files differ
diff --git a/doc/src/images/javastyle/sliderimage.png b/src/widgets/doc/images/javastyle/sliderimage.png
index df700dd712..df700dd712 100644
--- a/doc/src/images/javastyle/sliderimage.png
+++ b/src/widgets/doc/images/javastyle/sliderimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/spinbox.png b/src/widgets/doc/images/javastyle/spinbox.png
index ec9d6e0d75..ec9d6e0d75 100644
--- a/doc/src/images/javastyle/spinbox.png
+++ b/src/widgets/doc/images/javastyle/spinbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/spinboximage.png b/src/widgets/doc/images/javastyle/spinboximage.png
index d0d57c8ffb..d0d57c8ffb 100644
--- a/doc/src/images/javastyle/spinboximage.png
+++ b/src/widgets/doc/images/javastyle/spinboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/tab.png b/src/widgets/doc/images/javastyle/tab.png
index 616580c839..616580c839 100644
--- a/doc/src/images/javastyle/tab.png
+++ b/src/widgets/doc/images/javastyle/tab.png
Binary files differ
diff --git a/doc/src/images/javastyle/tabwidget.png b/src/widgets/doc/images/javastyle/tabwidget.png
index 737155ccb9..737155ccb9 100644
--- a/doc/src/images/javastyle/tabwidget.png
+++ b/src/widgets/doc/images/javastyle/tabwidget.png
Binary files differ
diff --git a/doc/src/images/javastyle/titlebar.png b/src/widgets/doc/images/javastyle/titlebar.png
index 5d7ecc481d..5d7ecc481d 100644
--- a/doc/src/images/javastyle/titlebar.png
+++ b/src/widgets/doc/images/javastyle/titlebar.png
Binary files differ
diff --git a/doc/src/images/javastyle/titlebarimage.png b/src/widgets/doc/images/javastyle/titlebarimage.png
index 50287aeb1d..50287aeb1d 100644
--- a/doc/src/images/javastyle/titlebarimage.png
+++ b/src/widgets/doc/images/javastyle/titlebarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbar.png b/src/widgets/doc/images/javastyle/toolbar.png
index e69e8df4c8..e69e8df4c8 100644
--- a/doc/src/images/javastyle/toolbar.png
+++ b/src/widgets/doc/images/javastyle/toolbar.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbarimage.png b/src/widgets/doc/images/javastyle/toolbarimage.png
index b9025f582a..b9025f582a 100644
--- a/doc/src/images/javastyle/toolbarimage.png
+++ b/src/widgets/doc/images/javastyle/toolbarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbox.png b/src/widgets/doc/images/javastyle/toolbox.png
index c5f61ecec8..c5f61ecec8 100644
--- a/doc/src/images/javastyle/toolbox.png
+++ b/src/widgets/doc/images/javastyle/toolbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolboximage.png b/src/widgets/doc/images/javastyle/toolboximage.png
index 7bcbd26432..7bcbd26432 100644
--- a/doc/src/images/javastyle/toolboximage.png
+++ b/src/widgets/doc/images/javastyle/toolboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbutton.png b/src/widgets/doc/images/javastyle/toolbutton.png
index 9167e83f75..9167e83f75 100644
--- a/doc/src/images/javastyle/toolbutton.png
+++ b/src/widgets/doc/images/javastyle/toolbutton.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbuttonimage.png b/src/widgets/doc/images/javastyle/toolbuttonimage.png
index 3217172fca..3217172fca 100644
--- a/doc/src/images/javastyle/toolbuttonimage.png
+++ b/src/widgets/doc/images/javastyle/toolbuttonimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/windowstabimage.png b/src/widgets/doc/images/javastyle/windowstabimage.png
index 485e847844..485e847844 100644
--- a/doc/src/images/javastyle/windowstabimage.png
+++ b/src/widgets/doc/images/javastyle/windowstabimage.png
Binary files differ
diff --git a/doc/src/images/licensewizard-flow.png b/src/widgets/doc/images/licensewizard-flow.png
index 76df63a98f..76df63a98f 100644
--- a/doc/src/images/licensewizard-flow.png
+++ b/src/widgets/doc/images/licensewizard-flow.png
Binary files differ
diff --git a/doc/src/images/list_table_tree.png b/src/widgets/doc/images/list_table_tree.png
index b2daf1f3a5..b2daf1f3a5 100644
--- a/doc/src/images/list_table_tree.png
+++ b/src/widgets/doc/images/list_table_tree.png
Binary files differ
diff --git a/src/widgets/doc/images/listview.png b/src/widgets/doc/images/listview.png
new file mode 100755
index 0000000000..fa49c52c62
--- /dev/null
+++ b/src/widgets/doc/images/listview.png
Binary files differ
diff --git a/doc/src/images/macintosh-calendarwidget.png b/src/widgets/doc/images/macintosh-calendarwidget.png
index 2f743501a9..2f743501a9 100644
--- a/doc/src/images/macintosh-calendarwidget.png
+++ b/src/widgets/doc/images/macintosh-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/macintosh-checkbox.png b/src/widgets/doc/images/macintosh-checkbox.png
index d0130e3f22..d0130e3f22 100644
--- a/doc/src/images/macintosh-checkbox.png
+++ b/src/widgets/doc/images/macintosh-checkbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-combobox.png b/src/widgets/doc/images/macintosh-combobox.png
index c1dc3c0c96..c1dc3c0c96 100644
--- a/doc/src/images/macintosh-combobox.png
+++ b/src/widgets/doc/images/macintosh-combobox.png
Binary files differ
diff --git a/doc/src/images/macintosh-dateedit.png b/src/widgets/doc/images/macintosh-dateedit.png
index 45aee90a9b..45aee90a9b 100644
--- a/doc/src/images/macintosh-dateedit.png
+++ b/src/widgets/doc/images/macintosh-dateedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-datetimeedit.png b/src/widgets/doc/images/macintosh-datetimeedit.png
index 62af02d64e..62af02d64e 100644
--- a/doc/src/images/macintosh-datetimeedit.png
+++ b/src/widgets/doc/images/macintosh-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-dial.png b/src/widgets/doc/images/macintosh-dial.png
index df0ffe23a1..df0ffe23a1 100644
--- a/doc/src/images/macintosh-dial.png
+++ b/src/widgets/doc/images/macintosh-dial.png
Binary files differ
diff --git a/doc/src/images/macintosh-doublespinbox.png b/src/widgets/doc/images/macintosh-doublespinbox.png
index a0695ff278..a0695ff278 100644
--- a/doc/src/images/macintosh-doublespinbox.png
+++ b/src/widgets/doc/images/macintosh-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-fontcombobox.png b/src/widgets/doc/images/macintosh-fontcombobox.png
index 8a5a3c78a3..8a5a3c78a3 100644
--- a/doc/src/images/macintosh-fontcombobox.png
+++ b/src/widgets/doc/images/macintosh-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/macintosh-frame.png b/src/widgets/doc/images/macintosh-frame.png
index fee61a3643..fee61a3643 100644
--- a/doc/src/images/macintosh-frame.png
+++ b/src/widgets/doc/images/macintosh-frame.png
Binary files differ
diff --git a/doc/src/images/macintosh-groupbox.png b/src/widgets/doc/images/macintosh-groupbox.png
index f6c7bce580..f6c7bce580 100644
--- a/doc/src/images/macintosh-groupbox.png
+++ b/src/widgets/doc/images/macintosh-groupbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-horizontalscrollbar.png b/src/widgets/doc/images/macintosh-horizontalscrollbar.png
index 8b63572a9e..8b63572a9e 100644
--- a/doc/src/images/macintosh-horizontalscrollbar.png
+++ b/src/widgets/doc/images/macintosh-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/macintosh-label.png b/src/widgets/doc/images/macintosh-label.png
index 753aa4d138..753aa4d138 100644
--- a/doc/src/images/macintosh-label.png
+++ b/src/widgets/doc/images/macintosh-label.png
Binary files differ
diff --git a/doc/src/images/macintosh-lcdnumber.png b/src/widgets/doc/images/macintosh-lcdnumber.png
index 2ea9ea0713..2ea9ea0713 100644
--- a/doc/src/images/macintosh-lcdnumber.png
+++ b/src/widgets/doc/images/macintosh-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/macintosh-lineedit.png b/src/widgets/doc/images/macintosh-lineedit.png
index 0e992c7ffe..0e992c7ffe 100644
--- a/doc/src/images/macintosh-lineedit.png
+++ b/src/widgets/doc/images/macintosh-lineedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-listview.png b/src/widgets/doc/images/macintosh-listview.png
index 346e6427ff..346e6427ff 100644
--- a/doc/src/images/macintosh-listview.png
+++ b/src/widgets/doc/images/macintosh-listview.png
Binary files differ
diff --git a/src/widgets/doc/images/macintosh-menu.png b/src/widgets/doc/images/macintosh-menu.png
new file mode 100644
index 0000000000..59bdceaab6
--- /dev/null
+++ b/src/widgets/doc/images/macintosh-menu.png
Binary files differ
diff --git a/doc/src/images/macintosh-progressbar.png b/src/widgets/doc/images/macintosh-progressbar.png
index 2dfc8aba81..2dfc8aba81 100644
--- a/doc/src/images/macintosh-progressbar.png
+++ b/src/widgets/doc/images/macintosh-progressbar.png
Binary files differ
diff --git a/doc/src/images/macintosh-pushbutton.png b/src/widgets/doc/images/macintosh-pushbutton.png
index 7ec14910d8..7ec14910d8 100644
--- a/doc/src/images/macintosh-pushbutton.png
+++ b/src/widgets/doc/images/macintosh-pushbutton.png
Binary files differ
diff --git a/doc/src/images/macintosh-radiobutton.png b/src/widgets/doc/images/macintosh-radiobutton.png
index 8b02f509ff..8b02f509ff 100644
--- a/doc/src/images/macintosh-radiobutton.png
+++ b/src/widgets/doc/images/macintosh-radiobutton.png
Binary files differ
diff --git a/doc/src/images/macintosh-slider.png b/src/widgets/doc/images/macintosh-slider.png
index bf0c5464e9..bf0c5464e9 100644
--- a/doc/src/images/macintosh-slider.png
+++ b/src/widgets/doc/images/macintosh-slider.png
Binary files differ
diff --git a/doc/src/images/macintosh-spinbox.png b/src/widgets/doc/images/macintosh-spinbox.png
index 4196c37246..4196c37246 100644
--- a/doc/src/images/macintosh-spinbox.png
+++ b/src/widgets/doc/images/macintosh-spinbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-tableview.png b/src/widgets/doc/images/macintosh-tableview.png
index e6512494de..e6512494de 100644
--- a/doc/src/images/macintosh-tableview.png
+++ b/src/widgets/doc/images/macintosh-tableview.png
Binary files differ
diff --git a/doc/src/images/macintosh-tabwidget.png b/src/widgets/doc/images/macintosh-tabwidget.png
index 1d174a47e6..1d174a47e6 100644
--- a/doc/src/images/macintosh-tabwidget.png
+++ b/src/widgets/doc/images/macintosh-tabwidget.png
Binary files differ
diff --git a/doc/src/images/macintosh-textedit.png b/src/widgets/doc/images/macintosh-textedit.png
index 4f0ce36baf..4f0ce36baf 100644
--- a/doc/src/images/macintosh-textedit.png
+++ b/src/widgets/doc/images/macintosh-textedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-timeedit.png b/src/widgets/doc/images/macintosh-timeedit.png
index 4bcfce33f8..4bcfce33f8 100644
--- a/doc/src/images/macintosh-timeedit.png
+++ b/src/widgets/doc/images/macintosh-timeedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-toolbox.png b/src/widgets/doc/images/macintosh-toolbox.png
index 18d41ea595..18d41ea595 100644
--- a/doc/src/images/macintosh-toolbox.png
+++ b/src/widgets/doc/images/macintosh-toolbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-toolbutton.png b/src/widgets/doc/images/macintosh-toolbutton.png
index f91331cc51..f91331cc51 100644
--- a/doc/src/images/macintosh-toolbutton.png
+++ b/src/widgets/doc/images/macintosh-toolbutton.png
Binary files differ
diff --git a/doc/src/images/macintosh-treeview.png b/src/widgets/doc/images/macintosh-treeview.png
index afda6d8372..afda6d8372 100644
--- a/doc/src/images/macintosh-treeview.png
+++ b/src/widgets/doc/images/macintosh-treeview.png
Binary files differ
diff --git a/doc/src/images/mainwindow-docks-example.png b/src/widgets/doc/images/mainwindow-docks-example.png
index a5641fd9cd..a5641fd9cd 100644
--- a/doc/src/images/mainwindow-docks-example.png
+++ b/src/widgets/doc/images/mainwindow-docks-example.png
Binary files differ
diff --git a/doc/src/images/mainwindow-docks.png b/src/widgets/doc/images/mainwindow-docks.png
index 24f42a28ea..24f42a28ea 100644
--- a/doc/src/images/mainwindow-docks.png
+++ b/src/widgets/doc/images/mainwindow-docks.png
Binary files differ
diff --git a/doc/src/images/mainwindowlayout.png b/src/widgets/doc/images/mainwindowlayout.png
index 4776ce4f1b..4776ce4f1b 100644
--- a/doc/src/images/mainwindowlayout.png
+++ b/src/widgets/doc/images/mainwindowlayout.png
Binary files differ
diff --git a/src/widgets/doc/images/mdi-cascade.png b/src/widgets/doc/images/mdi-cascade.png
new file mode 100644
index 0000000000..ca55a5b894
--- /dev/null
+++ b/src/widgets/doc/images/mdi-cascade.png
Binary files differ
diff --git a/src/widgets/doc/images/mdi-tile.png b/src/widgets/doc/images/mdi-tile.png
new file mode 100644
index 0000000000..1486d9654e
--- /dev/null
+++ b/src/widgets/doc/images/mdi-tile.png
Binary files differ
diff --git a/src/widgets/doc/images/modelview-combobox.png b/src/widgets/doc/images/modelview-combobox.png
new file mode 100755
index 0000000000..d172b413eb
--- /dev/null
+++ b/src/widgets/doc/images/modelview-combobox.png
Binary files differ
diff --git a/doc/src/images/modelview-header.png b/src/widgets/doc/images/modelview-header.png
index 2597635b9f..2597635b9f 100644
--- a/doc/src/images/modelview-header.png
+++ b/src/widgets/doc/images/modelview-header.png
Binary files differ
diff --git a/src/widgets/doc/images/modelview-models.png b/src/widgets/doc/images/modelview-models.png
new file mode 100644
index 0000000000..183a7cffd5
--- /dev/null
+++ b/src/widgets/doc/images/modelview-models.png
Binary files differ
diff --git a/src/widgets/doc/images/modelview-overview.png b/src/widgets/doc/images/modelview-overview.png
new file mode 100644
index 0000000000..41e3a6827f
--- /dev/null
+++ b/src/widgets/doc/images/modelview-overview.png
Binary files differ
diff --git a/src/widgets/doc/images/modelview-roles.png b/src/widgets/doc/images/modelview-roles.png
new file mode 100644
index 0000000000..2a60ce7190
--- /dev/null
+++ b/src/widgets/doc/images/modelview-roles.png
Binary files differ
diff --git a/src/widgets/doc/images/modelview-tablemodel.png b/src/widgets/doc/images/modelview-tablemodel.png
new file mode 100644
index 0000000000..9a9ea2f1b0
--- /dev/null
+++ b/src/widgets/doc/images/modelview-tablemodel.png
Binary files differ
diff --git a/src/widgets/doc/images/modelview-treemodel.png b/src/widgets/doc/images/modelview-treemodel.png
new file mode 100644
index 0000000000..f7b02eb150
--- /dev/null
+++ b/src/widgets/doc/images/modelview-treemodel.png
Binary files differ
diff --git a/doc/src/images/modelview.png b/src/widgets/doc/images/modelview.png
index 7b042af8a4..7b042af8a4 100644
--- a/doc/src/images/modelview.png
+++ b/src/widgets/doc/images/modelview.png
Binary files differ
diff --git a/doc/src/images/motif-calendarwidget.png b/src/widgets/doc/images/motif-calendarwidget.png
index 4ce6aebc21..4ce6aebc21 100644
--- a/doc/src/images/motif-calendarwidget.png
+++ b/src/widgets/doc/images/motif-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/motif-checkbox.png b/src/widgets/doc/images/motif-checkbox.png
index 2a263273a6..2a263273a6 100644
--- a/doc/src/images/motif-checkbox.png
+++ b/src/widgets/doc/images/motif-checkbox.png
Binary files differ
diff --git a/doc/src/images/motif-combobox.png b/src/widgets/doc/images/motif-combobox.png
index 2a288d9f40..2a288d9f40 100644
--- a/doc/src/images/motif-combobox.png
+++ b/src/widgets/doc/images/motif-combobox.png
Binary files differ
diff --git a/doc/src/images/motif-dateedit.png b/src/widgets/doc/images/motif-dateedit.png
index d00c45ff65..d00c45ff65 100644
--- a/doc/src/images/motif-dateedit.png
+++ b/src/widgets/doc/images/motif-dateedit.png
Binary files differ
diff --git a/doc/src/images/motif-datetimeedit.png b/src/widgets/doc/images/motif-datetimeedit.png
index cc43ef888d..cc43ef888d 100644
--- a/doc/src/images/motif-datetimeedit.png
+++ b/src/widgets/doc/images/motif-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/motif-dial.png b/src/widgets/doc/images/motif-dial.png
index 36b3ff7be0..36b3ff7be0 100644
--- a/doc/src/images/motif-dial.png
+++ b/src/widgets/doc/images/motif-dial.png
Binary files differ
diff --git a/doc/src/images/motif-doublespinbox.png b/src/widgets/doc/images/motif-doublespinbox.png
index 6092913ab0..6092913ab0 100644
--- a/doc/src/images/motif-doublespinbox.png
+++ b/src/widgets/doc/images/motif-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/motif-fontcombobox.png b/src/widgets/doc/images/motif-fontcombobox.png
index c07452d85e..c07452d85e 100644
--- a/doc/src/images/motif-fontcombobox.png
+++ b/src/widgets/doc/images/motif-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/motif-frame.png b/src/widgets/doc/images/motif-frame.png
index 55dcc32227..55dcc32227 100644
--- a/doc/src/images/motif-frame.png
+++ b/src/widgets/doc/images/motif-frame.png
Binary files differ
diff --git a/doc/src/images/motif-groupbox.png b/src/widgets/doc/images/motif-groupbox.png
index 13742b116e..13742b116e 100644
--- a/doc/src/images/motif-groupbox.png
+++ b/src/widgets/doc/images/motif-groupbox.png
Binary files differ
diff --git a/doc/src/images/motif-horizontalscrollbar.png b/src/widgets/doc/images/motif-horizontalscrollbar.png
index dab1d3f6f6..dab1d3f6f6 100644
--- a/doc/src/images/motif-horizontalscrollbar.png
+++ b/src/widgets/doc/images/motif-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/motif-label.png b/src/widgets/doc/images/motif-label.png
index 7ae6674f50..7ae6674f50 100644
--- a/doc/src/images/motif-label.png
+++ b/src/widgets/doc/images/motif-label.png
Binary files differ
diff --git a/doc/src/images/motif-lcdnumber.png b/src/widgets/doc/images/motif-lcdnumber.png
index e2cc9a8058..e2cc9a8058 100644
--- a/doc/src/images/motif-lcdnumber.png
+++ b/src/widgets/doc/images/motif-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/motif-lineedit.png b/src/widgets/doc/images/motif-lineedit.png
index a335c8c107..a335c8c107 100644
--- a/doc/src/images/motif-lineedit.png
+++ b/src/widgets/doc/images/motif-lineedit.png
Binary files differ
diff --git a/doc/src/images/motif-listview.png b/src/widgets/doc/images/motif-listview.png
index 47bd3eae6d..47bd3eae6d 100644
--- a/doc/src/images/motif-listview.png
+++ b/src/widgets/doc/images/motif-listview.png
Binary files differ
diff --git a/src/widgets/doc/images/motif-menubar.png b/src/widgets/doc/images/motif-menubar.png
new file mode 100644
index 0000000000..f1d9f4bb3d
--- /dev/null
+++ b/src/widgets/doc/images/motif-menubar.png
Binary files differ
diff --git a/doc/src/images/motif-progressbar.png b/src/widgets/doc/images/motif-progressbar.png
index f6d6979b86..f6d6979b86 100644
--- a/doc/src/images/motif-progressbar.png
+++ b/src/widgets/doc/images/motif-progressbar.png
Binary files differ
diff --git a/doc/src/images/motif-pushbutton.png b/src/widgets/doc/images/motif-pushbutton.png
index 9dc6a9db78..9dc6a9db78 100644
--- a/doc/src/images/motif-pushbutton.png
+++ b/src/widgets/doc/images/motif-pushbutton.png
Binary files differ
diff --git a/doc/src/images/motif-radiobutton.png b/src/widgets/doc/images/motif-radiobutton.png
index 468e54cfcf..468e54cfcf 100644
--- a/doc/src/images/motif-radiobutton.png
+++ b/src/widgets/doc/images/motif-radiobutton.png
Binary files differ
diff --git a/doc/src/images/motif-slider.png b/src/widgets/doc/images/motif-slider.png
index 6301e2b26d..6301e2b26d 100644
--- a/doc/src/images/motif-slider.png
+++ b/src/widgets/doc/images/motif-slider.png
Binary files differ
diff --git a/doc/src/images/motif-spinbox.png b/src/widgets/doc/images/motif-spinbox.png
index 9acc2821c8..9acc2821c8 100644
--- a/doc/src/images/motif-spinbox.png
+++ b/src/widgets/doc/images/motif-spinbox.png
Binary files differ
diff --git a/doc/src/images/motif-tableview.png b/src/widgets/doc/images/motif-tableview.png
index a1d205aaed..a1d205aaed 100644
--- a/doc/src/images/motif-tableview.png
+++ b/src/widgets/doc/images/motif-tableview.png
Binary files differ
diff --git a/doc/src/images/motif-tabwidget.png b/src/widgets/doc/images/motif-tabwidget.png
index 19da66a76c..19da66a76c 100644
--- a/doc/src/images/motif-tabwidget.png
+++ b/src/widgets/doc/images/motif-tabwidget.png
Binary files differ
diff --git a/doc/src/images/motif-textedit.png b/src/widgets/doc/images/motif-textedit.png
index 205bc19cfa..205bc19cfa 100644
--- a/doc/src/images/motif-textedit.png
+++ b/src/widgets/doc/images/motif-textedit.png
Binary files differ
diff --git a/doc/src/images/motif-timeedit.png b/src/widgets/doc/images/motif-timeedit.png
index 1ad459b886..1ad459b886 100644
--- a/doc/src/images/motif-timeedit.png
+++ b/src/widgets/doc/images/motif-timeedit.png
Binary files differ
diff --git a/doc/src/images/motif-toolbox.png b/src/widgets/doc/images/motif-toolbox.png
index 4bc3c37bb2..4bc3c37bb2 100644
--- a/doc/src/images/motif-toolbox.png
+++ b/src/widgets/doc/images/motif-toolbox.png
Binary files differ
diff --git a/doc/src/images/motif-toolbutton.png b/src/widgets/doc/images/motif-toolbutton.png
index 8ef51ddd8d..8ef51ddd8d 100644
--- a/doc/src/images/motif-toolbutton.png
+++ b/src/widgets/doc/images/motif-toolbutton.png
Binary files differ
diff --git a/doc/src/images/motif-treeview.png b/src/widgets/doc/images/motif-treeview.png
index a7dd0f2466..a7dd0f2466 100644
--- a/doc/src/images/motif-treeview.png
+++ b/src/widgets/doc/images/motif-treeview.png
Binary files differ
diff --git a/doc/src/images/msgbox1.png b/src/widgets/doc/images/msgbox1.png
index 1380e20a5f..1380e20a5f 100644
--- a/doc/src/images/msgbox1.png
+++ b/src/widgets/doc/images/msgbox1.png
Binary files differ
diff --git a/doc/src/images/msgbox2.png b/src/widgets/doc/images/msgbox2.png
index e7946996e4..e7946996e4 100644
--- a/doc/src/images/msgbox2.png
+++ b/src/widgets/doc/images/msgbox2.png
Binary files differ
diff --git a/doc/src/images/msgbox3.png b/src/widgets/doc/images/msgbox3.png
index bd81f4d4da..bd81f4d4da 100644
--- a/doc/src/images/msgbox3.png
+++ b/src/widgets/doc/images/msgbox3.png
Binary files differ
diff --git a/doc/src/images/msgbox4.png b/src/widgets/doc/images/msgbox4.png
index dbe6701cdd..dbe6701cdd 100644
--- a/doc/src/images/msgbox4.png
+++ b/src/widgets/doc/images/msgbox4.png
Binary files differ
diff --git a/doc/src/images/pangesture.png b/src/widgets/doc/images/pangesture.png
index 24caf91d3b..24caf91d3b 100644
--- a/doc/src/images/pangesture.png
+++ b/src/widgets/doc/images/pangesture.png
Binary files differ
diff --git a/doc/src/images/parent-child-widgets.png b/src/widgets/doc/images/parent-child-widgets.png
index 094e2e96b6..094e2e96b6 100644
--- a/doc/src/images/parent-child-widgets.png
+++ b/src/widgets/doc/images/parent-child-widgets.png
Binary files differ
diff --git a/doc/src/images/pinchgesture.png b/src/widgets/doc/images/pinchgesture.png
index 95614c4052..95614c4052 100644
--- a/doc/src/images/pinchgesture.png
+++ b/src/widgets/doc/images/pinchgesture.png
Binary files differ
diff --git a/doc/src/images/plastique-calendarwidget.png b/src/widgets/doc/images/plastique-calendarwidget.png
index 5e65945c72..5e65945c72 100644
--- a/doc/src/images/plastique-calendarwidget.png
+++ b/src/widgets/doc/images/plastique-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/plastique-checkbox.png b/src/widgets/doc/images/plastique-checkbox.png
index 91a5109d65..91a5109d65 100644
--- a/doc/src/images/plastique-checkbox.png
+++ b/src/widgets/doc/images/plastique-checkbox.png
Binary files differ
diff --git a/doc/src/images/plastique-colordialog.png b/src/widgets/doc/images/plastique-colordialog.png
index 68bf4d0b4b..68bf4d0b4b 100644
--- a/doc/src/images/plastique-colordialog.png
+++ b/src/widgets/doc/images/plastique-colordialog.png
Binary files differ
diff --git a/doc/src/images/plastique-combobox.png b/src/widgets/doc/images/plastique-combobox.png
index e3bf8a321f..e3bf8a321f 100644
--- a/doc/src/images/plastique-combobox.png
+++ b/src/widgets/doc/images/plastique-combobox.png
Binary files differ
diff --git a/doc/src/images/plastique-dateedit.png b/src/widgets/doc/images/plastique-dateedit.png
index 2e28a40f01..2e28a40f01 100644
--- a/doc/src/images/plastique-dateedit.png
+++ b/src/widgets/doc/images/plastique-dateedit.png
Binary files differ
diff --git a/doc/src/images/plastique-datetimeedit.png b/src/widgets/doc/images/plastique-datetimeedit.png
index 810bf1660a..810bf1660a 100644
--- a/doc/src/images/plastique-datetimeedit.png
+++ b/src/widgets/doc/images/plastique-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/plastique-dial.png b/src/widgets/doc/images/plastique-dial.png
index b65e7c78cd..b65e7c78cd 100644
--- a/doc/src/images/plastique-dial.png
+++ b/src/widgets/doc/images/plastique-dial.png
Binary files differ
diff --git a/doc/src/images/plastique-doublespinbox.png b/src/widgets/doc/images/plastique-doublespinbox.png
index 627c4a20fe..627c4a20fe 100644
--- a/doc/src/images/plastique-doublespinbox.png
+++ b/src/widgets/doc/images/plastique-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/plastique-fontcombobox.png b/src/widgets/doc/images/plastique-fontcombobox.png
index d3823081d8..d3823081d8 100644
--- a/doc/src/images/plastique-fontcombobox.png
+++ b/src/widgets/doc/images/plastique-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/plastique-fontdialog.png b/src/widgets/doc/images/plastique-fontdialog.png
index 7e799a8815..7e799a8815 100644
--- a/doc/src/images/plastique-fontdialog.png
+++ b/src/widgets/doc/images/plastique-fontdialog.png
Binary files differ
diff --git a/doc/src/images/plastique-frame.png b/src/widgets/doc/images/plastique-frame.png
index 9f81f6cba4..9f81f6cba4 100644
--- a/doc/src/images/plastique-frame.png
+++ b/src/widgets/doc/images/plastique-frame.png
Binary files differ
diff --git a/doc/src/images/plastique-groupbox.png b/src/widgets/doc/images/plastique-groupbox.png
index d353c40071..d353c40071 100644
--- a/doc/src/images/plastique-groupbox.png
+++ b/src/widgets/doc/images/plastique-groupbox.png
Binary files differ
diff --git a/doc/src/images/plastique-horizontalscrollbar.png b/src/widgets/doc/images/plastique-horizontalscrollbar.png
index d20300c23f..d20300c23f 100644
--- a/doc/src/images/plastique-horizontalscrollbar.png
+++ b/src/widgets/doc/images/plastique-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/plastique-label.png b/src/widgets/doc/images/plastique-label.png
index d2a55a862c..d2a55a862c 100644
--- a/doc/src/images/plastique-label.png
+++ b/src/widgets/doc/images/plastique-label.png
Binary files differ
diff --git a/doc/src/images/plastique-lcdnumber.png b/src/widgets/doc/images/plastique-lcdnumber.png
index 74149ee158..74149ee158 100644
--- a/doc/src/images/plastique-lcdnumber.png
+++ b/src/widgets/doc/images/plastique-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/plastique-lineedit.png b/src/widgets/doc/images/plastique-lineedit.png
index f455383520..f455383520 100644
--- a/doc/src/images/plastique-lineedit.png
+++ b/src/widgets/doc/images/plastique-lineedit.png
Binary files differ
diff --git a/doc/src/images/plastique-listview.png b/src/widgets/doc/images/plastique-listview.png
index 64bd00fe1f..64bd00fe1f 100644
--- a/doc/src/images/plastique-listview.png
+++ b/src/widgets/doc/images/plastique-listview.png
Binary files differ
diff --git a/src/widgets/doc/images/plastique-menu.png b/src/widgets/doc/images/plastique-menu.png
new file mode 100644
index 0000000000..88df2493af
--- /dev/null
+++ b/src/widgets/doc/images/plastique-menu.png
Binary files differ
diff --git a/src/widgets/doc/images/plastique-menubar.png b/src/widgets/doc/images/plastique-menubar.png
new file mode 100644
index 0000000000..642f95d6cf
--- /dev/null
+++ b/src/widgets/doc/images/plastique-menubar.png
Binary files differ
diff --git a/doc/src/images/plastique-progressbar.png b/src/widgets/doc/images/plastique-progressbar.png
index fe8dd90274..fe8dd90274 100644
--- a/doc/src/images/plastique-progressbar.png
+++ b/src/widgets/doc/images/plastique-progressbar.png
Binary files differ
diff --git a/doc/src/images/plastique-progressdialog.png b/src/widgets/doc/images/plastique-progressdialog.png
index 4373bcac16..4373bcac16 100644
--- a/doc/src/images/plastique-progressdialog.png
+++ b/src/widgets/doc/images/plastique-progressdialog.png
Binary files differ
diff --git a/src/widgets/doc/images/plastique-pushbutton-menu.png b/src/widgets/doc/images/plastique-pushbutton-menu.png
new file mode 100644
index 0000000000..d090033aa7
--- /dev/null
+++ b/src/widgets/doc/images/plastique-pushbutton-menu.png
Binary files differ
diff --git a/doc/src/images/plastique-pushbutton.png b/src/widgets/doc/images/plastique-pushbutton.png
index 83c44fd38d..83c44fd38d 100644
--- a/doc/src/images/plastique-pushbutton.png
+++ b/src/widgets/doc/images/plastique-pushbutton.png
Binary files differ
diff --git a/doc/src/images/plastique-radiobutton.png b/src/widgets/doc/images/plastique-radiobutton.png
index a2c820d7d1..a2c820d7d1 100644
--- a/doc/src/images/plastique-radiobutton.png
+++ b/src/widgets/doc/images/plastique-radiobutton.png
Binary files differ
diff --git a/src/widgets/doc/images/plastique-sizegrip.png b/src/widgets/doc/images/plastique-sizegrip.png
new file mode 100644
index 0000000000..09a551efab
--- /dev/null
+++ b/src/widgets/doc/images/plastique-sizegrip.png
Binary files differ
diff --git a/doc/src/images/plastique-slider.png b/src/widgets/doc/images/plastique-slider.png
index 492f0fdfbd..492f0fdfbd 100644
--- a/doc/src/images/plastique-slider.png
+++ b/src/widgets/doc/images/plastique-slider.png
Binary files differ
diff --git a/doc/src/images/plastique-spinbox.png b/src/widgets/doc/images/plastique-spinbox.png
index af15db3c23..af15db3c23 100644
--- a/doc/src/images/plastique-spinbox.png
+++ b/src/widgets/doc/images/plastique-spinbox.png
Binary files differ
diff --git a/doc/src/images/plastique-statusbar.png b/src/widgets/doc/images/plastique-statusbar.png
index c8f9792ab9..c8f9792ab9 100644
--- a/doc/src/images/plastique-statusbar.png
+++ b/src/widgets/doc/images/plastique-statusbar.png
Binary files differ
diff --git a/src/widgets/doc/images/plastique-tabbar-truncated.png b/src/widgets/doc/images/plastique-tabbar-truncated.png
new file mode 100644
index 0000000000..8e906d9928
--- /dev/null
+++ b/src/widgets/doc/images/plastique-tabbar-truncated.png
Binary files differ
diff --git a/src/widgets/doc/images/plastique-tabbar.png b/src/widgets/doc/images/plastique-tabbar.png
new file mode 100644
index 0000000000..3371dda1b6
--- /dev/null
+++ b/src/widgets/doc/images/plastique-tabbar.png
Binary files differ
diff --git a/doc/src/images/plastique-tableview.png b/src/widgets/doc/images/plastique-tableview.png
index b20c1cce7f..b20c1cce7f 100644
--- a/doc/src/images/plastique-tableview.png
+++ b/src/widgets/doc/images/plastique-tableview.png
Binary files differ
diff --git a/doc/src/images/plastique-tabwidget.png b/src/widgets/doc/images/plastique-tabwidget.png
index 92ae398844..92ae398844 100644
--- a/doc/src/images/plastique-tabwidget.png
+++ b/src/widgets/doc/images/plastique-tabwidget.png
Binary files differ
diff --git a/doc/src/images/plastique-textedit.png b/src/widgets/doc/images/plastique-textedit.png
index a802d75fcc..a802d75fcc 100644
--- a/doc/src/images/plastique-textedit.png
+++ b/src/widgets/doc/images/plastique-textedit.png
Binary files differ
diff --git a/doc/src/images/plastique-timeedit.png b/src/widgets/doc/images/plastique-timeedit.png
index 2d70b84c4c..2d70b84c4c 100644
--- a/doc/src/images/plastique-timeedit.png
+++ b/src/widgets/doc/images/plastique-timeedit.png
Binary files differ
diff --git a/doc/src/images/plastique-toolbox.png b/src/widgets/doc/images/plastique-toolbox.png
index 10bcd7af62..10bcd7af62 100644
--- a/doc/src/images/plastique-toolbox.png
+++ b/src/widgets/doc/images/plastique-toolbox.png
Binary files differ
diff --git a/doc/src/images/plastique-toolbutton.png b/src/widgets/doc/images/plastique-toolbutton.png
index 4e51831408..4e51831408 100644
--- a/doc/src/images/plastique-toolbutton.png
+++ b/src/widgets/doc/images/plastique-toolbutton.png
Binary files differ
diff --git a/doc/src/images/plastique-treeview.png b/src/widgets/doc/images/plastique-treeview.png
index db0bc01a25..db0bc01a25 100644
--- a/doc/src/images/plastique-treeview.png
+++ b/src/widgets/doc/images/plastique-treeview.png
Binary files differ
diff --git a/doc/src/images/progressBar-stylesheet.png b/src/widgets/doc/images/progressBar-stylesheet.png
index b4bf755b6c..b4bf755b6c 100644
--- a/doc/src/images/progressBar-stylesheet.png
+++ b/src/widgets/doc/images/progressBar-stylesheet.png
Binary files differ
diff --git a/doc/src/images/progressBar2-stylesheet.png b/src/widgets/doc/images/progressBar2-stylesheet.png
index 8b5ecc0a66..8b5ecc0a66 100644
--- a/doc/src/images/progressBar2-stylesheet.png
+++ b/src/widgets/doc/images/progressBar2-stylesheet.png
Binary files differ
diff --git a/doc/src/images/propagation-custom.png b/src/widgets/doc/images/propagation-custom.png
index 866b44d677..866b44d677 100644
--- a/doc/src/images/propagation-custom.png
+++ b/src/widgets/doc/images/propagation-custom.png
Binary files differ
diff --git a/doc/src/images/propagation-standard.png b/src/widgets/doc/images/propagation-standard.png
index b010fccc95..b010fccc95 100644
--- a/doc/src/images/propagation-standard.png
+++ b/src/widgets/doc/images/propagation-standard.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget-grid.png b/src/widgets/doc/images/qcalendarwidget-grid.png
index 3df4dd99e2..3df4dd99e2 100644
--- a/doc/src/images/qcalendarwidget-grid.png
+++ b/src/widgets/doc/images/qcalendarwidget-grid.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget-maximum.png b/src/widgets/doc/images/qcalendarwidget-maximum.png
index 1e78d20e85..1e78d20e85 100644
--- a/doc/src/images/qcalendarwidget-maximum.png
+++ b/src/widgets/doc/images/qcalendarwidget-maximum.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget-minimum.png b/src/widgets/doc/images/qcalendarwidget-minimum.png
index f860429309..f860429309 100644
--- a/doc/src/images/qcalendarwidget-minimum.png
+++ b/src/widgets/doc/images/qcalendarwidget-minimum.png
Binary files differ
diff --git a/doc/src/images/qcolumnview.png b/src/widgets/doc/images/qcolumnview.png
index 1d312bf953..1d312bf953 100644
--- a/doc/src/images/qcolumnview.png
+++ b/src/widgets/doc/images/qcolumnview.png
Binary files differ
diff --git a/doc/src/images/qcompleter.png b/src/widgets/doc/images/qcompleter.png
index d25caacc72..d25caacc72 100644
--- a/doc/src/images/qcompleter.png
+++ b/src/widgets/doc/images/qcompleter.png
Binary files differ
diff --git a/doc/src/images/qdesktopwidget.png b/src/widgets/doc/images/qdesktopwidget.png
index 02f8e8b5ad..02f8e8b5ad 100644
--- a/doc/src/images/qdesktopwidget.png
+++ b/src/widgets/doc/images/qdesktopwidget.png
Binary files differ
diff --git a/src/widgets/doc/images/qformlayout-kde.png b/src/widgets/doc/images/qformlayout-kde.png
new file mode 100644
index 0000000000..c32bb12499
--- /dev/null
+++ b/src/widgets/doc/images/qformlayout-kde.png
Binary files differ
diff --git a/src/widgets/doc/images/qformlayout-mac.png b/src/widgets/doc/images/qformlayout-mac.png
new file mode 100644
index 0000000000..0a0824efb6
--- /dev/null
+++ b/src/widgets/doc/images/qformlayout-mac.png
Binary files differ
diff --git a/src/widgets/doc/images/qformlayout-qpe.png b/src/widgets/doc/images/qformlayout-qpe.png
new file mode 100644
index 0000000000..3abecc5716
--- /dev/null
+++ b/src/widgets/doc/images/qformlayout-qpe.png
Binary files differ
diff --git a/src/widgets/doc/images/qformlayout-win.png b/src/widgets/doc/images/qformlayout-win.png
new file mode 100644
index 0000000000..1ed44bdd3b
--- /dev/null
+++ b/src/widgets/doc/images/qformlayout-win.png
Binary files differ
diff --git a/doc/src/images/qformlayout-with-6-children.png b/src/widgets/doc/images/qformlayout-with-6-children.png
index f743599702..f743599702 100644
--- a/doc/src/images/qformlayout-with-6-children.png
+++ b/src/widgets/doc/images/qformlayout-with-6-children.png
Binary files differ
diff --git a/doc/src/images/qgraphicsproxywidget-embed.png b/src/widgets/doc/images/qgraphicsproxywidget-embed.png
index 10d8f6fddd..10d8f6fddd 100644
--- a/doc/src/images/qgraphicsproxywidget-embed.png
+++ b/src/widgets/doc/images/qgraphicsproxywidget-embed.png
Binary files differ
diff --git a/doc/src/images/qgridlayout-with-5-children.png b/src/widgets/doc/images/qgridlayout-with-5-children.png
index 8d0c2962e4..8d0c2962e4 100644
--- a/doc/src/images/qgridlayout-with-5-children.png
+++ b/src/widgets/doc/images/qgridlayout-with-5-children.png
Binary files differ
diff --git a/doc/src/images/qhboxlayout-with-5-children.png b/src/widgets/doc/images/qhboxlayout-with-5-children.png
index 9b48dc5c47..9b48dc5c47 100644
--- a/doc/src/images/qhboxlayout-with-5-children.png
+++ b/src/widgets/doc/images/qhboxlayout-with-5-children.png
Binary files differ
diff --git a/doc/src/images/qmdisubwindowlayout.png b/src/widgets/doc/images/qmdisubwindowlayout.png
index ffe5cc3949..ffe5cc3949 100644
--- a/doc/src/images/qmdisubwindowlayout.png
+++ b/src/widgets/doc/images/qmdisubwindowlayout.png
Binary files differ
diff --git a/src/widgets/doc/images/qscrollarea-noscrollbars.png b/src/widgets/doc/images/qscrollarea-noscrollbars.png
new file mode 100644
index 0000000000..a1520f3e21
--- /dev/null
+++ b/src/widgets/doc/images/qscrollarea-noscrollbars.png
Binary files differ
diff --git a/src/widgets/doc/images/qscrollarea-onescrollbar.png b/src/widgets/doc/images/qscrollarea-onescrollbar.png
new file mode 100644
index 0000000000..b4f7976bc4
--- /dev/null
+++ b/src/widgets/doc/images/qscrollarea-onescrollbar.png
Binary files differ
diff --git a/src/widgets/doc/images/qscrollarea-twoscrollbars.png b/src/widgets/doc/images/qscrollarea-twoscrollbars.png
new file mode 100644
index 0000000000..bf720e498c
--- /dev/null
+++ b/src/widgets/doc/images/qscrollarea-twoscrollbars.png
Binary files differ
diff --git a/doc/src/images/qscrollbar-picture.png b/src/widgets/doc/images/qscrollbar-picture.png
index 898e014c40..898e014c40 100644
--- a/doc/src/images/qscrollbar-picture.png
+++ b/src/widgets/doc/images/qscrollbar-picture.png
Binary files differ
diff --git a/src/widgets/doc/images/qscrollbar-values.png b/src/widgets/doc/images/qscrollbar-values.png
new file mode 100644
index 0000000000..cea744b3be
--- /dev/null
+++ b/src/widgets/doc/images/qscrollbar-values.png
Binary files differ
diff --git a/src/widgets/doc/images/qspinbox-plusminus.png b/src/widgets/doc/images/qspinbox-plusminus.png
new file mode 100644
index 0000000000..3b35a408a0
--- /dev/null
+++ b/src/widgets/doc/images/qspinbox-plusminus.png
Binary files differ
diff --git a/src/widgets/doc/images/qspinbox-updown.png b/src/widgets/doc/images/qspinbox-updown.png
new file mode 100644
index 0000000000..a6caa4419b
--- /dev/null
+++ b/src/widgets/doc/images/qspinbox-updown.png
Binary files differ
diff --git a/doc/src/images/qstyle-comboboxes.png b/src/widgets/doc/images/qstyle-comboboxes.png
index aecec914a0..aecec914a0 100644
--- a/doc/src/images/qstyle-comboboxes.png
+++ b/src/widgets/doc/images/qstyle-comboboxes.png
Binary files differ
diff --git a/doc/src/images/qstyleoptiontoolbar-position.png b/src/widgets/doc/images/qstyleoptiontoolbar-position.png
index 5eaae7e4cd..5eaae7e4cd 100644
--- a/doc/src/images/qstyleoptiontoolbar-position.png
+++ b/src/widgets/doc/images/qstyleoptiontoolbar-position.png
Binary files differ
diff --git a/src/widgets/doc/images/qtableview-resized.png b/src/widgets/doc/images/qtableview-resized.png
new file mode 100644
index 0000000000..813256ee9e
--- /dev/null
+++ b/src/widgets/doc/images/qtableview-resized.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-aero1.png b/src/widgets/doc/images/qtwizard-aero1.png
new file mode 100644
index 0000000000..fe9e9bc21c
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-aero1.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-aero2.png b/src/widgets/doc/images/qtwizard-aero2.png
new file mode 100644
index 0000000000..261c0651fe
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-aero2.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-classic1.png b/src/widgets/doc/images/qtwizard-classic1.png
new file mode 100644
index 0000000000..be3edbecaf
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-classic1.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-classic2.png b/src/widgets/doc/images/qtwizard-classic2.png
new file mode 100644
index 0000000000..165f569d1d
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-classic2.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-mac1.png b/src/widgets/doc/images/qtwizard-mac1.png
new file mode 100644
index 0000000000..bc8cd9b715
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-mac1.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-mac2.png b/src/widgets/doc/images/qtwizard-mac2.png
new file mode 100644
index 0000000000..850f6b85a5
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-mac2.png
Binary files differ
diff --git a/doc/src/images/qtwizard-macpage.png b/src/widgets/doc/images/qtwizard-macpage.png
index 1ba3122f91..1ba3122f91 100644
--- a/doc/src/images/qtwizard-macpage.png
+++ b/src/widgets/doc/images/qtwizard-macpage.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-modern1.png b/src/widgets/doc/images/qtwizard-modern1.png
new file mode 100644
index 0000000000..223e3ddec3
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-modern1.png
Binary files differ
diff --git a/src/widgets/doc/images/qtwizard-modern2.png b/src/widgets/doc/images/qtwizard-modern2.png
new file mode 100644
index 0000000000..d66c374a4c
--- /dev/null
+++ b/src/widgets/doc/images/qtwizard-modern2.png
Binary files differ
diff --git a/doc/src/images/qtwizard-nonmacpage.png b/src/widgets/doc/images/qtwizard-nonmacpage.png
index cbe464d57f..cbe464d57f 100644
--- a/doc/src/images/qtwizard-nonmacpage.png
+++ b/src/widgets/doc/images/qtwizard-nonmacpage.png
Binary files differ
diff --git a/doc/src/images/qundoview.png b/src/widgets/doc/images/qundoview.png
index 3bdb1cf2ed..3bdb1cf2ed 100644
--- a/doc/src/images/qundoview.png
+++ b/src/widgets/doc/images/qundoview.png
Binary files differ
diff --git a/doc/src/images/qvboxlayout-with-5-children.png b/src/widgets/doc/images/qvboxlayout-with-5-children.png
index 57c37d7247..57c37d7247 100644
--- a/doc/src/images/qvboxlayout-with-5-children.png
+++ b/src/widgets/doc/images/qvboxlayout-with-5-children.png
Binary files differ
diff --git a/doc/src/images/readonlytable_role.png b/src/widgets/doc/images/readonlytable_role.png
index 7d2d416a53..7d2d416a53 100644
--- a/doc/src/images/readonlytable_role.png
+++ b/src/widgets/doc/images/readonlytable_role.png
Binary files differ
diff --git a/src/widgets/doc/images/selected-items1.png b/src/widgets/doc/images/selected-items1.png
new file mode 100644
index 0000000000..12b572d4d8
--- /dev/null
+++ b/src/widgets/doc/images/selected-items1.png
Binary files differ
diff --git a/src/widgets/doc/images/selected-items2.png b/src/widgets/doc/images/selected-items2.png
new file mode 100644
index 0000000000..ad247d90a9
--- /dev/null
+++ b/src/widgets/doc/images/selected-items2.png
Binary files differ
diff --git a/src/widgets/doc/images/selected-items3.png b/src/widgets/doc/images/selected-items3.png
new file mode 100644
index 0000000000..d7aa7be46b
--- /dev/null
+++ b/src/widgets/doc/images/selected-items3.png
Binary files differ
diff --git a/src/widgets/doc/images/selection-extended.png b/src/widgets/doc/images/selection-extended.png
new file mode 100644
index 0000000000..8ca488d812
--- /dev/null
+++ b/src/widgets/doc/images/selection-extended.png
Binary files differ
diff --git a/src/widgets/doc/images/selection-multi.png b/src/widgets/doc/images/selection-multi.png
new file mode 100644
index 0000000000..766e4a18bc
--- /dev/null
+++ b/src/widgets/doc/images/selection-multi.png
Binary files differ
diff --git a/src/widgets/doc/images/selection-single.png b/src/widgets/doc/images/selection-single.png
new file mode 100644
index 0000000000..d9d0655864
--- /dev/null
+++ b/src/widgets/doc/images/selection-single.png
Binary files differ
diff --git a/doc/src/images/selection2.png b/src/widgets/doc/images/selection2.png
index 66c757f88e..66c757f88e 100644
--- a/doc/src/images/selection2.png
+++ b/src/widgets/doc/images/selection2.png
Binary files differ
diff --git a/src/widgets/doc/images/shareddirmodel.png b/src/widgets/doc/images/shareddirmodel.png
new file mode 100644
index 0000000000..7b9fdeda04
--- /dev/null
+++ b/src/widgets/doc/images/shareddirmodel.png
Binary files differ
diff --git a/src/widgets/doc/images/sharedmodel-tableviews.png b/src/widgets/doc/images/sharedmodel-tableviews.png
new file mode 100644
index 0000000000..d241e4ca1a
--- /dev/null
+++ b/src/widgets/doc/images/sharedmodel-tableviews.png
Binary files differ
diff --git a/src/widgets/doc/images/sharedselection-tableviews.png b/src/widgets/doc/images/sharedselection-tableviews.png
new file mode 100644
index 0000000000..ccbda2578f
--- /dev/null
+++ b/src/widgets/doc/images/sharedselection-tableviews.png
Binary files differ
diff --git a/src/widgets/doc/images/simpleanchorlayout-example.png b/src/widgets/doc/images/simpleanchorlayout-example.png
new file mode 100644
index 0000000000..1d5c8ac048
--- /dev/null
+++ b/src/widgets/doc/images/simpleanchorlayout-example.png
Binary files differ
diff --git a/doc/src/images/spinboxdelegate-example.png b/src/widgets/doc/images/spinboxdelegate-example.png
index 5e57a9c12b..5e57a9c12b 100644
--- a/doc/src/images/spinboxdelegate-example.png
+++ b/src/widgets/doc/images/spinboxdelegate-example.png
Binary files differ
diff --git a/src/widgets/doc/images/standard-views.png b/src/widgets/doc/images/standard-views.png
new file mode 100644
index 0000000000..c804551622
--- /dev/null
+++ b/src/widgets/doc/images/standard-views.png
Binary files differ
diff --git a/doc/src/images/standardwidget.png b/src/widgets/doc/images/standardwidget.png
index 3ccccf14a3..3ccccf14a3 100644
--- a/doc/src/images/standardwidget.png
+++ b/src/widgets/doc/images/standardwidget.png
Binary files differ
diff --git a/doc/src/images/stardelegate.png b/src/widgets/doc/images/stardelegate.png
index 24fa9fb0d7..24fa9fb0d7 100644
--- a/doc/src/images/stardelegate.png
+++ b/src/widgets/doc/images/stardelegate.png
Binary files differ
diff --git a/src/widgets/doc/images/stringlistmodel.png b/src/widgets/doc/images/stringlistmodel.png
new file mode 100644
index 0000000000..eedbff3585
--- /dev/null
+++ b/src/widgets/doc/images/stringlistmodel.png
Binary files differ
diff --git a/doc/src/images/stylesheet-border-image-normal.png b/src/widgets/doc/images/stylesheet-border-image-normal.png
index 8afe3c9a67..8afe3c9a67 100644
--- a/doc/src/images/stylesheet-border-image-normal.png
+++ b/src/widgets/doc/images/stylesheet-border-image-normal.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-border-image-stretched.png b/src/widgets/doc/images/stylesheet-border-image-stretched.png
new file mode 100644
index 0000000000..3f9ca92dd3
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-border-image-stretched.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-border-image-wrong.png b/src/widgets/doc/images/stylesheet-border-image-wrong.png
new file mode 100644
index 0000000000..19d6e449f4
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-border-image-wrong.png
Binary files differ
diff --git a/doc/src/images/stylesheet-boxmodel.png b/src/widgets/doc/images/stylesheet-boxmodel.png
index a0249d77b7..a0249d77b7 100644
--- a/doc/src/images/stylesheet-boxmodel.png
+++ b/src/widgets/doc/images/stylesheet-boxmodel.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-branch-closed.png b/src/widgets/doc/images/stylesheet-branch-closed.png
new file mode 100644
index 0000000000..213ffdd88f
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-branch-closed.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-branch-end.png b/src/widgets/doc/images/stylesheet-branch-end.png
new file mode 100644
index 0000000000..54915b3b01
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-branch-end.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-branch-more.png b/src/widgets/doc/images/stylesheet-branch-more.png
new file mode 100644
index 0000000000..664ad44740
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-branch-more.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-branch-open.png b/src/widgets/doc/images/stylesheet-branch-open.png
new file mode 100644
index 0000000000..e8cad95ccf
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-branch-open.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-coffee-cleanlooks.png b/src/widgets/doc/images/stylesheet-coffee-cleanlooks.png
new file mode 100644
index 0000000000..e75df0d80a
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-coffee-cleanlooks.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-coffee-xp.png b/src/widgets/doc/images/stylesheet-coffee-xp.png
new file mode 100644
index 0000000000..8bedd80ee9
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-coffee-xp.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-pagefold-mac.png b/src/widgets/doc/images/stylesheet-pagefold-mac.png
new file mode 100644
index 0000000000..5c061b9cfd
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-pagefold-mac.png
Binary files differ
diff --git a/doc/src/images/stylesheet-pagefold.png b/src/widgets/doc/images/stylesheet-pagefold.png
index 5ccb4edbc9..5ccb4edbc9 100644
--- a/doc/src/images/stylesheet-pagefold.png
+++ b/src/widgets/doc/images/stylesheet-pagefold.png
Binary files differ
diff --git a/doc/src/images/stylesheet-redbutton1.png b/src/widgets/doc/images/stylesheet-redbutton1.png
index cb03375e12..cb03375e12 100644
--- a/doc/src/images/stylesheet-redbutton1.png
+++ b/src/widgets/doc/images/stylesheet-redbutton1.png
Binary files differ
diff --git a/doc/src/images/stylesheet-redbutton2.png b/src/widgets/doc/images/stylesheet-redbutton2.png
index 5325708942..5325708942 100644
--- a/doc/src/images/stylesheet-redbutton2.png
+++ b/src/widgets/doc/images/stylesheet-redbutton2.png
Binary files differ
diff --git a/doc/src/images/stylesheet-redbutton3.png b/src/widgets/doc/images/stylesheet-redbutton3.png
index dd976f0760..dd976f0760 100644
--- a/doc/src/images/stylesheet-redbutton3.png
+++ b/src/widgets/doc/images/stylesheet-redbutton3.png
Binary files differ
diff --git a/doc/src/images/stylesheet-scrollbar1.png b/src/widgets/doc/images/stylesheet-scrollbar1.png
index 666ff1119a..666ff1119a 100644
--- a/doc/src/images/stylesheet-scrollbar1.png
+++ b/src/widgets/doc/images/stylesheet-scrollbar1.png
Binary files differ
diff --git a/doc/src/images/stylesheet-scrollbar2.png b/src/widgets/doc/images/stylesheet-scrollbar2.png
index 439cf8035d..439cf8035d 100644
--- a/doc/src/images/stylesheet-scrollbar2.png
+++ b/src/widgets/doc/images/stylesheet-scrollbar2.png
Binary files differ
diff --git a/doc/src/images/stylesheet-treeview.png b/src/widgets/doc/images/stylesheet-treeview.png
index 883d190f36..883d190f36 100644
--- a/doc/src/images/stylesheet-treeview.png
+++ b/src/widgets/doc/images/stylesheet-treeview.png
Binary files differ
diff --git a/src/widgets/doc/images/stylesheet-vline.png b/src/widgets/doc/images/stylesheet-vline.png
new file mode 100644
index 0000000000..8f0c336fd8
--- /dev/null
+++ b/src/widgets/doc/images/stylesheet-vline.png
Binary files differ
diff --git a/doc/src/images/swipegesture.png b/src/widgets/doc/images/swipegesture.png
index 0b7d35af3a..0b7d35af3a 100644
--- a/doc/src/images/swipegesture.png
+++ b/src/widgets/doc/images/swipegesture.png
Binary files differ
diff --git a/doc/src/images/system-tray.png b/src/widgets/doc/images/system-tray.png
index 298b193cf7..298b193cf7 100644
--- a/doc/src/images/system-tray.png
+++ b/src/widgets/doc/images/system-tray.png
Binary files differ
diff --git a/doc/src/images/tabWidget-stylesheet1.png b/src/widgets/doc/images/tabWidget-stylesheet1.png
index fc8fc19e74..fc8fc19e74 100644
--- a/doc/src/images/tabWidget-stylesheet1.png
+++ b/src/widgets/doc/images/tabWidget-stylesheet1.png
Binary files differ
diff --git a/doc/src/images/tabWidget-stylesheet2.png b/src/widgets/doc/images/tabWidget-stylesheet2.png
index 2cbf2bf36d..2cbf2bf36d 100644
--- a/doc/src/images/tabWidget-stylesheet2.png
+++ b/src/widgets/doc/images/tabWidget-stylesheet2.png
Binary files differ
diff --git a/doc/src/images/tabWidget-stylesheet3.png b/src/widgets/doc/images/tabWidget-stylesheet3.png
index f57a9c9f9c..f57a9c9f9c 100644
--- a/doc/src/images/tabWidget-stylesheet3.png
+++ b/src/widgets/doc/images/tabWidget-stylesheet3.png
Binary files differ
diff --git a/doc/src/images/tableWidget-stylesheet.png b/src/widgets/doc/images/tableWidget-stylesheet.png
index e99e7a97c8..e99e7a97c8 100644
--- a/doc/src/images/tableWidget-stylesheet.png
+++ b/src/widgets/doc/images/tableWidget-stylesheet.png
Binary files differ
diff --git a/src/widgets/doc/images/tableview.png b/src/widgets/doc/images/tableview.png
new file mode 100755
index 0000000000..8be1b6ce62
--- /dev/null
+++ b/src/widgets/doc/images/tableview.png
Binary files differ
diff --git a/doc/src/images/tree_2_with_algorithm.png b/src/widgets/doc/images/tree_2_with_algorithm.png
index ecf91012bf..ecf91012bf 100644
--- a/doc/src/images/tree_2_with_algorithm.png
+++ b/src/widgets/doc/images/tree_2_with_algorithm.png
Binary files differ
diff --git a/doc/src/images/treeview.png b/src/widgets/doc/images/treeview.png
index af31fe9bf1..af31fe9bf1 100644
--- a/doc/src/images/treeview.png
+++ b/src/widgets/doc/images/treeview.png
Binary files differ
diff --git a/doc/src/images/widgetdelegate.png b/src/widgets/doc/images/widgetdelegate.png
index 3df4c4b6a5..3df4c4b6a5 100644
--- a/doc/src/images/widgetdelegate.png
+++ b/src/widgets/doc/images/widgetdelegate.png
Binary files differ
diff --git a/doc/src/images/widgetmapper.png b/src/widgets/doc/images/widgetmapper.png
index 9627088077..9627088077 100644
--- a/doc/src/images/widgetmapper.png
+++ b/src/widgets/doc/images/widgetmapper.png
Binary files differ
diff --git a/src/widgets/doc/images/widgets-tutorial-childwidget.png b/src/widgets/doc/images/widgets-tutorial-childwidget.png
new file mode 100644
index 0000000000..0d42d701fc
--- /dev/null
+++ b/src/widgets/doc/images/widgets-tutorial-childwidget.png
Binary files differ
diff --git a/src/widgets/doc/images/widgets-tutorial-nestedlayouts.png b/src/widgets/doc/images/widgets-tutorial-nestedlayouts.png
new file mode 100644
index 0000000000..1e2a9f4a1d
--- /dev/null
+++ b/src/widgets/doc/images/widgets-tutorial-nestedlayouts.png
Binary files differ
diff --git a/src/widgets/doc/images/widgets-tutorial-toplevel.png b/src/widgets/doc/images/widgets-tutorial-toplevel.png
new file mode 100644
index 0000000000..a80d13c50d
--- /dev/null
+++ b/src/widgets/doc/images/widgets-tutorial-toplevel.png
Binary files differ
diff --git a/src/widgets/doc/images/widgets-tutorial-windowlayout.png b/src/widgets/doc/images/widgets-tutorial-windowlayout.png
new file mode 100644
index 0000000000..fce52cdcd9
--- /dev/null
+++ b/src/widgets/doc/images/widgets-tutorial-windowlayout.png
Binary files differ
diff --git a/doc/src/images/windows-calendarwidget.png b/src/widgets/doc/images/windows-calendarwidget.png
index ad016238ad..ad016238ad 100644
--- a/doc/src/images/windows-calendarwidget.png
+++ b/src/widgets/doc/images/windows-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/windows-checkbox.png b/src/widgets/doc/images/windows-checkbox.png
index eb1be4b736..eb1be4b736 100644
--- a/doc/src/images/windows-checkbox.png
+++ b/src/widgets/doc/images/windows-checkbox.png
Binary files differ
diff --git a/doc/src/images/windows-combobox.png b/src/widgets/doc/images/windows-combobox.png
index d6bc483494..d6bc483494 100644
--- a/doc/src/images/windows-combobox.png
+++ b/src/widgets/doc/images/windows-combobox.png
Binary files differ
diff --git a/doc/src/images/windows-dateedit.png b/src/widgets/doc/images/windows-dateedit.png
index 95587ec62e..95587ec62e 100644
--- a/doc/src/images/windows-dateedit.png
+++ b/src/widgets/doc/images/windows-dateedit.png
Binary files differ
diff --git a/doc/src/images/windows-datetimeedit.png b/src/widgets/doc/images/windows-datetimeedit.png
index 6aa1766146..6aa1766146 100644
--- a/doc/src/images/windows-datetimeedit.png
+++ b/src/widgets/doc/images/windows-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/windows-dial.png b/src/widgets/doc/images/windows-dial.png
index 0aa3a26159..0aa3a26159 100644
--- a/doc/src/images/windows-dial.png
+++ b/src/widgets/doc/images/windows-dial.png
Binary files differ
diff --git a/doc/src/images/windows-doublespinbox.png b/src/widgets/doc/images/windows-doublespinbox.png
index 244b5f66cd..244b5f66cd 100644
--- a/doc/src/images/windows-doublespinbox.png
+++ b/src/widgets/doc/images/windows-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/windows-fontcombobox.png b/src/widgets/doc/images/windows-fontcombobox.png
index bf98cad922..bf98cad922 100644
--- a/doc/src/images/windows-fontcombobox.png
+++ b/src/widgets/doc/images/windows-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/windows-frame.png b/src/widgets/doc/images/windows-frame.png
index 5979b31b25..5979b31b25 100644
--- a/doc/src/images/windows-frame.png
+++ b/src/widgets/doc/images/windows-frame.png
Binary files differ
diff --git a/doc/src/images/windows-groupbox.png b/src/widgets/doc/images/windows-groupbox.png
index 88f46a3832..88f46a3832 100644
--- a/doc/src/images/windows-groupbox.png
+++ b/src/widgets/doc/images/windows-groupbox.png
Binary files differ
diff --git a/doc/src/images/windows-horizontalscrollbar.png b/src/widgets/doc/images/windows-horizontalscrollbar.png
index 1f36b9a352..1f36b9a352 100644
--- a/doc/src/images/windows-horizontalscrollbar.png
+++ b/src/widgets/doc/images/windows-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/windows-label.png b/src/widgets/doc/images/windows-label.png
index a1c3a396a9..a1c3a396a9 100644
--- a/doc/src/images/windows-label.png
+++ b/src/widgets/doc/images/windows-label.png
Binary files differ
diff --git a/doc/src/images/windows-lcdnumber.png b/src/widgets/doc/images/windows-lcdnumber.png
index b463511aab..b463511aab 100644
--- a/doc/src/images/windows-lcdnumber.png
+++ b/src/widgets/doc/images/windows-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/windows-lineedit.png b/src/widgets/doc/images/windows-lineedit.png
index 270e4517ff..270e4517ff 100644
--- a/doc/src/images/windows-lineedit.png
+++ b/src/widgets/doc/images/windows-lineedit.png
Binary files differ
diff --git a/doc/src/images/windows-listview.png b/src/widgets/doc/images/windows-listview.png
index 2884fae1b1..2884fae1b1 100644
--- a/doc/src/images/windows-listview.png
+++ b/src/widgets/doc/images/windows-listview.png
Binary files differ
diff --git a/doc/src/images/windows-progressbar.png b/src/widgets/doc/images/windows-progressbar.png
index 361799a70e..361799a70e 100644
--- a/doc/src/images/windows-progressbar.png
+++ b/src/widgets/doc/images/windows-progressbar.png
Binary files differ
diff --git a/doc/src/images/windows-pushbutton.png b/src/widgets/doc/images/windows-pushbutton.png
index 14528d6808..14528d6808 100644
--- a/doc/src/images/windows-pushbutton.png
+++ b/src/widgets/doc/images/windows-pushbutton.png
Binary files differ
diff --git a/doc/src/images/windows-radiobutton.png b/src/widgets/doc/images/windows-radiobutton.png
index db328cb563..db328cb563 100644
--- a/doc/src/images/windows-radiobutton.png
+++ b/src/widgets/doc/images/windows-radiobutton.png
Binary files differ
diff --git a/doc/src/images/windows-slider.png b/src/widgets/doc/images/windows-slider.png
index fde85024b6..fde85024b6 100644
--- a/doc/src/images/windows-slider.png
+++ b/src/widgets/doc/images/windows-slider.png
Binary files differ
diff --git a/doc/src/images/windows-spinbox.png b/src/widgets/doc/images/windows-spinbox.png
index d4e93c584a..d4e93c584a 100644
--- a/doc/src/images/windows-spinbox.png
+++ b/src/widgets/doc/images/windows-spinbox.png
Binary files differ
diff --git a/doc/src/images/windows-tableview.png b/src/widgets/doc/images/windows-tableview.png
index 89da89fb5f..89da89fb5f 100644
--- a/doc/src/images/windows-tableview.png
+++ b/src/widgets/doc/images/windows-tableview.png
Binary files differ
diff --git a/doc/src/images/windows-tabwidget.png b/src/widgets/doc/images/windows-tabwidget.png
index 8622f7ec6a..8622f7ec6a 100644
--- a/doc/src/images/windows-tabwidget.png
+++ b/src/widgets/doc/images/windows-tabwidget.png
Binary files differ
diff --git a/doc/src/images/windows-textedit.png b/src/widgets/doc/images/windows-textedit.png
index fd21ade02f..fd21ade02f 100644
--- a/doc/src/images/windows-textedit.png
+++ b/src/widgets/doc/images/windows-textedit.png
Binary files differ
diff --git a/doc/src/images/windows-timeedit.png b/src/widgets/doc/images/windows-timeedit.png
index 6ae0e406bc..6ae0e406bc 100644
--- a/doc/src/images/windows-timeedit.png
+++ b/src/widgets/doc/images/windows-timeedit.png
Binary files differ
diff --git a/doc/src/images/windows-toolbox.png b/src/widgets/doc/images/windows-toolbox.png
index 99b471e6df..99b471e6df 100644
--- a/doc/src/images/windows-toolbox.png
+++ b/src/widgets/doc/images/windows-toolbox.png
Binary files differ
diff --git a/doc/src/images/windows-toolbutton.png b/src/widgets/doc/images/windows-toolbutton.png
index 9ceb846ed4..9ceb846ed4 100644
--- a/doc/src/images/windows-toolbutton.png
+++ b/src/widgets/doc/images/windows-toolbutton.png
Binary files differ
diff --git a/doc/src/images/windows-treeview.png b/src/widgets/doc/images/windows-treeview.png
index f55cd69c79..f55cd69c79 100644
--- a/doc/src/images/windows-treeview.png
+++ b/src/widgets/doc/images/windows-treeview.png
Binary files differ
diff --git a/doc/src/images/windowsvista-calendarwidget.png b/src/widgets/doc/images/windowsvista-calendarwidget.png
index 3cb1ab78dc..3cb1ab78dc 100644
--- a/doc/src/images/windowsvista-calendarwidget.png
+++ b/src/widgets/doc/images/windowsvista-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/windowsvista-checkbox.png b/src/widgets/doc/images/windowsvista-checkbox.png
index b9bc909988..b9bc909988 100644
--- a/doc/src/images/windowsvista-checkbox.png
+++ b/src/widgets/doc/images/windowsvista-checkbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-combobox.png b/src/widgets/doc/images/windowsvista-combobox.png
index f53192f45a..f53192f45a 100644
--- a/doc/src/images/windowsvista-combobox.png
+++ b/src/widgets/doc/images/windowsvista-combobox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-dateedit.png b/src/widgets/doc/images/windowsvista-dateedit.png
index bb79482849..bb79482849 100644
--- a/doc/src/images/windowsvista-dateedit.png
+++ b/src/widgets/doc/images/windowsvista-dateedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-datetimeedit.png b/src/widgets/doc/images/windowsvista-datetimeedit.png
index 0a104de084..0a104de084 100644
--- a/doc/src/images/windowsvista-datetimeedit.png
+++ b/src/widgets/doc/images/windowsvista-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-dial.png b/src/widgets/doc/images/windowsvista-dial.png
index 7081269c31..7081269c31 100644
--- a/doc/src/images/windowsvista-dial.png
+++ b/src/widgets/doc/images/windowsvista-dial.png
Binary files differ
diff --git a/doc/src/images/windowsvista-doublespinbox.png b/src/widgets/doc/images/windowsvista-doublespinbox.png
index 6efa9379fd..6efa9379fd 100644
--- a/doc/src/images/windowsvista-doublespinbox.png
+++ b/src/widgets/doc/images/windowsvista-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-fontcombobox.png b/src/widgets/doc/images/windowsvista-fontcombobox.png
index 3771e84bd4..3771e84bd4 100644
--- a/doc/src/images/windowsvista-fontcombobox.png
+++ b/src/widgets/doc/images/windowsvista-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-frame.png b/src/widgets/doc/images/windowsvista-frame.png
index 63b8422d2b..63b8422d2b 100644
--- a/doc/src/images/windowsvista-frame.png
+++ b/src/widgets/doc/images/windowsvista-frame.png
Binary files differ
diff --git a/doc/src/images/windowsvista-groupbox.png b/src/widgets/doc/images/windowsvista-groupbox.png
index 967d8878a7..967d8878a7 100644
--- a/doc/src/images/windowsvista-groupbox.png
+++ b/src/widgets/doc/images/windowsvista-groupbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-horizontalscrollbar.png b/src/widgets/doc/images/windowsvista-horizontalscrollbar.png
index 996865d66c..996865d66c 100644
--- a/doc/src/images/windowsvista-horizontalscrollbar.png
+++ b/src/widgets/doc/images/windowsvista-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/windowsvista-label.png b/src/widgets/doc/images/windowsvista-label.png
index caef8d8361..caef8d8361 100644
--- a/doc/src/images/windowsvista-label.png
+++ b/src/widgets/doc/images/windowsvista-label.png
Binary files differ
diff --git a/doc/src/images/windowsvista-lcdnumber.png b/src/widgets/doc/images/windowsvista-lcdnumber.png
index 911438e2b1..911438e2b1 100644
--- a/doc/src/images/windowsvista-lcdnumber.png
+++ b/src/widgets/doc/images/windowsvista-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/windowsvista-lineedit.png b/src/widgets/doc/images/windowsvista-lineedit.png
index 9fcde3a851..9fcde3a851 100644
--- a/doc/src/images/windowsvista-lineedit.png
+++ b/src/widgets/doc/images/windowsvista-lineedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-listview.png b/src/widgets/doc/images/windowsvista-listview.png
index 36a03438ab..36a03438ab 100644
--- a/doc/src/images/windowsvista-listview.png
+++ b/src/widgets/doc/images/windowsvista-listview.png
Binary files differ
diff --git a/doc/src/images/windowsvista-progressbar.png b/src/widgets/doc/images/windowsvista-progressbar.png
index 0bda010811..0bda010811 100644
--- a/doc/src/images/windowsvista-progressbar.png
+++ b/src/widgets/doc/images/windowsvista-progressbar.png
Binary files differ
diff --git a/doc/src/images/windowsvista-pushbutton.png b/src/widgets/doc/images/windowsvista-pushbutton.png
index 3bc438dc10..3bc438dc10 100644
--- a/doc/src/images/windowsvista-pushbutton.png
+++ b/src/widgets/doc/images/windowsvista-pushbutton.png
Binary files differ
diff --git a/doc/src/images/windowsvista-radiobutton.png b/src/widgets/doc/images/windowsvista-radiobutton.png
index fdfd2d66dd..fdfd2d66dd 100644
--- a/doc/src/images/windowsvista-radiobutton.png
+++ b/src/widgets/doc/images/windowsvista-radiobutton.png
Binary files differ
diff --git a/doc/src/images/windowsvista-slider.png b/src/widgets/doc/images/windowsvista-slider.png
index be2fffb7b5..be2fffb7b5 100644
--- a/doc/src/images/windowsvista-slider.png
+++ b/src/widgets/doc/images/windowsvista-slider.png
Binary files differ
diff --git a/doc/src/images/windowsvista-spinbox.png b/src/widgets/doc/images/windowsvista-spinbox.png
index 4a2293e724..4a2293e724 100644
--- a/doc/src/images/windowsvista-spinbox.png
+++ b/src/widgets/doc/images/windowsvista-spinbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-tableview.png b/src/widgets/doc/images/windowsvista-tableview.png
index 96f4937bc1..96f4937bc1 100644
--- a/doc/src/images/windowsvista-tableview.png
+++ b/src/widgets/doc/images/windowsvista-tableview.png
Binary files differ
diff --git a/doc/src/images/windowsvista-tabwidget.png b/src/widgets/doc/images/windowsvista-tabwidget.png
index 259c4f1a89..259c4f1a89 100644
--- a/doc/src/images/windowsvista-tabwidget.png
+++ b/src/widgets/doc/images/windowsvista-tabwidget.png
Binary files differ
diff --git a/doc/src/images/windowsvista-textedit.png b/src/widgets/doc/images/windowsvista-textedit.png
index 5e5696623e..5e5696623e 100644
--- a/doc/src/images/windowsvista-textedit.png
+++ b/src/widgets/doc/images/windowsvista-textedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-timeedit.png b/src/widgets/doc/images/windowsvista-timeedit.png
index e24fdd268a..e24fdd268a 100644
--- a/doc/src/images/windowsvista-timeedit.png
+++ b/src/widgets/doc/images/windowsvista-timeedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-toolbox.png b/src/widgets/doc/images/windowsvista-toolbox.png
index 8cfe5f9cab..8cfe5f9cab 100644
--- a/doc/src/images/windowsvista-toolbox.png
+++ b/src/widgets/doc/images/windowsvista-toolbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-toolbutton.png b/src/widgets/doc/images/windowsvista-toolbutton.png
index 0baa9809c1..0baa9809c1 100644
--- a/doc/src/images/windowsvista-toolbutton.png
+++ b/src/widgets/doc/images/windowsvista-toolbutton.png
Binary files differ
diff --git a/doc/src/images/windowsvista-treeview.png b/src/widgets/doc/images/windowsvista-treeview.png
index db211e4b5f..db211e4b5f 100644
--- a/doc/src/images/windowsvista-treeview.png
+++ b/src/widgets/doc/images/windowsvista-treeview.png
Binary files differ
diff --git a/doc/src/images/windowsxp-calendarwidget.png b/src/widgets/doc/images/windowsxp-calendarwidget.png
index 9a5fa6ebcd..9a5fa6ebcd 100644
--- a/doc/src/images/windowsxp-calendarwidget.png
+++ b/src/widgets/doc/images/windowsxp-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/windowsxp-checkbox.png b/src/widgets/doc/images/windowsxp-checkbox.png
index 505d3a3641..505d3a3641 100644
--- a/doc/src/images/windowsxp-checkbox.png
+++ b/src/widgets/doc/images/windowsxp-checkbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-combobox.png b/src/widgets/doc/images/windowsxp-combobox.png
index 2363c8401c..2363c8401c 100644
--- a/doc/src/images/windowsxp-combobox.png
+++ b/src/widgets/doc/images/windowsxp-combobox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-dateedit.png b/src/widgets/doc/images/windowsxp-dateedit.png
index 060ba07b2c..060ba07b2c 100644
--- a/doc/src/images/windowsxp-dateedit.png
+++ b/src/widgets/doc/images/windowsxp-dateedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-datetimeedit.png b/src/widgets/doc/images/windowsxp-datetimeedit.png
index 4e41f0fc14..4e41f0fc14 100644
--- a/doc/src/images/windowsxp-datetimeedit.png
+++ b/src/widgets/doc/images/windowsxp-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-dial.png b/src/widgets/doc/images/windowsxp-dial.png
index 0aa3a26159..0aa3a26159 100644
--- a/doc/src/images/windowsxp-dial.png
+++ b/src/widgets/doc/images/windowsxp-dial.png
Binary files differ
diff --git a/doc/src/images/windowsxp-doublespinbox.png b/src/widgets/doc/images/windowsxp-doublespinbox.png
index 3165a61b93..3165a61b93 100644
--- a/doc/src/images/windowsxp-doublespinbox.png
+++ b/src/widgets/doc/images/windowsxp-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-fontcombobox.png b/src/widgets/doc/images/windowsxp-fontcombobox.png
index 96292b84ef..96292b84ef 100644
--- a/doc/src/images/windowsxp-fontcombobox.png
+++ b/src/widgets/doc/images/windowsxp-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-frame.png b/src/widgets/doc/images/windowsxp-frame.png
index 5979b31b25..5979b31b25 100644
--- a/doc/src/images/windowsxp-frame.png
+++ b/src/widgets/doc/images/windowsxp-frame.png
Binary files differ
diff --git a/doc/src/images/windowsxp-groupbox.png b/src/widgets/doc/images/windowsxp-groupbox.png
index 0b6f7e21ad..0b6f7e21ad 100644
--- a/doc/src/images/windowsxp-groupbox.png
+++ b/src/widgets/doc/images/windowsxp-groupbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-horizontalscrollbar.png b/src/widgets/doc/images/windowsxp-horizontalscrollbar.png
index 38812ec107..38812ec107 100644
--- a/doc/src/images/windowsxp-horizontalscrollbar.png
+++ b/src/widgets/doc/images/windowsxp-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/windowsxp-label.png b/src/widgets/doc/images/windowsxp-label.png
index a1c3a396a9..a1c3a396a9 100644
--- a/doc/src/images/windowsxp-label.png
+++ b/src/widgets/doc/images/windowsxp-label.png
Binary files differ
diff --git a/doc/src/images/windowsxp-lcdnumber.png b/src/widgets/doc/images/windowsxp-lcdnumber.png
index 102023c8ed..102023c8ed 100644
--- a/doc/src/images/windowsxp-lcdnumber.png
+++ b/src/widgets/doc/images/windowsxp-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/windowsxp-lineedit.png b/src/widgets/doc/images/windowsxp-lineedit.png
index 9102b53ca4..9102b53ca4 100644
--- a/doc/src/images/windowsxp-lineedit.png
+++ b/src/widgets/doc/images/windowsxp-lineedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-listview.png b/src/widgets/doc/images/windowsxp-listview.png
index b0fc9bd3a7..b0fc9bd3a7 100644
--- a/doc/src/images/windowsxp-listview.png
+++ b/src/widgets/doc/images/windowsxp-listview.png
Binary files differ
diff --git a/src/widgets/doc/images/windowsxp-menu.png b/src/widgets/doc/images/windowsxp-menu.png
new file mode 100644
index 0000000000..b8ca947e73
--- /dev/null
+++ b/src/widgets/doc/images/windowsxp-menu.png
Binary files differ
diff --git a/doc/src/images/windowsxp-progressbar.png b/src/widgets/doc/images/windowsxp-progressbar.png
index c8a73d6754..c8a73d6754 100644
--- a/doc/src/images/windowsxp-progressbar.png
+++ b/src/widgets/doc/images/windowsxp-progressbar.png
Binary files differ
diff --git a/doc/src/images/windowsxp-pushbutton.png b/src/widgets/doc/images/windowsxp-pushbutton.png
index bf6b7bf15d..bf6b7bf15d 100644
--- a/doc/src/images/windowsxp-pushbutton.png
+++ b/src/widgets/doc/images/windowsxp-pushbutton.png
Binary files differ
diff --git a/doc/src/images/windowsxp-radiobutton.png b/src/widgets/doc/images/windowsxp-radiobutton.png
index ad8a908fb2..ad8a908fb2 100644
--- a/doc/src/images/windowsxp-radiobutton.png
+++ b/src/widgets/doc/images/windowsxp-radiobutton.png
Binary files differ
diff --git a/doc/src/images/windowsxp-slider.png b/src/widgets/doc/images/windowsxp-slider.png
index 9e2fca7c40..9e2fca7c40 100644
--- a/doc/src/images/windowsxp-slider.png
+++ b/src/widgets/doc/images/windowsxp-slider.png
Binary files differ
diff --git a/doc/src/images/windowsxp-spinbox.png b/src/widgets/doc/images/windowsxp-spinbox.png
index e42073cd6b..e42073cd6b 100644
--- a/doc/src/images/windowsxp-spinbox.png
+++ b/src/widgets/doc/images/windowsxp-spinbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-tableview.png b/src/widgets/doc/images/windowsxp-tableview.png
index 5d12137ad5..5d12137ad5 100644
--- a/doc/src/images/windowsxp-tableview.png
+++ b/src/widgets/doc/images/windowsxp-tableview.png
Binary files differ
diff --git a/doc/src/images/windowsxp-tabwidget.png b/src/widgets/doc/images/windowsxp-tabwidget.png
index 3c8e777a0b..3c8e777a0b 100644
--- a/doc/src/images/windowsxp-tabwidget.png
+++ b/src/widgets/doc/images/windowsxp-tabwidget.png
Binary files differ
diff --git a/doc/src/images/windowsxp-textedit.png b/src/widgets/doc/images/windowsxp-textedit.png
index d89c75c71b..d89c75c71b 100644
--- a/doc/src/images/windowsxp-textedit.png
+++ b/src/widgets/doc/images/windowsxp-textedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-timeedit.png b/src/widgets/doc/images/windowsxp-timeedit.png
index 751cca9e6a..751cca9e6a 100644
--- a/doc/src/images/windowsxp-timeedit.png
+++ b/src/widgets/doc/images/windowsxp-timeedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-toolbox.png b/src/widgets/doc/images/windowsxp-toolbox.png
index 99b471e6df..99b471e6df 100644
--- a/doc/src/images/windowsxp-toolbox.png
+++ b/src/widgets/doc/images/windowsxp-toolbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-toolbutton.png b/src/widgets/doc/images/windowsxp-toolbutton.png
index ea63e16aae..ea63e16aae 100644
--- a/doc/src/images/windowsxp-toolbutton.png
+++ b/src/widgets/doc/images/windowsxp-toolbutton.png
Binary files differ
diff --git a/doc/src/images/windowsxp-treeview.png b/src/widgets/doc/images/windowsxp-treeview.png
index 050cc2f4d6..050cc2f4d6 100644
--- a/doc/src/images/windowsxp-treeview.png
+++ b/src/widgets/doc/images/windowsxp-treeview.png
Binary files differ
diff --git a/src/widgets/doc/qtwidgets.qdocconf b/src/widgets/doc/qtwidgets.qdocconf
new file mode 100644
index 0000000000..c90f25338e
--- /dev/null
+++ b/src/widgets/doc/qtwidgets.qdocconf
@@ -0,0 +1,92 @@
+include(../../../doc/global/qt-cpp-ignore.qdocconf)
+
+project = QtWidgets
+description = Qt Widgets Reference Documentation
+url = http://qt-project.org/doc/qt-5.0/qtwidgets
+version = 5.0.0
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+qhp.projects = QtWidgets
+
+qhp.QtWidgets.file = qtwidgets.qhp
+qhp.QtWidgets.namespace = org.qt-project.qtwidgets.500
+qhp.QtWidgets.virtualFolder = qdoc
+qhp.QtWidgets.indexTitle = Qt Widgets Reference Documentation
+qhp.QtWidgets.indexRoot =
+
+qhp.QtWidgets.filterAttributes = qtwidgets 5.0.0 qtrefdoc
+qhp.QtWidgets.customFilters.Qt.name = QtWidgets 5.0.0
+qhp.QtWidgets.customFilters.Qt.filterAttributes = qtwidgets 5.0.0
+qhp.QtWidgets.subprojects = classes overviews examples
+qhp.QtWidgets.subprojects.classes.title = Classes
+qhp.QtWidgets.subprojects.classes.indexTitle = Qt Widgets' Classes
+qhp.QtWidgets.subprojects.classes.selectors = class fake:headerfile
+qhp.QtWidgets.subprojects.classes.sortPages = true
+qhp.QtWidgets.subprojects.overviews.title = Overviews
+qhp.QtWidgets.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QtWidgets.subprojects.overviews.selectors = fake:page,group,module
+qhp.QtWidgets.subprojects.examples.title = Qt Widgets Examples
+qhp.QtWidgets.subprojects.examples.indexTitle = Qt Widgets Examples
+qhp.QtWidgets.subprojects.examples.selectors = fake:example
+
+dita.metadata.default.author = Qt Project
+dita.metadata.default.permissions = all
+dita.metadata.default.publisher = Qt Project
+dita.metadata.default.copyryear = 2012
+dita.metadata.default.copyrholder = Nokia
+dita.metadata.default.audience = programmer
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
+examples.imageextensions = "*.png"
+
+outputdir = ../../../doc/qtwidgets
+tagfile = ../../../doc/qtwidgets/qtwidgets.tags
+
+HTML.generatemacrefs = "true"
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+
+HTML.stylesheets = ../../../doc/global/style/offline.css
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.endheader = \
+ "</head>\n" \
+
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ QT_DEPRECATED_* \
+ Q_NO_USING_KEYWORD \
+ __cplusplus \
+ Q_COMPILER_INITIALIZER_LISTS
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
+
+depends += qtcore qtgui
+
+headerdirs += ..
+
+sourcedirs += ..
+
+exampledirs += ../../../examples \
+ ../ \
+ snippets
+
+imagedirs += images
diff --git a/doc/src/snippets/code/doc_src_layout.cpp b/src/widgets/doc/snippets/code/doc_src_layout.cpp
index b6abab61d3..b6abab61d3 100644
--- a/doc/src/snippets/code/doc_src_layout.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_layout.cpp
diff --git a/src/widgets/doc/snippets/code/doc_src_model-view-programming.cpp b/src/widgets/doc/snippets/code/doc_src_model-view-programming.cpp
new file mode 100644
index 0000000000..ca9aa606f7
--- /dev/null
+++ b/src/widgets/doc/snippets/code/doc_src_model-view-programming.cpp
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+QAbstractItemModel *model = index.model();
+//! [0]
+
+
+//! [1]
+QModelIndex index = model->index(row, column, ...);
+//! [1]
+
+
+//! [2]
+QModelIndex indexA = model->index(0, 0, QModelIndex());
+QModelIndex indexB = model->index(1, 1, QModelIndex());
+QModelIndex indexC = model->index(2, 1, QModelIndex());
+//! [2]
+
+
+//! [3]
+QModelIndex index = model->index(row, column, parent);
+//! [3]
+
+
+//! [4]
+QModelIndex indexA = model->index(0, 0, QModelIndex());
+QModelIndex indexC = model->index(2, 1, QModelIndex());
+//! [4]
+
+
+//! [5]
+QModelIndex indexB = model->index(1, 0, indexA);
+//! [5]
+
+
+//! [6]
+QVariant value = model->data(index, role);
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp b/src/widgets/doc/snippets/code/doc_src_qt4-mainwindow.cpp
index ecbb5f5220..ecbb5f5220 100644
--- a/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_qt4-mainwindow.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-styles.cpp b/src/widgets/doc/snippets/code/doc_src_qt4-styles.cpp
index 9bebb825e4..9bebb825e4 100644
--- a/doc/src/snippets/code/doc_src_qt4-styles.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_qt4-styles.cpp
diff --git a/src/widgets/doc/snippets/code/doc_src_qtwidgets.cpp b/src/widgets/doc/snippets/code/doc_src_qtwidgets.cpp
new file mode 100644
index 0000000000..74888e3891
--- /dev/null
+++ b/src/widgets/doc/snippets/code/doc_src_qtwidgets.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [1]
+#include <QtWidgets>
+//! [1]
diff --git a/src/widgets/doc/snippets/code/doc_src_qtwidgets.pro b/src/widgets/doc/snippets/code/doc_src_qtwidgets.pro
new file mode 100644
index 0000000000..2fee715c24
--- /dev/null
+++ b/src/widgets/doc/snippets/code/doc_src_qtwidgets.pro
@@ -0,0 +1,3 @@
+#! [0]
+QT += widgets
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_styles.cpp b/src/widgets/doc/snippets/code/doc_src_styles.cpp
index 6c079c6637..6c079c6637 100644
--- a/doc/src/snippets/code/doc_src_styles.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_styles.cpp
diff --git a/doc/src/snippets/code/doc_src_stylesheet.cpp b/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp
index eb02634c6d..eb02634c6d 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp
diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc
index 9acba09c67..9acba09c67 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.qdoc
+++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc
diff --git a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp b/src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp
index 1a89ff327f..1a89ff327f 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_dialogs_qfiledialog.cpp
diff --git a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp b/src/widgets/doc/snippets/code/src_gui_dialogs_qfontdialog.cpp
index e07ecbca3e..e07ecbca3e 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_dialogs_qfontdialog.cpp
diff --git a/src/widgets/doc/snippets/code/src_gui_dialogs_qmessagebox.cpp b/src/widgets/doc/snippets/code/src_gui_dialogs_qmessagebox.cpp
new file mode 100644
index 0000000000..90bc2e9b0a
--- /dev/null
+++ b/src/widgets/doc/snippets/code/src_gui_dialogs_qmessagebox.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+int ret = QMessageBox::warning(this, tr("My Application"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel,
+ QMessageBox::Save);
+//! [0]
+
+
+//! [1]
+QMessageBox msgBox;
+msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+switch (msgBox.exec()) {
+case QMessageBox::Yes:
+ // yes was clicked
+ break;
+case QMessageBox::No:
+ // no was clicked
+ break;
+default:
+ // should never be reached
+ break;
+}
+//! [1]
+
+
+//! [2]
+QMessageBox msgBox;
+QPushButton *connectButton = msgBox.addButton(tr("Connect"), QMessageBox::ActionRole);
+QPushButton *abortButton = msgBox.addButton(QMessageBox::Abort);
+
+msgBox.exec();
+
+if (msgBox.clickedButton() == connectButton) {
+ // connect
+} else if (msgBox.clickedButton() == abortButton) {
+ // abort
+}
+//! [2]
+
+
+//! [3]
+QMessageBox messageBox(this);
+QAbstractButton *disconnectButton =
+ messageBox.addButton(tr("Disconnect"), QMessageBox::ActionRole);
+...
+messageBox.exec();
+if (messageBox.clickedButton() == disconnectButton) {
+ ...
+}
+//! [3]
+
+
+//! [4]
+#include <QApplication>
+#include <QMessageBox>
+
+int main(int argc, char *argv[])
+{
+ QT_REQUIRE_VERSION(argc, argv, "4.0.2")
+
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [4]
+
+//! [5]
+QMessageBox msgBox;
+msgBox.setText("The document has been modified.");
+msgBox.exec();
+//! [5]
+
+//! [6]
+QMessageBox msgBox;
+msgBox.setText("The document has been modified.");
+msgBox.setInformativeText("Do you want to save your changes?");
+msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+msgBox.setDefaultButton(QMessageBox::Save);
+int ret = msgBox.exec();
+//! [6]
+
+//! [7]
+switch (ret) {
+ case QMessageBox::Save:
+ // Save was clicked
+ break;
+ case QMessageBox::Discard:
+ // Don't Save was clicked
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+}
+//! [7]
+
+//! [9]
+QMessageBox msgBox(this);
+msgBox.setText(tr("The document has been modified.\n"
+ "Do you want to save your changes?"));
+msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
+msgBox.setDefaultButton(QMessageBox::Save);
+//! [9]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp b/src/widgets/doc/snippets/code/src_gui_dialogs_qwizard.cpp
index 47db20da99..47db20da99 100644
--- a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_dialogs_qwizard.cpp
diff --git a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp b/src/widgets/doc/snippets/code/src_gui_effects_qgraphicseffect.cpp
index 3e0b0b64ee..3e0b0b64ee 100644
--- a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_effects_qgraphicseffect.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
index 9a974de016..9a974de016 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
index 01df05c084..01df05c084 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
index e3998201af..e3998201af 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
index e508dbfb2b..e508dbfb2b 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
index 40b240c56f..40b240c56f 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
index 0e9ceea6a0..0e9ceea6a0 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
index d07b5f7cf6..d07b5f7cf6 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
index da92f2d2e1..da92f2d2e1 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qicon.cpp b/src/widgets/doc/snippets/code/src_gui_image_qicon.cpp
index 28ebea8f65..28ebea8f65 100644
--- a/doc/src/snippets/code/src_gui_image_qicon.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_image_qicon.cpp
diff --git a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp b/src/widgets/doc/snippets/code/src_gui_image_qpixmapfilter.cpp
index 55d5aa4897..55d5aa4897 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_image_qpixmapfilter.cpp
diff --git a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qabstractitemview.cpp
index 2a497ff37c..2a497ff37c 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qabstractitemview.cpp
diff --git a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
index d968260d39..d968260d39 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
index 3f1e11c04c..3f1e11c04c 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
diff --git a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
index ae91339867..ae91339867 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
diff --git a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp
index 169fff57b9..169fff57b9 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp
diff --git a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp
index b299d765f3..b299d765f3 100644
--- a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qtreewidget.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qaction.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qaction.cpp
index af876cd872..af876cd872 100644
--- a/doc/src/snippets/code/src_gui_kernel_qaction.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qaction.cpp
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
new file mode 100644
index 0000000000..b32e8c3f39
--- /dev/null
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [0]
+int main(int argc, char **argv)
+{
+#ifdef Q_WS_X11
+ bool useGUI = getenv("DISPLAY") != 0;
+#else
+ bool useGUI = true;
+#endif
+ QApplication app(argc, argv, useGUI);
+
+ if (useGUI) {
+ // start GUI version
+ ...
+ } else {
+ // start non-GUI version
+ ...
+ }
+ return app.exec();
+}
+//! [0]
+
+
+//! [1]
+QApplication::setStyle(new QWindowsStyle);
+//! [1]
+
+
+//! [2]
+int main(int argc, char *argv[])
+{
+ QApplication::setColorSpec(QApplication::ManyColor);
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [2]
+
+
+//! [3]
+QSize MyWidget::sizeHint() const
+{
+ return QSize(80, 25).expandedTo(QApplication::globalStrut());
+}
+//! [3]
+
+
+//! [4]
+void showAllHiddenTopLevelWidgets()
+{
+ foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ if (widget->isHidden())
+ widget->show();
+ }
+}
+//! [4]
+
+
+//! [5]
+void updateAllWidgets()
+{
+ foreach (QWidget *widget, QApplication::allWidgets())
+ widget->update();
+}
+//! [5]
+
+
+//! [6]
+int main(int argc, char *argv[])
+{
+ QApplication::setDesktopSettingsAware(false);
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [6]
+
+
+//! [7]
+if ((startPos - currentPos).manhattanLength() >=
+ QApplication::startDragDistance())
+ startTheDrag();
+//! [7]
+
+
+//! [8]
+void MyApplication::commitData(QSessionManager& manager)
+{
+ if (manager.allowsInteraction()) {
+ int ret = QMessageBox::warning(
+ mainWindow,
+ tr("My Application"),
+ tr("Save changes to document?"),
+ QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+
+ switch (ret) {
+ case QMessageBox::Save:
+ manager.release();
+ if (!saveDocument())
+ manager.cancel();
+ break;
+ case QMessageBox::Discard:
+ break;
+ case QMessageBox::Cancel:
+ default:
+ manager.cancel();
+ }
+ } else {
+ // we did not get permission to interact, then
+ // do something reasonable instead
+ }
+}
+//! [8]
+
+
+//! [9]
+appname -session id
+//! [9]
+
+
+//! [10]
+foreach (const QString &command, mySession.restartCommand())
+ do_something(command);
+//! [10]
+
+
+//! [11]
+foreach (const QString &command, mySession.discardCommand())
+ do_something(command);
+//! [11]
+
+
+//! [12]
+QWidget *widget = qApp->widgetAt(x, y);
+if (widget)
+ widget = widget->window();
+//! [12]
+
+
+//! [13]
+QWidget *widget = qApp->widgetAt(point);
+if (widget)
+ widget = widget->window();
+//! [13]
diff --git a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qformlayout.cpp
index 1f7517b613..1f7517b613 100644
--- a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qformlayout.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp
index cabd753b5d..cabd753b5d 100644
--- a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qlayout.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp
index 378253c605..378253c605 100644
--- a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qlayoutitem.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qshortcut.cpp
index 31e3e3291e..31e3e3291e 100644
--- a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qshortcut.cpp
diff --git a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qwidget.cpp
index 3e94519073..3e94519073 100644
--- a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_kernel_qwidget.cpp
diff --git a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp b/src/widgets/doc/snippets/code/src_gui_painting_qdrawutil.cpp
index 0f70fce8ef..0f70fce8ef 100644
--- a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_painting_qdrawutil.cpp
diff --git a/doc/src/snippets/code/src_gui_qproxystyle.cpp b/src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp
index ae9ff131aa..ae9ff131aa 100644
--- a/doc/src/snippets/code/src_gui_qproxystyle.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_qproxystyle.cpp
diff --git a/doc/src/snippets/code/src_gui_styles_qstyle.cpp b/src/widgets/doc/snippets/code/src_gui_styles_qstyle.cpp
index ed4ebb60a4..ed4ebb60a4 100644
--- a/doc/src/snippets/code/src_gui_styles_qstyle.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_styles_qstyle.cpp
diff --git a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp b/src/widgets/doc/snippets/code/src_gui_styles_qstyleoption.cpp
index 962212388f..962212388f 100644
--- a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_styles_qstyleoption.cpp
diff --git a/doc/src/snippets/code/src_gui_util_qcompleter.cpp b/src/widgets/doc/snippets/code/src_gui_util_qcompleter.cpp
index 2e8eac17ad..2e8eac17ad 100644
--- a/doc/src/snippets/code/src_gui_util_qcompleter.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_util_qcompleter.cpp
diff --git a/doc/src/snippets/code/src_gui_util_qundostack.cpp b/src/widgets/doc/snippets/code/src_gui_util_qundostack.cpp
index 7e06a8ef6f..7e06a8ef6f 100644
--- a/doc/src/snippets/code/src_gui_util_qundostack.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_util_qundostack.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qabstractbutton.cpp
index 948ed0e958..948ed0e958 100644
--- a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qabstractbutton.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qabstractspinbox.cpp
index 66f3449760..66f3449760 100644
--- a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qabstractspinbox.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qcalendarwidget.cpp
index 6f99bdf0ce..6f99bdf0ce 100644
--- a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qcalendarwidget.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qcheckbox.cpp
index 71ee59bc85..71ee59bc85 100644
--- a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qcheckbox.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qdatetimeedit.cpp
index 5eb9e739ea..5eb9e739ea 100644
--- a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qdatetimeedit.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qdockwidget.cpp
index 690e3d5f33..690e3d5f33 100644
--- a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qdockwidget.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qframe.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qframe.cpp
index 6e3afcd8cf..6e3afcd8cf 100644
--- a/doc/src/snippets/code/src_gui_widgets_qframe.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qframe.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qgroupbox.cpp
index fc0339f690..fc0339f690 100644
--- a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qgroupbox.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qlabel.cpp
index 83b02a2f22..83b02a2f22 100644
--- a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qlabel.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qlineedit.cpp
index 12ed38ad65..12ed38ad65 100644
--- a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qlineedit.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qmainwindow.cpp
index 3558922ec9..3558922ec9 100644
--- a/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qmainwindow.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp
index 5799248bf4..5799248bf4 100644
--- a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qmenu.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp
index 412bc2d5eb..412bc2d5eb 100644
--- a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qmenubar.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qplaintextedit.cpp
index 931c6c69a6..931c6c69a6 100644
--- a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qplaintextedit.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qpushbutton.cpp
index e0ae945620..e0ae945620 100644
--- a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qpushbutton.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qradiobutton.cpp
index a93809fa5d..a93809fa5d 100644
--- a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qradiobutton.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qrubberband.cpp
index b8d6a14d1c..b8d6a14d1c 100644
--- a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qrubberband.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qscrollarea.cpp
index 9c90a0c53d..9c90a0c53d 100644
--- a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qscrollarea.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qspinbox.cpp
index fc1f5b7e47..fc1f5b7e47 100644
--- a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qspinbox.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp
index 48f1051e2c..48f1051e2c 100644
--- a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qsplashscreen.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qsplitter.cpp
index 18007a4cdf..18007a4cdf 100644
--- a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qsplitter.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qstatusbar.cpp
index 6ea752b237..6ea752b237 100644
--- a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qstatusbar.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qtextbrowser.cpp
index ed30c2d80a..ed30c2d80a 100644
--- a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qtextbrowser.cpp
diff --git a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp b/src/widgets/doc/snippets/code/src_gui_widgets_qtextedit.cpp
index cd1ae62c84..cd1ae62c84 100644
--- a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_widgets_qtextedit.cpp
diff --git a/doc/src/snippets/customstyle/customstyle.cpp b/src/widgets/doc/snippets/customstyle/customstyle.cpp
index 2e0843c49c..2e0843c49c 100644
--- a/doc/src/snippets/customstyle/customstyle.cpp
+++ b/src/widgets/doc/snippets/customstyle/customstyle.cpp
diff --git a/doc/src/snippets/customstyle/customstyle.h b/src/widgets/doc/snippets/customstyle/customstyle.h
index 437994d2e2..437994d2e2 100644
--- a/doc/src/snippets/customstyle/customstyle.h
+++ b/src/widgets/doc/snippets/customstyle/customstyle.h
diff --git a/src/widgets/doc/snippets/customstyle/customstyle.pro b/src/widgets/doc/snippets/customstyle/customstyle.pro
new file mode 100644
index 0000000000..af0ee4e141
--- /dev/null
+++ b/src/widgets/doc/snippets/customstyle/customstyle.pro
@@ -0,0 +1,2 @@
+HEADERS += customstyle.h
+SOURCES += customstyle.cpp main.cpp
diff --git a/src/widgets/doc/snippets/customstyle/main.cpp b/src/widgets/doc/snippets/customstyle/main.cpp
new file mode 100644
index 0000000000..b3bea3bd7b
--- /dev/null
+++ b/src/widgets/doc/snippets/customstyle/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+//! [using a custom style]
+#include <QtGui>
+
+#include "customstyle.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication::setStyle(new CustomStyle);
+ QApplication app(argc, argv);
+ QSpinBox spinBox;
+ spinBox.show();
+ return app.exec();
+}
+//! [using a custom style]
diff --git a/doc/src/snippets/customviewstyle.cpp b/src/widgets/doc/snippets/customviewstyle.cpp
index 55a766d17d..55a766d17d 100644
--- a/doc/src/snippets/customviewstyle.cpp
+++ b/src/widgets/doc/snippets/customviewstyle.cpp
diff --git a/doc/src/snippets/dialogs/dialogs.cpp b/src/widgets/doc/snippets/dialogs/dialogs.cpp
index 78916f862c..78916f862c 100644
--- a/doc/src/snippets/dialogs/dialogs.cpp
+++ b/src/widgets/doc/snippets/dialogs/dialogs.cpp
diff --git a/doc/src/snippets/dockwidgets/mainwindow.cpp b/src/widgets/doc/snippets/dockwidgets/mainwindow.cpp
index 882af70b64..882af70b64 100644
--- a/doc/src/snippets/dockwidgets/mainwindow.cpp
+++ b/src/widgets/doc/snippets/dockwidgets/mainwindow.cpp
diff --git a/doc/src/snippets/filedialogurls.cpp b/src/widgets/doc/snippets/filedialogurls.cpp
index b1e41cbcad..b1e41cbcad 100644
--- a/doc/src/snippets/filedialogurls.cpp
+++ b/src/widgets/doc/snippets/filedialogurls.cpp
diff --git a/doc/src/snippets/graphicssceneadditemsnippet.cpp b/src/widgets/doc/snippets/graphicssceneadditemsnippet.cpp
index 1130a59217..1130a59217 100644
--- a/doc/src/snippets/graphicssceneadditemsnippet.cpp
+++ b/src/widgets/doc/snippets/graphicssceneadditemsnippet.cpp
diff --git a/src/widgets/doc/snippets/itemselection/itemselection.pro b/src/widgets/doc/snippets/itemselection/itemselection.pro
new file mode 100644
index 0000000000..b1126bfe73
--- /dev/null
+++ b/src/widgets/doc/snippets/itemselection/itemselection.pro
@@ -0,0 +1,3 @@
+HEADERS = model.h
+SOURCES = main.cpp \
+ model.cpp
diff --git a/src/widgets/doc/snippets/itemselection/main.cpp b/src/widgets/doc/snippets/itemselection/main.cpp
new file mode 100644
index 0000000000..f39fb68b32
--- /dev/null
+++ b/src/widgets/doc/snippets/itemselection/main.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how selections can be used directly on a model.
+ It shows the result of some selections made using a table view.
+*/
+
+#include <QApplication>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QTableView>
+
+#include "model.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ TableModel *model = new TableModel(8, 4, &app);
+
+ QTableView *table = new QTableView(0);
+ table->setModel(model);
+
+ QItemSelectionModel *selectionModel = table->selectionModel();
+//! [0] //! [1]
+ QModelIndex topLeft;
+ QModelIndex bottomRight;
+
+ topLeft = model->index(0, 0, QModelIndex());
+ bottomRight = model->index(5, 2, QModelIndex());
+//! [1]
+
+//! [2]
+ QItemSelection selection(topLeft, bottomRight);
+ selectionModel->select(selection, QItemSelectionModel::Select);
+//! [2]
+
+//! [3]
+ QItemSelection toggleSelection;
+
+ topLeft = model->index(2, 1, QModelIndex());
+ bottomRight = model->index(7, 3, QModelIndex());
+ toggleSelection.select(topLeft, bottomRight);
+
+ selectionModel->select(toggleSelection, QItemSelectionModel::Toggle);
+//! [3]
+
+//! [4]
+ QItemSelection columnSelection;
+
+ topLeft = model->index(0, 1, QModelIndex());
+ bottomRight = model->index(0, 2, QModelIndex());
+
+ columnSelection.select(topLeft, bottomRight);
+
+ selectionModel->select(columnSelection,
+ QItemSelectionModel::Select | QItemSelectionModel::Columns);
+
+ QItemSelection rowSelection;
+
+ topLeft = model->index(0, 0, QModelIndex());
+ bottomRight = model->index(1, 0, QModelIndex());
+
+ rowSelection.select(topLeft, bottomRight);
+
+ selectionModel->select(rowSelection,
+ QItemSelectionModel::Select | QItemSelectionModel::Rows);
+//! [4]
+
+ table->setWindowTitle("Selected items in a table model");
+ table->show();
+ table->resize(460, 280);
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/itemselection/model.cpp b/src/widgets/doc/snippets/itemselection/model.cpp
new file mode 100644
index 0000000000..6c9c5bad82
--- /dev/null
+++ b/src/widgets/doc/snippets/itemselection/model.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/src/widgets/doc/snippets/itemselection/model.h b/src/widgets/doc/snippets/itemselection/model.h
new file mode 100644
index 0000000000..ef63e45ce0
--- /dev/null
+++ b/src/widgets/doc/snippets/itemselection/model.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/doc/src/snippets/javastyle.cpp b/src/widgets/doc/snippets/javastyle.cpp
index a00df57e82..a00df57e82 100644
--- a/doc/src/snippets/javastyle.cpp
+++ b/src/widgets/doc/snippets/javastyle.cpp
diff --git a/doc/src/snippets/layouts/layouts.cpp b/src/widgets/doc/snippets/layouts/layouts.cpp
index 49c341c048..49c341c048 100644
--- a/doc/src/snippets/layouts/layouts.cpp
+++ b/src/widgets/doc/snippets/layouts/layouts.cpp
diff --git a/doc/src/snippets/mainwindowsnippet.cpp b/src/widgets/doc/snippets/mainwindowsnippet.cpp
index 76305e9ce2..76305e9ce2 100644
--- a/doc/src/snippets/mainwindowsnippet.cpp
+++ b/src/widgets/doc/snippets/mainwindowsnippet.cpp
diff --git a/doc/src/snippets/mdiareasnippets.cpp b/src/widgets/doc/snippets/mdiareasnippets.cpp
index 711f25bd83..711f25bd83 100644
--- a/doc/src/snippets/mdiareasnippets.cpp
+++ b/src/widgets/doc/snippets/mdiareasnippets.cpp
diff --git a/doc/src/snippets/myscrollarea.cpp b/src/widgets/doc/snippets/myscrollarea.cpp
index a6a575f922..a6a575f922 100644
--- a/doc/src/snippets/myscrollarea.cpp
+++ b/src/widgets/doc/snippets/myscrollarea.cpp
diff --git a/src/widgets/doc/snippets/qlistview-dnd/main.cpp b/src/widgets/doc/snippets/qlistview-dnd/main.cpp
new file mode 100644
index 0000000000..56bff2a612
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistview-dnd/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/qlistview-dnd/mainwindow.cpp b/src/widgets/doc/snippets/qlistview-dnd/mainwindow.cpp
new file mode 100644
index 0000000000..ff35c5e25d
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistview-dnd/mainwindow.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 "mainwindow.h"
+#include "model.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ menuBar()->addMenu(fileMenu);
+
+// For convenient quoting:
+//! [0]
+QListView *listView = new QListView(this);
+listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
+listView->setDragEnabled(true);
+listView->setAcceptDrops(true);
+listView->setDropIndicatorShown(true);
+//! [0]
+
+ this->listView = listView;
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setupListItems();
+
+ setCentralWidget(listView);
+ setWindowTitle(tr("List View"));
+}
+
+void MainWindow::setupListItems()
+{
+ QStringList items;
+ items << tr("Oak") << tr("Fir") << tr("Pine") << tr("Birch") << tr("Hazel")
+ << tr("Redwood") << tr("Sycamore") << tr("Chestnut")
+ << tr("Mahogany");
+
+ DragDropListModel *model = new DragDropListModel(items, this);
+ listView->setModel(model);
+}
diff --git a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp b/src/widgets/doc/snippets/qlistview-dnd/mainwindow.h
index 7a2eee142e..daac61260e 100644
--- a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp
+++ b/src/widgets/doc/snippets/qlistview-dnd/mainwindow.h
@@ -38,12 +38,24 @@
**
****************************************************************************/
-//! [0]
-configure -L <path to tslib library> -I <path to tslib headers>
-//! [0]
+#ifndef WINDOW_H
+#define WINDOW_H
+#include <QMainWindow>
-//! [1]
-module_raw input
-module linear
-//! [1]
+class QListView;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void setupListItems();
+
+ QListView *listView;
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/qlistview-dnd/model.cpp b/src/widgets/doc/snippets/qlistview-dnd/model.cpp
new file mode 100644
index 0000000000..190ac968c0
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistview-dnd/model.cpp
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QStringList as its data source.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+DragDropListModel::DragDropListModel(const QStringList &strings,
+ QObject *parent)
+ : QStringListModel(strings, parent)
+{
+}
+
+//! [0]
+bool DragDropListModel::dropMimeData(const QMimeData *data,
+ Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+ if (action == Qt::IgnoreAction)
+ return true;
+
+ if (!data->hasFormat("application/vnd.text.list"))
+ return false;
+
+ if (column > 0)
+//! [0] //! [1]
+ return false;
+//! [1]
+
+//! [2]
+ int beginRow;
+
+ if (row != -1)
+ beginRow = row;
+//! [2] //! [3]
+ else if (parent.isValid())
+ beginRow = parent.row();
+//! [3] //! [4]
+ else
+ beginRow = rowCount(QModelIndex());
+//! [4]
+
+//! [5]
+ QByteArray encodedData = data->data("application/vnd.text.list");
+ QDataStream stream(&encodedData, QIODevice::ReadOnly);
+ QStringList newItems;
+ int rows = 0;
+
+ while (!stream.atEnd()) {
+ QString text;
+ stream >> text;
+ newItems << text;
+ ++rows;
+ }
+//! [5]
+
+//! [6]
+ insertRows(beginRow, rows, QModelIndex());
+ foreach (const QString &text, newItems) {
+ QModelIndex idx = index(beginRow, 0, QModelIndex());
+ setData(idx, text);
+ beginRow++;
+ }
+
+ return true;
+}
+//! [6]
+
+//! [7]
+Qt::ItemFlags DragDropListModel::flags(const QModelIndex &index) const
+{
+ Qt::ItemFlags defaultFlags = QStringListModel::flags(index);
+
+ if (index.isValid())
+ return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
+ else
+ return Qt::ItemIsDropEnabled | defaultFlags;
+}
+//! [7]
+
+//! [8]
+QMimeData *DragDropListModel::mimeData(const QModelIndexList &indexes) const
+{
+ QMimeData *mimeData = new QMimeData();
+ QByteArray encodedData;
+
+ QDataStream stream(&encodedData, QIODevice::WriteOnly);
+
+ foreach (const QModelIndex &index, indexes) {
+ if (index.isValid()) {
+ QString text = data(index, Qt::DisplayRole).toString();
+ stream << text;
+ }
+ }
+
+ mimeData->setData("application/vnd.text.list", encodedData);
+ return mimeData;
+}
+//! [8]
+
+//! [9]
+QStringList DragDropListModel::mimeTypes() const
+{
+ QStringList types;
+ types << "application/vnd.text.list";
+ return types;
+}
+//! [9]
+
+//! [10]
+Qt::DropActions DragDropListModel::supportedDropActions() const
+{
+ return Qt::CopyAction | Qt::MoveAction;
+}
+//! [10]
diff --git a/src/widgets/doc/snippets/qlistview-dnd/model.h b/src/widgets/doc/snippets/qlistview-dnd/model.h
new file mode 100644
index 0000000000..9d1ff904e1
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistview-dnd/model.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QObject>
+#include <QStringListModel>
+
+class DragDropListModel : public QStringListModel
+{
+ Q_OBJECT
+
+public:
+ DragDropListModel(const QStringList &strings, QObject *parent = 0);
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+ QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const;
+ Qt::DropActions supportedDropActions() const;
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/qlistview-dnd/qlistview-dnd.pro b/src/widgets/doc/snippets/qlistview-dnd/qlistview-dnd.pro
new file mode 100644
index 0000000000..71fa273a69
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistview-dnd/qlistview-dnd.pro
@@ -0,0 +1,5 @@
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ model.cpp
+HEADERS = mainwindow.h \
+ model.h
diff --git a/src/widgets/doc/snippets/qlistwidget-dnd/main.cpp b/src/widgets/doc/snippets/qlistwidget-dnd/main.cpp
new file mode 100644
index 0000000000..56bff2a612
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistwidget-dnd/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.cpp b/src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.cpp
new file mode 100644
index 0000000000..8d93f823f4
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ menuBar()->addMenu(fileMenu);
+
+// For convenient quoting:
+//! [0]
+QListWidget *listWidget = new QListWidget(this);
+listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+listWidget->setDragEnabled(true);
+listWidget->viewport()->setAcceptDrops(true);
+listWidget->setDropIndicatorShown(true);
+//! [0] //! [1]
+listWidget->setDragDropMode(QAbstractItemView::InternalMove);
+//! [1]
+
+ this->listWidget = listWidget;
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setupListItems();
+
+ setCentralWidget(listWidget);
+ setWindowTitle(tr("List Widget"));
+}
+
+void MainWindow::setupListItems()
+{
+ QListWidgetItem *item;
+ item = new QListWidgetItem(tr("Oak"), listWidget);
+ item = new QListWidgetItem(tr("Fir"), listWidget);
+ item = new QListWidgetItem(tr("Pine"), listWidget);
+ item = new QListWidgetItem(tr("Birch"), listWidget);
+ item = new QListWidgetItem(tr("Hazel"), listWidget);
+ item = new QListWidgetItem(tr("Redwood"), listWidget);
+ item = new QListWidgetItem(tr("Sycamore"), listWidget);
+ item = new QListWidgetItem(tr("Chestnut"), listWidget);
+ item = new QListWidgetItem(tr("Mahogany"), listWidget);
+}
diff --git a/src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.h b/src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.h
new file mode 100644
index 0000000000..50cac647d1
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistwidget-dnd/mainwindow.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QListWidget;
+class QListWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void setupListItems();
+
+ QListWidget *listWidget;
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/qlistwidget-dnd/qlistwidget-dnd.pro b/src/widgets/doc/snippets/qlistwidget-dnd/qlistwidget-dnd.pro
new file mode 100644
index 0000000000..12a900a7c6
--- /dev/null
+++ b/src/widgets/doc/snippets/qlistwidget-dnd/qlistwidget-dnd.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
diff --git a/doc/src/snippets/qlistwidget-using/mainwindow.cpp b/src/widgets/doc/snippets/qlistwidget-using/mainwindow.cpp
index 8e30f7979b..8e30f7979b 100644
--- a/doc/src/snippets/qlistwidget-using/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qlistwidget-using/mainwindow.cpp
diff --git a/doc/src/snippets/qmacnativewidget/main.mm b/src/widgets/doc/snippets/qmacnativewidget/main.mm
index 2c5c49769a..2c5c49769a 100644
--- a/doc/src/snippets/qmacnativewidget/main.mm
+++ b/src/widgets/doc/snippets/qmacnativewidget/main.mm
diff --git a/src/widgets/doc/snippets/qsortfilterproxymodel/main.cpp b/src/widgets/doc/snippets/qsortfilterproxymodel/main.cpp
new file mode 100644
index 0000000000..0d78ae3f10
--- /dev/null
+++ b/src/widgets/doc/snippets/qsortfilterproxymodel/main.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QObject *parent = &app;
+
+ QStringList numbers;
+ numbers << "One" << "Two" << "Three" << "Four" << "Five";
+
+ QAbstractItemModel *stringListModel = new QStringListModel(numbers, parent);
+
+//! [0]
+ QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(parent);
+ filterModel->setSourceModel(stringListModel);
+//! [0]
+
+ QWidget *window = new QWidget;
+
+//! [1]
+ QListView *filteredView = new QListView;
+ filteredView->setModel(filterModel);
+//! [1]
+ filteredView->setWindowTitle("Filtered view onto a string list model");
+
+ QLineEdit *patternEditor = new QLineEdit;
+ QObject::
+ connect(patternEditor, SIGNAL(textChanged(const QString &)),
+ filterModel, SLOT(setFilterRegExp(const QString &)));
+
+ QVBoxLayout *layout = new QVBoxLayout(window);
+ layout->addWidget(filteredView);
+ layout->addWidget(patternEditor);
+
+ window->show();
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro b/src/widgets/doc/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro
new file mode 100644
index 0000000000..16181f21cf
--- /dev/null
+++ b/src/widgets/doc/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qsplashscreen/main.cpp b/src/widgets/doc/snippets/qsplashscreen/main.cpp
index 49bc084412..49bc084412 100644
--- a/doc/src/snippets/qsplashscreen/main.cpp
+++ b/src/widgets/doc/snippets/qsplashscreen/main.cpp
diff --git a/doc/src/snippets/qstackedlayout/main.cpp b/src/widgets/doc/snippets/qstackedlayout/main.cpp
index 771c36c721..771c36c721 100644
--- a/doc/src/snippets/qstackedlayout/main.cpp
+++ b/src/widgets/doc/snippets/qstackedlayout/main.cpp
diff --git a/doc/src/snippets/qstackedwidget/main.cpp b/src/widgets/doc/snippets/qstackedwidget/main.cpp
index 9a29d773e6..9a29d773e6 100644
--- a/doc/src/snippets/qstackedwidget/main.cpp
+++ b/src/widgets/doc/snippets/qstackedwidget/main.cpp
diff --git a/doc/src/snippets/qstyleoption/main.cpp b/src/widgets/doc/snippets/qstyleoption/main.cpp
index 78f663012c..78f663012c 100644
--- a/doc/src/snippets/qstyleoption/main.cpp
+++ b/src/widgets/doc/snippets/qstyleoption/main.cpp
diff --git a/doc/src/snippets/qstyleplugin/main.cpp b/src/widgets/doc/snippets/qstyleplugin/main.cpp
index 10a122016f..10a122016f 100644
--- a/doc/src/snippets/qstyleplugin/main.cpp
+++ b/src/widgets/doc/snippets/qstyleplugin/main.cpp
diff --git a/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp b/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
index f3ab01784e..f3ab01784e 100644
--- a/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
diff --git a/src/widgets/doc/snippets/qtablewidget-using/Images/cubed.png b/src/widgets/doc/snippets/qtablewidget-using/Images/cubed.png
new file mode 100644
index 0000000000..2cd9048ca6
--- /dev/null
+++ b/src/widgets/doc/snippets/qtablewidget-using/Images/cubed.png
Binary files differ
diff --git a/src/widgets/doc/snippets/qtablewidget-using/Images/squared.png b/src/widgets/doc/snippets/qtablewidget-using/Images/squared.png
new file mode 100644
index 0000000000..bfdf993289
--- /dev/null
+++ b/src/widgets/doc/snippets/qtablewidget-using/Images/squared.png
Binary files differ
diff --git a/src/widgets/doc/snippets/qtablewidget-using/images.qrc b/src/widgets/doc/snippets/qtablewidget-using/images.qrc
new file mode 100644
index 0000000000..1d49b52866
--- /dev/null
+++ b/src/widgets/doc/snippets/qtablewidget-using/images.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>Images/squared.png</file>
+ <file>Images/cubed.png</file>
+</qresource>
+</RCC>
diff --git a/src/widgets/doc/snippets/qtablewidget-using/main.cpp b/src/widgets/doc/snippets/qtablewidget-using/main.cpp
new file mode 100644
index 0000000000..56bff2a612
--- /dev/null
+++ b/src/widgets/doc/snippets/qtablewidget-using/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtablewidget-using/mainwindow.cpp b/src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp
index b03a5e4999..b03a5e4999 100644
--- a/doc/src/snippets/qtablewidget-using/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp
diff --git a/src/widgets/doc/snippets/qtablewidget-using/mainwindow.h b/src/widgets/doc/snippets/qtablewidget-using/mainwindow.h
new file mode 100644
index 0000000000..5c8c997762
--- /dev/null
+++ b/src/widgets/doc/snippets/qtablewidget-using/mainwindow.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QTableWidget;
+class QTableWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void averageItems();
+ void sumItems();
+
+private:
+ void setupTableItems();
+
+ QAction *removeAction;
+//! [0]
+ QTableWidget *tableWidget;
+//! [0]
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/qtablewidget-using/qtablewidget-using.pro b/src/widgets/doc/snippets/qtablewidget-using/qtablewidget-using.pro
new file mode 100644
index 0000000000..ffe134cbb6
--- /dev/null
+++ b/src/widgets/doc/snippets/qtablewidget-using/qtablewidget-using.pro
@@ -0,0 +1,4 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
+RESOURCES += images.qrc
diff --git a/doc/src/snippets/qtreewidget-using/mainwindow.cpp b/src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp
index 2a62c3e5f8..2a62c3e5f8 100644
--- a/doc/src/snippets/qtreewidget-using/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp
diff --git a/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp b/src/widgets/doc/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
index a0648b18c5..a0648b18c5 100644
--- a/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
diff --git a/src/widgets/doc/snippets/reading-selections/main.cpp b/src/widgets/doc/snippets/reading-selections/main.cpp
new file mode 100644
index 0000000000..3356ffc8ab
--- /dev/null
+++ b/src/widgets/doc/snippets/reading-selections/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how selections can be used directly on a model.
+ It shows the result of some selections made using a table view.
+*/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QMainWindow *window = new MainWindow;
+ window->show();
+ window->resize(640, 480);
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/reading-selections/model.cpp b/src/widgets/doc/snippets/reading-selections/model.cpp
new file mode 100644
index 0000000000..ca4b9f84dd
--- /dev/null
+++ b/src/widgets/doc/snippets/reading-selections/model.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/src/widgets/doc/snippets/reading-selections/model.h b/src/widgets/doc/snippets/reading-selections/model.h
new file mode 100644
index 0000000000..ef63e45ce0
--- /dev/null
+++ b/src/widgets/doc/snippets/reading-selections/model.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/reading-selections/reading-selections.pro b/src/widgets/doc/snippets/reading-selections/reading-selections.pro
new file mode 100644
index 0000000000..91ebd3e84f
--- /dev/null
+++ b/src/widgets/doc/snippets/reading-selections/reading-selections.pro
@@ -0,0 +1,2 @@
+HEADERS += model.h window.h
+SOURCES += main.cpp model.cpp window.cpp
diff --git a/src/widgets/doc/snippets/reading-selections/window.cpp b/src/widgets/doc/snippets/reading-selections/window.cpp
new file mode 100644
index 0000000000..dd9970374f
--- /dev/null
+++ b/src/widgets/doc/snippets/reading-selections/window.cpp
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ window.cpp
+
+ A minimal subclass of QTableView with slots to allow the selection model
+ to be monitored.
+*/
+
+#include <QAbstractItemModel>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QMenu>
+#include <QMenuBar>
+#include <QStatusBar>
+
+#include "model.h"
+#include "window.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle("Selected Items in a Table Model");
+
+ model = new TableModel(8, 4, this);
+
+ table = new QTableView(this);
+ table->setModel(model);
+
+ QMenu *actionMenu = new QMenu(tr("&Actions"), this);
+ QAction *fillAction = actionMenu->addAction(tr("&Fill Selection"));
+ QAction *clearAction = actionMenu->addAction(tr("&Clear Selection"));
+ QAction *selectAllAction = actionMenu->addAction(tr("&Select All"));
+ menuBar()->addMenu(actionMenu);
+
+ connect(fillAction, SIGNAL(triggered()), this, SLOT(fillSelection()));
+ connect(clearAction, SIGNAL(triggered()), this, SLOT(clearSelection()));
+ connect(selectAllAction, SIGNAL(triggered()), this, SLOT(selectAll()));
+
+ selectionModel = table->selectionModel();
+
+ statusBar();
+ setCentralWidget(table);
+}
+
+void MainWindow::fillSelection()
+{
+//! [0]
+ QModelIndexList indexes = selectionModel->selectedIndexes();
+ QModelIndex index;
+
+ foreach(index, indexes) {
+ QString text = QString("(%1,%2)").arg(index.row()).arg(index.column());
+ model->setData(index, text);
+ }
+//! [0]
+}
+
+void MainWindow::clearSelection()
+{
+ QModelIndexList indexes = selectionModel->selectedIndexes();
+ QModelIndex index;
+
+ foreach(index, indexes)
+ model->setData(index, "");
+}
+
+void MainWindow::selectAll()
+{
+//! [1]
+ QModelIndex parent = QModelIndex();
+//! [1] //! [2]
+ QModelIndex topLeft = model->index(0, 0, parent);
+ QModelIndex bottomRight = model->index(model->rowCount(parent)-1,
+ model->columnCount(parent)-1, parent);
+//! [2]
+
+//! [3]
+ QItemSelection selection(topLeft, bottomRight);
+ selectionModel->select(selection, QItemSelectionModel::Select);
+//! [3]
+}
diff --git a/src/widgets/doc/snippets/reading-selections/window.h b/src/widgets/doc/snippets/reading-selections/window.h
new file mode 100644
index 0000000000..6d2537c22d
--- /dev/null
+++ b/src/widgets/doc/snippets/reading-selections/window.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 WINDOW_H
+#define WINDOW_H
+
+#include <QItemSelection>
+#include <QMainWindow>
+#include <QAbstractItemModel>
+#include <QWidget>
+#include <QTableView>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void fillSelection();
+ void clearSelection();
+ void selectAll();
+
+private:
+ QAbstractItemModel *model;
+ QItemSelectionModel *selectionModel;
+ QTableView *table;
+};
+
+#endif
diff --git a/doc/src/snippets/shareddirmodel/main.cpp b/src/widgets/doc/snippets/shareddirmodel/main.cpp
index 78d439b752..78d439b752 100644
--- a/doc/src/snippets/shareddirmodel/main.cpp
+++ b/src/widgets/doc/snippets/shareddirmodel/main.cpp
diff --git a/src/widgets/doc/snippets/sharedtablemodel/main.cpp b/src/widgets/doc/snippets/sharedtablemodel/main.cpp
new file mode 100644
index 0000000000..f031a02aca
--- /dev/null
+++ b/src/widgets/doc/snippets/sharedtablemodel/main.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how a single model can be shared between
+ multiple views.
+*/
+
+#include <QApplication>
+#include <QHeaderView>
+#include <QItemSelectionModel>
+#include <QTableView>
+
+#include "model.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ TableModel *model = new TableModel(4, 2, &app);
+
+//! [0]
+ QTableView *firstTableView = new QTableView;
+ QTableView *secondTableView = new QTableView;
+//! [0]
+
+//! [1]
+ firstTableView->setModel(model);
+ secondTableView->setModel(model);
+//! [1]
+
+ firstTableView->horizontalHeader()->setModel(model);
+
+ for (int row = 0; row < 4; ++row) {
+ for (int column = 0; column < 2; ++column) {
+ QModelIndex index = model->index(row, column, QModelIndex());
+ model->setData(index, QVariant(QString("(%1, %2)").arg(row).arg(column)));
+ }
+ }
+
+//! [2]
+ secondTableView->setSelectionModel(firstTableView->selectionModel());
+//! [2]
+
+ firstTableView->setWindowTitle("First table view");
+ secondTableView->setWindowTitle("Second table view");
+ firstTableView->show();
+ secondTableView->show();
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/sharedtablemodel/model.cpp b/src/widgets/doc/snippets/sharedtablemodel/model.cpp
new file mode 100644
index 0000000000..ec56f84adb
--- /dev/null
+++ b/src/widgets/doc/snippets/sharedtablemodel/model.cpp
@@ -0,0 +1,236 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/src/widgets/doc/snippets/sharedtablemodel/model.h b/src/widgets/doc/snippets/sharedtablemodel/model.h
new file mode 100644
index 0000000000..ef63e45ce0
--- /dev/null
+++ b/src/widgets/doc/snippets/sharedtablemodel/model.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/sharedtablemodel/sharedtablemodel.pro b/src/widgets/doc/snippets/sharedtablemodel/sharedtablemodel.pro
new file mode 100644
index 0000000000..10671e6e25
--- /dev/null
+++ b/src/widgets/doc/snippets/sharedtablemodel/sharedtablemodel.pro
@@ -0,0 +1,2 @@
+HEADERS += model.h
+SOURCES += main.cpp model.cpp
diff --git a/src/widgets/doc/snippets/simplemodel-use/main.cpp b/src/widgets/doc/snippets/simplemodel-use/main.cpp
new file mode 100644
index 0000000000..d8188b14e6
--- /dev/null
+++ b/src/widgets/doc/snippets/simplemodel-use/main.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example of how to access items from an existing model.
+*/
+
+#include <QtGui>
+
+/*!
+ Create a default directory model and, using the index-based interface to
+ the model and some QLabel widgets, populate the window's layout with the
+ names of objects in the directory.
+
+ Note that we only want to read the filenames in the highest level of the
+ directory, so we supply a default (invalid) QModelIndex to the model in
+ order to indicate that we want top-level items.
+*/
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QWidget *window = new QWidget;
+ QVBoxLayout *layout = new QVBoxLayout(window);
+ QLabel *title = new QLabel("Some items from the directory model", window);
+ title->setBackgroundRole(QPalette::Base);
+ title->setMargin(8);
+ layout->addWidget(title);
+
+//! [0]
+ QFileSystemModel *model = new QFileSystemModel;
+ QModelIndex parentIndex = model->index(QDir::currentPath());
+ int numRows = model->rowCount(parentIndex);
+//! [0]
+
+//! [1]
+ for (int row = 0; row < numRows; ++row) {
+ QModelIndex index = model->index(row, 0, parentIndex);
+//! [1]
+
+//! [2]
+ QString text = model->data(index, Qt::DisplayRole).toString();
+ // Display the text in a widget.
+//! [2]
+
+ QLabel *label = new QLabel(text, window);
+ layout->addWidget(label);
+//! [3]
+ }
+//! [3]
+
+ window->setWindowTitle("A simple model example");
+ window->show();
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/simplemodel-use/simplemodel-use.pro b/src/widgets/doc/snippets/simplemodel-use/simplemodel-use.pro
new file mode 100644
index 0000000000..28dcadcbfa
--- /dev/null
+++ b/src/widgets/doc/snippets/simplemodel-use/simplemodel-use.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/doc/src/snippets/splitter/splitter.cpp b/src/widgets/doc/snippets/splitter/splitter.cpp
index 3908f1b0e3..3908f1b0e3 100644
--- a/doc/src/snippets/splitter/splitter.cpp
+++ b/src/widgets/doc/snippets/splitter/splitter.cpp
diff --git a/doc/src/snippets/splitterhandle/splitter.cpp b/src/widgets/doc/snippets/splitterhandle/splitter.cpp
index b8b729bb91..b8b729bb91 100644
--- a/doc/src/snippets/splitterhandle/splitter.cpp
+++ b/src/widgets/doc/snippets/splitterhandle/splitter.cpp
diff --git a/doc/src/snippets/splitterhandle/splitter.h b/src/widgets/doc/snippets/splitterhandle/splitter.h
index ba310b9e8d..ba310b9e8d 100644
--- a/doc/src/snippets/splitterhandle/splitter.h
+++ b/src/widgets/doc/snippets/splitterhandle/splitter.h
diff --git a/src/widgets/doc/snippets/stringlistmodel/main.cpp b/src/widgets/doc/snippets/stringlistmodel/main.cpp
new file mode 100644
index 0000000000..d4f0efdc22
--- /dev/null
+++ b/src/widgets/doc/snippets/stringlistmodel/main.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*!
+ The main function for the string list model example. This creates and
+ populates a model with values from a string list then displays the
+ contents of the model using a QListView widget.
+*/
+
+#include <QAbstractItemModel>
+#include <QApplication>
+#include <QListView>
+
+#include "model.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+// Unindented for quoting purposes:
+//! [1]
+QStringList numbers;
+numbers << "One" << "Two" << "Three" << "Four" << "Five";
+
+QAbstractItemModel *model = new StringListModel(numbers);
+//! [0] //! [1] //! [2] //! [3]
+QListView *view = new QListView;
+//! [2]
+view->setWindowTitle("View onto a string list model");
+//! [4]
+view->setModel(model);
+//! [3] //! [4]
+
+ model->insertRows(5, 7, QModelIndex());
+
+ for (int row = 5; row < 12; ++row) {
+ QModelIndex index = model->index(row, 0, QModelIndex());
+ model->setData(index, QString::number(row+1));
+ }
+
+//! [5]
+ view->show();
+ return app.exec();
+}
+//! [5]
diff --git a/src/widgets/doc/snippets/stringlistmodel/model.cpp b/src/widgets/doc/snippets/stringlistmodel/model.cpp
new file mode 100644
index 0000000000..6795345d36
--- /dev/null
+++ b/src/widgets/doc/snippets/stringlistmodel/model.cpp
@@ -0,0 +1,211 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QStringList as its data source.
+*/
+
+#include "model.h"
+
+/*!
+ Returns the number of items in the string list as the number of rows
+ in the model.
+*/
+
+//! [0]
+int StringListModel::rowCount(const QModelIndex &parent) const
+{
+ return stringList.count();
+}
+//! [0]
+
+
+#ifdef 0
+// This represents a read-only version of data(), an early stage in the
+// development of the example leading to an editable StringListModel.
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned.
+*/
+
+//! [1-data-read-only]
+QVariant StringListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() >= stringList.size())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return stringList.at(index.row());
+ else
+ return QVariant();
+}
+//! [1-data-read-only]
+#endif
+
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned.
+*/
+
+//! [1]
+QVariant StringListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() >= stringList.size())
+ return QVariant();
+
+ if (role == Qt::DisplayRole || role == Qt::EditRole)
+ return stringList.at(index.row());
+ else
+ return QVariant();
+}
+//! [1]
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+//! [2]
+QVariant StringListModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+//! [2]
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+//! [3]
+Qt::ItemFlags StringListModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
+}
+//! [3]
+
+/*!
+ Changes an item in the string list, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The index corresponds to an item to be shown in a view.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+//! [4]
+bool StringListModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (index.isValid() && role == Qt::EditRole) {
+
+ stringList.replace(index.row(), value.toString());
+ emit dataChanged(index, index);
+ return true;
+ }
+//! [4] //! [5]
+ return false;
+}
+//! [5]
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+//! [6]
+bool StringListModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ beginInsertRows(QModelIndex(), position, position+rows-1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.insert(position, "");
+ }
+
+ endInsertRows();
+ return true;
+//! [6] //! [7]
+}
+//! [7]
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+//! [8]
+bool StringListModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(QModelIndex(), position, position+rows-1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+//! [8] //! [9]
+}
+//! [9]
diff --git a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp b/src/widgets/doc/snippets/stringlistmodel/model.h
index e73ee2ed0a..1dceccb8a8 100644
--- a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp
+++ b/src/widgets/doc/snippets/stringlistmodel/model.h
@@ -38,50 +38,45 @@
**
****************************************************************************/
+#ifndef MODEL_H
+#define MODEL_H
-void wrapInFunction()
-{
-
-//! [0]
-QTransportAuth::Data *conData;
-QTransportAuth *a = QTransportAuth::getInstance();
+#include <QAbstractListModel>
+#include <QObject>
+#include <QStringList>
-conData = a->connectTransport(
- QTransportAuth::Trusted | QTransportAuth::UnixStreamSock,
- socketDescriptor );
//! [0]
+class StringListModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ StringListModel(const QStringList &strings, QObject *parent = 0)
+ : QAbstractListModel(parent), stringList(strings) {}
-//! [1]
-// mySocket can be any QIODevice subclass
-AuthDevice *ad = a->recvBuf( d, mySocket );
-
-// proxy in the auth device where the socket would have gone
-connect( ad, SIGNAL(readyRead()), this, SLOT(mySocketReadyRead()));
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+//! [0] //! [1]
+ int role = Qt::DisplayRole) const;
//! [1]
-
//! [2]
-AuthDevice *ad = a->authBuf( d, mySocket );
-
-ad->write( someData );
-//! [2]
-
-
-//! [3]
-policyCheck( QTransportAuth::Data &, const QString & )
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+//! [2] //! [3]
+ int role = Qt::EditRole);
//! [3]
-
//! [4]
-QTransportAuth::Result r = d.status & QTransportAuth::ErrMask;
-qWarning( "error: %s", QTransportAuth::errorStrings[r] );
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
//! [4]
-
//! [5]
-MD5(K XOR opad, MD5(K XOR ipad, text))
+private:
+ QStringList stringList;
+};
//! [5]
-}
-
+#endif
diff --git a/src/widgets/doc/snippets/stringlistmodel/stringlistmodel.pro b/src/widgets/doc/snippets/stringlistmodel/stringlistmodel.pro
new file mode 100644
index 0000000000..b1126bfe73
--- /dev/null
+++ b/src/widgets/doc/snippets/stringlistmodel/stringlistmodel.pro
@@ -0,0 +1,3 @@
+HEADERS = model.h
+SOURCES = main.cpp \
+ model.cpp
diff --git a/doc/src/snippets/styles/styles.cpp b/src/widgets/doc/snippets/styles/styles.cpp
index 1109669bcb..1109669bcb 100644
--- a/doc/src/snippets/styles/styles.cpp
+++ b/src/widgets/doc/snippets/styles/styles.cpp
diff --git a/doc/src/snippets/stylesheet/common-mistakes.cpp b/src/widgets/doc/snippets/stylesheet/common-mistakes.cpp
index d4552fcf1d..d4552fcf1d 100644
--- a/doc/src/snippets/stylesheet/common-mistakes.cpp
+++ b/src/widgets/doc/snippets/stylesheet/common-mistakes.cpp
diff --git a/doc/src/snippets/textdocument-imagedrop/textedit.cpp b/src/widgets/doc/snippets/textdocument-imagedrop/textedit.cpp
index fbb6f73ddc..fbb6f73ddc 100644
--- a/doc/src/snippets/textdocument-imagedrop/textedit.cpp
+++ b/src/widgets/doc/snippets/textdocument-imagedrop/textedit.cpp
diff --git a/doc/src/snippets/timeline/main.cpp b/src/widgets/doc/snippets/timeline/main.cpp
index f4be7f3c5b..f4be7f3c5b 100644
--- a/doc/src/snippets/timeline/main.cpp
+++ b/src/widgets/doc/snippets/timeline/main.cpp
diff --git a/src/widgets/doc/snippets/updating-selections/main.cpp b/src/widgets/doc/snippets/updating-selections/main.cpp
new file mode 100644
index 0000000000..3356ffc8ab
--- /dev/null
+++ b/src/widgets/doc/snippets/updating-selections/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how selections can be used directly on a model.
+ It shows the result of some selections made using a table view.
+*/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QMainWindow *window = new MainWindow;
+ window->show();
+ window->resize(640, 480);
+ return app.exec();
+}
diff --git a/src/widgets/doc/snippets/updating-selections/model.cpp b/src/widgets/doc/snippets/updating-selections/model.cpp
new file mode 100644
index 0000000000..ec56f84adb
--- /dev/null
+++ b/src/widgets/doc/snippets/updating-selections/model.cpp
@@ -0,0 +1,236 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/src/widgets/doc/snippets/updating-selections/model.h b/src/widgets/doc/snippets/updating-selections/model.h
new file mode 100644
index 0000000000..ef63e45ce0
--- /dev/null
+++ b/src/widgets/doc/snippets/updating-selections/model.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/src/widgets/doc/snippets/updating-selections/updating-selections.pro b/src/widgets/doc/snippets/updating-selections/updating-selections.pro
new file mode 100644
index 0000000000..91ebd3e84f
--- /dev/null
+++ b/src/widgets/doc/snippets/updating-selections/updating-selections.pro
@@ -0,0 +1,2 @@
+HEADERS += model.h window.h
+SOURCES += main.cpp model.cpp window.cpp
diff --git a/src/widgets/doc/snippets/updating-selections/window.cpp b/src/widgets/doc/snippets/updating-selections/window.cpp
new file mode 100644
index 0000000000..eaa37b8c87
--- /dev/null
+++ b/src/widgets/doc/snippets/updating-selections/window.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*
+ window.cpp
+
+ A minimal subclass of QTableView with slots to allow the selection model
+ to be monitored.
+*/
+
+#include <QAbstractItemModel>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QStatusBar>
+
+#include "model.h"
+#include "window.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle("Selected items in a table model");
+
+ model = new TableModel(8, 4, this);
+
+ table = new QTableView(this);
+ table->setModel(model);
+
+ selectionModel = table->selectionModel();
+ connect(selectionModel,
+ SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
+ this, SLOT(updateSelection(const QItemSelection &, const QItemSelection &)));
+ connect(selectionModel,
+ SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
+
+ statusBar();
+ setCentralWidget(table);
+}
+
+//! [0]
+void MainWindow::updateSelection(const QItemSelection &selected,
+ const QItemSelection &deselected)
+{
+ QModelIndex index;
+ QModelIndexList items = selected.indexes();
+
+ foreach (index, items) {
+ QString text = QString("(%1,%2)").arg(index.row()).arg(index.column());
+ model->setData(index, text);
+//! [0] //! [1]
+ }
+//! [1]
+
+//! [2]
+ items = deselected.indexes();
+
+ foreach (index, items)
+ model->setData(index, "");
+}
+//! [2]
+
+//! [3]
+void MainWindow::changeCurrent(const QModelIndex &current,
+ const QModelIndex &previous)
+{
+ statusBar()->showMessage(
+ tr("Moved from (%1,%2) to (%3,%4)")
+ .arg(previous.row()).arg(previous.column())
+ .arg(current.row()).arg(current.column()));
+}
+//! [3]
diff --git a/src/widgets/doc/snippets/updating-selections/window.h b/src/widgets/doc/snippets/updating-selections/window.h
new file mode 100644
index 0000000000..0d87ced010
--- /dev/null
+++ b/src/widgets/doc/snippets/updating-selections/window.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation 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 WINDOW_H
+#define WINDOW_H
+
+#include <QItemSelection>
+#include <QMainWindow>
+#include <QModelIndex>
+#include <QWidget>
+#include <QTableView>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void updateSelection(const QItemSelection &selected,
+ const QItemSelection &deselected);
+ void changeCurrent(const QModelIndex &current, const QModelIndex &previous);
+
+private:
+ QAbstractItemModel *model;
+ QItemSelectionModel *selectionModel;
+ QTableView *table;
+};
+
+#endif
diff --git a/doc/src/snippets/whatsthis/whatsthis.cpp b/src/widgets/doc/snippets/whatsthis/whatsthis.cpp
index 3d3f65d317..3d3f65d317 100644
--- a/doc/src/snippets/whatsthis/whatsthis.cpp
+++ b/src/widgets/doc/snippets/whatsthis/whatsthis.cpp
diff --git a/doc/src/snippets/widget-mask/main.cpp b/src/widgets/doc/snippets/widget-mask/main.cpp
index 18653deb4c..18653deb4c 100644
--- a/doc/src/snippets/widget-mask/main.cpp
+++ b/src/widgets/doc/snippets/widget-mask/main.cpp
diff --git a/doc/src/snippets/widgetdelegate.cpp b/src/widgets/doc/snippets/widgetdelegate.cpp
index 4d2a6559a5..4d2a6559a5 100644
--- a/doc/src/snippets/widgetdelegate.cpp
+++ b/src/widgets/doc/snippets/widgetdelegate.cpp
diff --git a/doc/src/snippets/widgets-tutorial/template.cpp b/src/widgets/doc/snippets/widgets-tutorial/template.cpp
index 187952d44d..187952d44d 100644
--- a/doc/src/snippets/widgets-tutorial/template.cpp
+++ b/src/widgets/doc/snippets/widgets-tutorial/template.cpp
diff --git a/doc/src/widgets/addressbook-fr.qdoc b/src/widgets/doc/src/addressbook-fr.qdoc
index edd53239d0..edd53239d0 100644
--- a/doc/src/widgets/addressbook-fr.qdoc
+++ b/src/widgets/doc/src/addressbook-fr.qdoc
diff --git a/doc/src/widgets/addressbook.qdoc b/src/widgets/doc/src/addressbook.qdoc
index 27bdb0fac4..27bdb0fac4 100644
--- a/doc/src/widgets/addressbook.qdoc
+++ b/src/widgets/doc/src/addressbook.qdoc
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
new file mode 100644
index 0000000000..0e48efbff8
--- /dev/null
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -0,0 +1,2339 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group model-view
+ \title Model/View Classes
+*/
+
+/*!
+ \page model-view-programming.html
+ \ingroup qt-basic-concepts
+
+ \title Model/View Programming
+ \brief A guide to Qt's extensible model/view architecture.
+
+ \section1 Introduction to Model/View Programming
+
+ Qt 4 introduced a new set of item view classes that use a model/view
+ architecture to manage the relationship between data and the way it
+ is presented to the user. The separation of functionality introduced by
+ this architecture gives developers greater flexibility to customize the
+ presentation of items, and provides a standard model interface to allow
+ a wide range of data sources to be used with existing item views.
+ In this document, we give a brief introduction to the model/view paradigm,
+ outline the concepts involved, and describe the architecture of the item
+ view system. Each of the components in the architecture is explained,
+ and examples are given that show how to use the classes provided.
+
+ \section2 The model/view architecture
+
+ Model-View-Controller (MVC) is a design pattern originating from
+ Smalltalk that is often used when building user interfaces.
+ In \l{Design Patterns}, Gamma et al. write:
+
+ \quotation
+ MVC consists of three kinds of objects. The Model is the application
+ object, the View is its screen presentation, and the Controller defines
+ the way the user interface reacts to user input. Before MVC, user
+ interface designs tended to lump these objects together. MVC decouples
+ them to increase flexibility and reuse.
+ \endquotation
+
+ If the view and the controller objects are combined, the result is
+ the model/view architecture. This still separates the way that data
+ is stored from the way that it is presented to the user, but provides
+ a simpler framework based on the same principles. This separation
+ makes it possible to display the same data in several different views,
+ and to implement new types of views, without changing the underlying
+ data structures.
+ To allow flexible handling of user input, we introduce the concept of
+ the \e delegate. The advantage of having a delegate in this framework
+ is that it allows the way items of data are rendered and edited to be
+ customized.
+
+ \table
+ \row \li \inlineimage modelview-overview.png
+ \li \b{The model/view architecture}
+
+ The model communicates with a source of data, providing an \e interface
+ for the other components in the architecture. The nature of the
+ communication depends on the type of data source, and the way the model
+ is implemented.
+
+ The view obtains \e{model indexes} from the model; these are references
+ to items of data. By supplying model indexes to the model, the view can
+ retrieve items of data from the data source.
+
+ In standard views, a \e delegate renders the items of data. When an item
+ is edited, the delegate communicates with the model directly using
+ model indexes.
+ \endtable
+
+ Generally, the model/view classes can be separated into the three groups
+ described above: models, views, and delegates. Each of these components
+ is defined by \e abstract classes that provide common interfaces and,
+ in some cases, default implementations of features.
+ Abstract classes are meant to be subclassed in order to provide the full
+ set of functionality expected by other components; this also allows
+ specialized components to be written.
+
+ Models, views, and delegates communicate with each other using \e{signals
+ and slots}:
+
+ \list
+ \li Signals from the model inform the view about changes to the data
+ held by the data source.
+ \li Signals from the view provide information about the user's interaction
+ with the items being displayed.
+ \li Signals from the delegate are used during editing to tell the
+ model and view about the state of the editor.
+ \endlist
+
+ \section3 Models
+
+ All item models are based on the QAbstractItemModel class. This class
+ defines an interface that is used by views and delegates to access data.
+ The data itself does not have to be stored in the model; it can be held
+ in a data structure or repository provided by a separate class, a file,
+ a database, or some other application component.
+
+ The basic concepts surrounding models are presented in the section
+ on \l{Model Classes}.
+
+ QAbstractItemModel
+ provides an interface to data that is flexible enough to handle views
+ that represent data in the form of tables, lists, and trees. However,
+ when implementing new models for list and table-like data structures,
+ the QAbstractListModel and QAbstractTableModel classes are better
+ starting points because they provide appropriate default implementations
+ of common functions. Each of these classes can be subclassed to provide
+ models that support specialized kinds of lists and tables.
+
+ The process of subclassing models is discussed in the section on
+ \l{Creating New Models}.
+
+ Qt provides some ready-made models that can be used to handle items of
+ data:
+
+ \list
+ \li QStringListModel is used to store a simple list of QString items.
+ \li QStandardItemModel manages more complex tree structures of items, each
+ of which can contain arbitrary data.
+ \li QFileSystemModel provides information about files and directories in the
+ local filing system.
+ \li QSqlQueryModel, QSqlTableModel, and QSqlRelationalTableModel are used
+ to access databases using model/view conventions.
+ \endlist
+
+ If these standard models do not meet your requirements, you can subclass
+ QAbstractItemModel, QAbstractListModel, or QAbstractTableModel to create
+ your own custom models.
+
+ \section3 Views
+
+ Complete implementations are provided for different kinds of
+ views: QListView displays a list of items, QTableView displays data
+ from a model in a table, and QTreeView shows model items of data in a
+ hierarchical list. Each of these classes is based on the
+ QAbstractItemView abstract base class. Although these classes are
+ ready-to-use implementations, they can also be subclassed to provide
+ customized views.
+
+ The available views are examined in the section on \l{View Classes}.
+
+ \section3 Delegates
+
+ QAbstractItemDelegate is the abstract base class for delegates in the
+ model/view framework. Since Qt 4.4, the default delegate implementation is
+ provided by QStyledItemDelegate, and this is used as the default delegate
+ by Qt's standard views. However, QStyledItemDelegate and QItemDelegate are
+ independent alternatives to painting and providing editors for items in
+ views. The difference between them is that QStyledItemDelegate uses the
+ current style to paint its items. We therefore recommend using
+ QStyledItemDelegate as the base class when implementing custom delegates or
+ when working with Qt style sheets.
+
+ Delegates are described in the section on \l{Delegate Classes}.
+
+ \section3 Sorting
+
+ There are two ways of approaching sorting in the model/view
+ architecture; which approach to choose depends on your underlying
+ model.
+
+ If your model is sortable, i.e, if it reimplements the
+ QAbstractItemModel::sort() function, both QTableView and QTreeView
+ provide an API that allows you to sort your model data
+ programmatically. In addition, you can enable interactive sorting
+ (i.e. allowing the users to sort the data by clicking the view's
+ headers), by connecting the QHeaderView::sortIndicatorChanged() signal
+ to the QTableView::sortByColumn() slot or the
+ QTreeView::sortByColumn() slot, respectively.
+
+ The alternative approach, if your model do not have the required
+ interface or if you want to use a list view to present your data,
+ is to use a proxy model to transform the structure of your model
+ before presenting the data in the view. This is covered in detail
+ in the section on \l {Proxy Models}.
+
+ \section3 Convenience classes
+
+ A number of \e convenience classes are derived from the standard view
+ classes for the benefit of applications that rely on Qt's item-based
+ item view and table classes. They are not intended to be subclassed,
+ but simply exist to provide a familiar interface to the equivalent classes
+ in Qt 3.
+ Examples of such classes include \l QListWidget, \l QTreeWidget, and
+ \l QTableWidget; these provide similar behavior to the \c QListBox,
+ \c QListView, and \c QTable classes in Qt 3.
+
+ These classes are less flexible than the view classes, and cannot be
+ used with arbitrary models. We recommend that you use a model/view
+ approach to handling data in item views unless you strongly need an
+ item-based set of classes.
+
+ If you wish to take advantage of the features provided by the model/view
+ approach while still using an item-based interface, consider using view
+ classes, such as QListView, QTableView, and QTreeView with
+ QStandardItemModel.
+
+ \section1 Using models and views
+
+ The following sections explain how to use the model/view pattern
+ in Qt. Each section includes an an example and is followed by a
+ section showing how to create new components.
+
+ \section2 Two models included in Qt
+
+ Two of the standard models provided by Qt are QStandardItemModel and
+ QFileSystemModel. QStandardItemModel is a multi-purpose model that can be
+ used to represent various different data structures needed by list, table,
+ and tree views. This model also holds the items of data.
+ QFileSystemModel is a model that maintains information about the contents
+ of a directory. As a result, it does not hold any items of data itself, but
+ simply represents files and directories on the local filing system.
+
+ QFileSystemModel provides a ready-to-use model to experiment with, and can be
+ easily configured to use existing data. Using this model, we can show how
+ to set up a model for use with ready-made views, and explore how to
+ manipulate data using model indexes.
+
+ \section2 Using views with an existing model
+
+ The QListView and QTreeView classes are the most suitable views
+ to use with QFileSystemModel. The example presented below displays the
+ contents of a directory in a tree view next to the same information in
+ a list view. The views share the user's selection so that the selected
+ items are highlighted in both views.
+
+ \image shareddirmodel.png
+
+ We set up a QFileSystemModel so that it is ready for use, and create some
+ views to display the contents of a directory. This shows the simplest
+ way to use a model. The construction and use of the model is
+ performed from within a single \c main() function:
+
+ \snippet shareddirmodel/main.cpp 0
+
+ The model is set up to use data from a certain file system. The call to
+ \l{QFileSystemModel::}{setRootPath()} tell the model which drive on the
+ file system to expose to the views.
+
+ We create two views so that we can examine the items held in the model in two
+ different ways:
+
+ \snippet shareddirmodel/main.cpp 5
+
+ The views are constructed in the same way as other widgets. Setting up
+ a view to display the items in the model is simply a matter of calling its
+ \l{QAbstractItemView::setModel()}{setModel()} function with the directory
+ model as the argument. We filter the data supplied by the model by calling
+ the \l{QAbstractItemView::}{setRootIndex()} function on each view, passing
+ a suitable \e{model index} from the file system model for the current
+ directory.
+
+ The \c index() function used in this case is unique to QFileSystemModel; we
+ supply it with a directory and it returns a model index. Model indexes are
+ discussed in \l{Model Classes}.
+
+ The rest of the function just displays the views within a splitter
+ widget, and runs the application's event loop:
+
+ \snippet shareddirmodel/main.cpp 8
+
+ In the above example, we neglected to mention how to handle selections
+ of items. This subject is covered in more detail in the section about
+ \l{Handling Selections in Item Views}.
+
+ \section1 Model classes
+
+ Before examining how selections are handled, you may find it
+ useful to examine the concepts used in the model/view framework.
+
+ \section2 Basic concepts
+
+ In the model/view architecture, the model provides a standard interface
+ that views and delegates use to access data. In Qt, the standard
+ interface is defined by the QAbstractItemModel class. No matter how the
+ items of data are stored in any underlying data structure, all subclasses
+ of QAbstractItemModel represent the data as a hierarchical structure
+ containing tables of items. Views use this \e convention to access items
+ of data in the model, but they are not restricted in the way that they
+ present this information to the user.
+
+ \image modelview-models.png
+
+ Models also notify any attached views about changes to data through the
+ signals and slots mechanism.
+
+ This section describes some basic concepts that are central to the way
+ item of data are accessed by other components via a model class. More
+ advanced concepts are discussed in later sections.
+
+ \section3 Model indexes
+
+ To ensure that the representation of the data is kept separate from the
+ way it is accessed, the concept of a \e{model index} is introduced. Each
+ piece of information that can be obtained via a model is represented by
+ a model index. Views and delegates use these indexes to request items of
+ data to display.
+
+ As a result, only the model needs to know how to obtain data, and the type
+ of data managed by the model can be defined fairly generally. Model indexes
+ contain a pointer to the model that created them, and this prevents
+ confusion when working with more than one model.
+
+ \snippet code/doc_src_model-view-programming.cpp 0
+
+ Model indexes provide \e temporary references to pieces of information, and
+ can be used to retrieve or modify data via the model. Since models may
+ reorganize their internal structures from time to time, model indexes may
+ become invalid, and \e{should not be stored}. If a long-term reference to a
+ piece of information is required, a \e{persistent model index} must be
+ created. This provides a reference to the information that the model keeps
+ up-to-date. Temporary model indexes are provided by the QModelIndex class,
+ and persistent model indexes are provided by the QPersistentModelIndex
+ class.
+
+ To obtain a model index that corresponds to an item of data, three
+ properties must be specified to the model: a row number, a column number,
+ and the model index of a parent item. The following sections describe
+ and explain these properties in detail.
+
+ \section3 Rows and columns
+
+ In its most basic form, a model can be accessed as a simple table in which
+ items are located by their row and column numbers. \e{This does not mean
+ that the underlying pieces of data are stored in an array structure}; the
+ use of row and column numbers is only a convention to allow components to
+ communicate with each other. We can retrieve information about any given
+ item by specifying its row and column numbers to the model, and we receive
+ an index that represents the item:
+
+ \snippet code/doc_src_model-view-programming.cpp 1
+
+ Models that provide interfaces to simple, single level data structures like
+ lists and tables do not need any other information to be provided but, as
+ the above code indicates, we need to supply more information when obtaining
+ a model index.
+
+ \table
+ \row \li \inlineimage modelview-tablemodel.png
+ \li \b{Rows and columns}
+
+ The diagram shows a representation of a basic table model in which each
+ item is located by a pair of row and column numbers. We obtain a model
+ index that refers to an item of data by passing the relevant row and
+ column numbers to the model.
+
+ \snippet code/doc_src_model-view-programming.cpp 2
+
+ Top level items in a model are always referenced by specifying
+ \c QModelIndex() as their parent item. This is discussed in the next
+ section.
+ \endtable
+
+ \section3 Parents of items
+
+ The table-like interface to item data provided by models is ideal when
+ using data in a table or list view; the row and column number system maps
+ exactly to the way the views display items. However, structures such as
+ tree views require the model to expose a more flexible interface to the
+ items within. As a result, each item can also be the parent of another
+ table of items, in much the same way that a top-level item in a tree view
+ can contain another list of items.
+
+ When requesting an index for a model item, we must provide some information
+ about the item's parent. Outside the model, the only way to refer to an
+ item is through a model index, so a parent model index must also be given:
+
+ \snippet code/doc_src_model-view-programming.cpp 3
+
+ \table
+ \row \li \inlineimage modelview-treemodel.png
+ \li \b{Parents, rows, and columns}
+
+ The diagram shows a representation of a tree model in which each item is
+ referred to by a parent, a row number, and a column number.
+
+ Items "A" and "C" are represented as top-level siblings in the model:
+
+ \snippet code/doc_src_model-view-programming.cpp 4
+
+ Item "A" has a number of children. A model index for item "B" is
+ obtained with the following code:
+
+ \snippet code/doc_src_model-view-programming.cpp 5
+ \endtable
+
+ \section3 Item roles
+
+ Items in a model can perform various \e roles for other components,
+ allowing different kinds of data to be supplied for different situations.
+ For example, Qt::DisplayRole is used to access a string that can be
+ displayed as text in a view. Typically, items contain data for a number of
+ different roles, and the standard roles are defined by Qt::ItemDataRole.
+
+ We can ask the model for the item's data by passing it the model index
+ corresponding to the item, and by specifying a role to obtain the type
+ of data we want:
+
+ \snippet code/doc_src_model-view-programming.cpp 6
+
+ \table
+ \row \li \inlineimage modelview-roles.png
+ \li \b{Item roles}
+
+ The role indicates to the model which type of data is being referred to.
+ Views can display the roles in different ways, so it is important to
+ supply appropriate information for each role.
+
+ The \l{Creating New Models} section covers some specific uses of roles in
+ more detail.
+ \endtable
+
+ Most common uses for item data are covered by the standard roles defined in
+ Qt::ItemDataRole. By supplying appropriate item data for each role, models
+ can provide hints to views and delegates about how items should be
+ presented to the user. Different kinds of views have the freedom to
+ interpret or ignore this information as required. It is also possible to
+ define additional roles for application-specific purposes.
+
+ \section3 Summary
+
+ \list
+ \li Model indexes give views and delegates information about the location
+ of items provided by models in a way that is independent of any
+ underlying data structures.
+ \li Items are referred to by their row and column numbers, and by the model
+ index of their parent items.
+ \li Model indexes are constructed by models at the request of other
+ components, such as views and delegates.
+ \li If a valid model index is specified for the parent item when an index is
+ requested using \l{QAbstractItemModel::index()}{index()}, the index
+ returned refers to an item beneath that parent item in the model.
+ The index obtained refers to a child of that item.
+ \li If an invalid model index is specified for the parent item when an index
+ is requested using \l{QAbstractItemModel::index()}{index()}, the index
+ returned refers to a top-level item in the model.
+ \li The \l{Qt::ItemDataRole}{role} distinguishes between the
+ different kinds of data associated with an item.
+ \endlist
+
+ \section2 Using model indexes
+
+ To demonstrate how data can be retrieved from a model, using model
+ indexes, we set up a QFileSystemModel without a view and display the
+ names of files and directories in a widget.
+ Although this does not show a normal way of using a model, it demonstrates
+ the conventions used by models when dealing with model indexes.
+
+ We construct a file system model in the following way:
+
+ \snippet simplemodel-use/main.cpp 0
+
+ In this case, we set up a default QFileSystemModel, obtain a parent index
+ using a specific implementation of \l{QFileSystemModel::}{index()}
+ provided by that model, and we count the number of rows in the model using
+ the \l{QFileSystemModel::}{rowCount()} function.
+
+ For simplicity, we are only interested in the items in the first column
+ of the model. We examine each row in turn, obtaining a model index for
+ the first item in each row, and read the data stored for that item
+ in the model.
+
+ \snippet simplemodel-use/main.cpp 1
+
+ To obtain a model index, we specify the row number, column number (zero
+ for the first column), and the appropriate model index for the parent
+ of all the items that we want.
+ The text stored in each item is retrieved using the model's
+ \l{QFileSystemModel::}{data()} function. We specify the model index and
+ the \l{Qt::ItemDataRole}{DisplayRole} to obtain data for the
+ item in the form of a string.
+
+ \snippet simplemodel-use/main.cpp 2
+ \codeline
+ \snippet simplemodel-use/main.cpp 3
+
+ The above example demonstrates the basic principles used to retrieve
+ data from a model:
+
+ \list
+ \li The dimensions of a model can be found using
+ \l{QAbstractItemModel::rowCount()}{rowCount()} and
+ \l{QAbstractItemModel::columnCount()}{columnCount()}.
+ These functions generally require a parent model index to be
+ specified.
+ \li Model indexes are used to access items in the model. The row, column,
+ and parent model index are needed to specify the item.
+ \li To access top-level items in a model, specify a null model index
+ as the parent index with \c QModelIndex().
+ \li Items contain data for different roles. To obtain the data for a
+ particular role, both the model index and the role must be supplied
+ to the model.
+ \endlist
+
+ \section2 Further reading
+
+ New models can be created by implementing the standard interface
+ provided by QAbstractItemModel. In the \l{Creating New Models}
+ section, we demonstrate this by creating a convenient ready-to-use
+ model for holding lists of strings.
+
+ \section1 View classes
+
+ \section2 Concepts
+
+ In the model/view architecture, the view obtains items of data from the
+ model and presents them to the user. The way that the data is
+ presented need not resemble the representation of the data provided by
+ the model, and may be \e{completely different} from the underlying data
+ structure used to store items of data.
+
+ The separation of content and presentation is achieved by the use of a
+ standard model interface provided by QAbstractItemModel, a standard view
+ interface provided by QAbstractItemView, and the use of model indexes
+ that represent items of data in a general way.
+ Views typically manage the overall layout of the data obtained from
+ models. They may render individual items of data themselves, or use
+ \l{Delegate Classes}{delegates} to handle both rendering and editing
+ features.
+
+ As well as presenting data, views handle navigation between items,
+ and some aspects of item selection. The views also implement basic
+ user interface features, such as context menus and drag and drop.
+ A view can provide default editing facilities for items, or it may
+ work with a \l{Delegate Classes}{delegate} to provide a custom
+ editor.
+
+ A view can be constructed without a model, but a model must be
+ provided before it can display useful information. Views keep track of
+ the items that the user has selected through the use of
+ \l{Handling Selections in Item Views}{selections} which can be maintained
+ separately for each view, or shared between multiple views.
+
+ Some views, such as QTableView and QTreeView, display headers as well
+ as items. These are also implemented by a view class, QHeaderView.
+ Headers usually access the same model as the view that contains them.
+ They retrieve data from the model using the
+ \l{QAbstractItemModel::headerData()} function, and usually display
+ header information in the form of a label. New headers can be
+ subclassed from the QHeaderView class to provide more specialized
+ labels for views.
+
+ \section2 Using an existing view
+
+ Qt provides three ready-to-use view classes that present data from
+ models in ways that are familiar to most users.
+ QListView can display items from a model as a simple list, or in the
+ form of a classic icon view. QTreeView displays items from a
+ model as a hierarchy of lists, allowing deeply nested structures to be
+ represented in a compact way. QTableView presents items from a model
+ in the form of a table, much like the layout of a spreadsheet
+ application.
+
+ \image standard-views.png
+
+ The default behavior of the standard views shown above should be
+ sufficient for most applications. They provide basic editing
+ facilities, and can be customized to suit the needs of more specialized
+ user interfaces.
+
+ \section3 Using a model
+
+ We take the string list model that \l{Creating New Models}{we created as
+ an example model}, set it up with some data, and construct a view to
+ display the contents of the model. This can all be performed within a
+ single function:
+
+ \snippet stringlistmodel/main.cpp 0
+
+ Note that the \c StringListModel is declared as a \l QAbstractItemModel.
+ This allows us to use the abstract interface to the model, and
+ ensures that the code still works, even if we replace the string list
+ model with a different model.
+
+ The list view provided by \l QListView is sufficient for presenting
+ the items in the string list model. We construct the view, and set up
+ the model using the following lines of code:
+
+ \snippet stringlistmodel/main.cpp 2
+ \snippet stringlistmodel/main.cpp 4
+
+ The view is shown in the normal way:
+
+ \snippet stringlistmodel/main.cpp 5
+
+ The view renders the contents of a model, accessing data via the model's
+ interface. When the user tries to edit an item, the view uses a default
+ delegate to provide an editor widget.
+
+ \image stringlistmodel.png
+
+ The above image shows how a QListView represents the data in the string
+ list model. Since the model is editable, the view automatically allows
+ each item in the list to be edited using the default delegate.
+
+ \section3 Using multiple views of a model
+
+ Providing multiple views onto the same model is simply a matter of
+ setting the same model for each view. In the following code we create
+ two table views, each using the same simple table model which we have
+ created for this example:
+
+ \snippet sharedtablemodel/main.cpp 0
+ \codeline
+ \snippet sharedtablemodel/main.cpp 1
+
+ The use of signals and slots in the model/view architecture means that
+ changes to the model can be propagated to all the attached views,
+ ensuring that we can always access the same data regardless of the
+ view being used.
+
+ \image sharedmodel-tableviews.png
+
+ The above image shows two different views onto the same model, each
+ containing a number of selected items. Although the data from the model
+ is shown consistently across view, each view maintains its own internal
+ selection model. This can be useful in certain situations but, for
+ many applications, a shared selection model is desirable.
+
+ \section2 Handling selections of items
+
+ The mechanism for handling selections of items within views is provided
+ by the \l QItemSelectionModel class. All of the standard views construct
+ their own selection models by default, and interact with them in the
+ normal way. The selection model being used by a view can be obtained
+ through the \l{QAbstractItemView::selectionModel()}{selectionModel()}
+ function, and a replacement selection model can be specified with
+ \l{QAbstractItemView::setSelectionModel()}{setSelectionModel()}.
+ The ability to control the selection model used by a view is useful
+ when we want to provide multiple consistent views onto the same model
+ data.
+
+ Generally, unless you are subclassing a model or view, you don't
+ need to manipulate the contents of selections directly. However,
+ the interface to the selection model can be accessed, if required,
+ and this is explored in \l{Handling Selections in Item Views}.
+
+ \section3 Sharing selections among views
+
+ Although it is convenient that the view classes provide their own
+ selection models by default, when we use more than one view onto the
+ same model it is often desirable that both the model's data and the
+ user's selection are shown consistently in all views.
+ Since the view classes allow their internal selection models to be
+ replaced, we can achieve a unified selection between views with the
+ following line:
+
+ \snippet sharedtablemodel/main.cpp 2
+
+ The second view is given the selection model for the first view.
+ Both views now operate on the same selection model, keeping both
+ the data and the selected items synchronized.
+
+ \image sharedselection-tableviews.png
+
+ In the example shown above, two views of the same type were used to
+ display the same model's data. However, if two different types of view
+ were used, the selected items may be represented very differently in
+ each view; for example, a contiguous selection in a table view can be
+ represented as a fragmented set of highlighted items in a tree view.
+
+ \section1 Delegate classes
+
+ \section2 Concepts
+
+ Unlike the Model-View-Controller pattern, the model/view design does not
+ include a completely separate component for managing interaction with
+ the user. Generally, the view is responsible for the presentation of
+ model data to the user, and for processing user input. To allow some
+ flexibility in the way this input is obtained, the interaction is
+ performed by delegates. These components provide input capabilities
+ and are also responsible for rendering individual items in some views.
+ The standard interface for controlling delegates is defined in the
+ \l QAbstractItemDelegate class.
+
+ Delegates are expected to be able to render their contents themselves
+ by implementing the \l{QItemDelegate::paint()}{paint()}
+ and \l{QItemDelegate::sizeHint()}{sizeHint()} functions.
+ However, simple widget-based delegates can subclass \l QItemDelegate
+ instead of \l QAbstractItemDelegate, and take advantage of the default
+ implementations of these functions.
+
+ Editors for delegates can be implemented either by using widgets to manage
+ the editing process or by handling events directly.
+ The first approach is covered later in this section, and it is also
+ shown in the \l{Spin Box Delegate Example}{Spin Box Delegate} example.
+
+ The \l{Pixelator Example}{Pixelator} example shows how to create a
+ custom delegate that performs specialized rendering for a table view.
+
+ \section2 Using an existing delegate
+
+ The standard views provided with Qt use instances of \l QItemDelegate
+ to provide editing facilities. This default implementation of the
+ delegate interface renders items in the usual style for each of the
+ standard views: \l QListView, \l QTableView, and \l QTreeView.
+
+ All the standard roles are handled by the default delegate used by
+ the standard views. The way these are interpreted is described in the
+ QItemDelegate documentation.
+
+ The delegate used by a view is returned by the
+ \l{QAbstractItemView::itemDelegate()}{itemDelegate()} function.
+ The \l{QAbstractItemView::setItemDelegate()}{setItemDelegate()} function
+ allows you to install a custom delegate for a standard view, and it is
+ necessary to use this function when setting the delegate for a custom
+ view.
+
+ \section2 A simple delegate
+
+ The delegate implemented here uses a \l QSpinBox to provide
+ editing facilities, and is mainly intended for use with models
+ that display integers. Although we set up a custom integer-based
+ table model for this purpose, we could easily have used \l
+ QStandardItemModel instead, since the custom delegate controls
+ data entry. We construct a table view to display the contents of
+ the model, and this will use the custom delegate for editing.
+
+ \image spinboxdelegate-example.png
+
+ We subclass the delegate from \l QItemDelegate because we do not want
+ to write custom display functions. However, we must still provide
+ functions to manage the editor widget:
+
+ \snippet itemviews/spinboxdelegate/delegate.h 0
+
+ Note that no editor widgets are set up when the delegate is
+ constructed. We only construct an editor widget when it is needed.
+
+ \section3 Providing an editor
+
+ In this example, when the table view needs to provide an editor, it
+ asks the delegate to provide an editor widget that is appropriate
+ for the item being modified. The
+ \l{QAbstractItemDelegate::createEditor()}{createEditor()} function is
+ supplied with everything that the delegate needs to be able to set up
+ a suitable widget:
+
+ \snippet itemviews/spinboxdelegate/delegate.cpp 1
+
+ Note that we do not need to keep a pointer to the editor widget because
+ the view takes responsibility for destroying it when it is no longer
+ needed.
+
+ We install the delegate's default event filter on the editor to ensure
+ that it provides the standard editing shortcuts that users expect.
+ Additional shortcuts can be added to the editor to allow more
+ sophisticated behavior; these are discussed in the section on
+ \l{#EditingHints}{Editing Hints}.
+
+ The view ensures that the editor's data and geometry are set
+ correctly by calling functions that we define later for these purposes.
+ We can create different editors depending on the model index supplied
+ by the view. For example, if we have a column of integers and a column
+ of strings we could return either a \c QSpinBox or a \c QLineEdit,
+ depending on which column is being edited.
+
+ The delegate must provide a function to copy model data into the
+ editor. In this example, we read the data stored in the
+ \l{Qt::ItemDataRole}{display role}, and set the value in the
+ spin box accordingly.
+
+ \snippet itemviews/spinboxdelegate/delegate.cpp 2
+
+ In this example, we know that the editor widget is a spin box, but we
+ could have provided different editors for different types of data in
+ the model, in which case we would need to cast the widget to the
+ appropriate type before accessing its member functions.
+
+ \section3 Submitting data to the model
+
+ When the user has finished editing the value in the spin box, the view
+ asks the delegate to store the edited value in the model by calling the
+ \l{QAbstractItemDelegate::setModelData()}{setModelData()} function.
+
+ \snippet itemviews/spinboxdelegate/delegate.cpp 3
+
+ Since the view manages the editor widgets for the delegate, we only
+ need to update the model with the contents of the editor supplied.
+ In this case, we ensure that the spin box is up-to-date, and update
+ the model with the value it contains using the index specified.
+
+ The standard \l QItemDelegate class informs the view when it has
+ finished editing by emitting the
+ \l{QAbstractItemDelegate::closeEditor()}{closeEditor()} signal.
+ The view ensures that the editor widget is closed and destroyed. In
+ this example, we only provide simple editing facilities, so we need
+ never emit this signal.
+
+ All the operations on data are performed through the interface
+ provided by \l QAbstractItemModel. This makes the delegate mostly
+ independent from the type of data it manipulates, but some
+ assumptions must be made in order to use certain types of
+ editor widgets. In this example, we have assumed that the model
+ always contains integer values, but we can still use this
+ delegate with different kinds of models because \l{QVariant}
+ provides sensible default values for unexpected data.
+
+ \section3 Updating the editor's geometry
+
+ It is the responsibility of the delegate to manage the editor's
+ geometry. The geometry must be set when the editor is created, and
+ when the item's size or position in the view is changed. Fortunately,
+ the view provides all the necessary geometry information inside a
+ \l{QStyleOptionViewItem}{view option} object.
+
+ \snippet itemviews/spinboxdelegate/delegate.cpp 4
+
+ In this case, we just use the geometry information provided by the
+ view option in the item rectangle. A delegate that renders items with
+ several elements would not use the item rectangle directly. It would
+ position the editor in relation to the other elements in the item.
+
+ \target EditingHints
+ \section3 Editing hints
+
+ After editing, delegates should provide hints to the other components
+ about the result of the editing process, and provide hints that will
+ assist any subsequent editing operations. This is achieved by
+ emitting the \l{QAbstractItemDelegate::closeEditor()}{closeEditor()}
+ signal with a suitable hint. This is taken care of by the default
+ QItemDelegate event filter which we installed on the spin box when
+ it was constructed.
+
+ The behavior of the spin box could be adjusted to make it more user
+ friendly. In the default event filter supplied by QItemDelegate, if
+ the user hits \key Return to confirm their choice in the spin box,
+ the delegate commits the value to the model and closes the spin box.
+ We can change this behavior by installing our own event filter on the
+ spin box, and provide editing hints that suit our needs; for example,
+ we might emit \l{QAbstractItemDelegate::closeEditor()}{closeEditor()}
+ with the \l{QAbstractItemDelegate::EndEditHint}{EditNextItem} hint to
+ automatically start editing the next item in the view.
+
+ Another approach that does not require the use of an event
+ filter is to provide our own editor widget, perhaps subclassing
+ QSpinBox for convenience. This alternative approach would give us
+ more control over how the editor widget behaves at the cost of
+ writing additional code. It is usually easier to install an event
+ filter in the delegate if you need to customize the behavior of
+ a standard Qt editor widget.
+
+ Delegates do not have to emit these hints, but those that do not will
+ be less integrated into applications, and will be less usable than
+ those that emit hints to support common editing actions.
+
+ \section1 Handling selections in item views
+
+ \section2 Concepts
+
+ The selection model used in the item view classes offers many improvements
+ over the selection model used in Qt 3. It provides a more general
+ description of selections based on the facilities of the model/view
+ architecture. Although the standard classes for manipulating selections are
+ sufficient for the item views provided, the selection model allows you to
+ create specialized selection models to suit the requirements for your own
+ item models and views.
+
+ Information about the items selected in a view is stored in an instance of
+ the \l QItemSelectionModel class. This maintains model indexes for items in
+ a single model, and is independent of any views. Since there can be many
+ views onto a model, it is possible to share selections between views,
+ allowing applications to show multiple views in a consistent way.
+
+ Selections are made up of \e{selection ranges}. These efficiently maintain
+ information about large selections of items by recording only the starting
+ and ending model indexes for each range of selected items. Non-contiguous
+ selections of items are constructed by using more than one selection range
+ to describe the selection.
+
+ Selections are applied to a collection of model indexes held by a selection
+ model. The most recent selection of items applied is known as the
+ \e{current selection}. The effects of this selection can be modified even
+ after its application through the use of certain types of selection
+ commands. These are discussed later in this section.
+
+ \section3 Current item and selected items
+
+ In a view, there is always a current item and a selected item - two
+ independent states. An item can be the current item and selected at the
+ same time. The view is responsible for ensuring that there is always a
+ current item as keyboard navigation, for example, requires a current item.
+
+ The table below highlights the differences between current item and
+ selected items.
+
+ \table
+ \header
+ \li Current Item
+ \li Selected Items
+
+ \row
+ \li There can only be one current item.
+ \li There can be multiple selected items.
+ \row
+ \li The current item will be changed with key navigation or mouse
+ button clicks.
+ \li The selected state of items is set or unset, depending on several
+ pre-defined modes - e.g., single selection, multiple selection,
+ etc. - when the user interacts with the items.
+ \row
+ \li The current item will be edited if the edit key, \uicontrol F2, is
+ pressed or the item is double-clicked (provided that editing is
+ enabled).
+ \li The current item can be used together with an anchor to specify a
+ range that should be selected or deselected (or a combination of
+ the two).
+ \row
+ \li The current item is indicated by the focus rectangle.
+ \li The selected items are indicated with the selection rectangle.
+ \endtable
+
+ When manipulating selections, it is often helpful to think of
+ \l QItemSelectionModel as a record of the selection state of all the items
+ in an item model. Once a selection model is set up, collections of items
+ can be selected, deselected, or their selection states can be toggled
+ without the need to know which items are already selected. The indexes of
+ all selected items can be retrieved at any time, and other components can
+ be informed of changes to the selection model via the signals and slots
+ mechanism.
+
+ \section2 Using a selection model
+
+ The standard view classes provide default selection models that can
+ be used in most applications. A selection model belonging to one view
+ can be obtained using the view's
+ \l{QAbstractItemView::selectionModel()}{selectionModel()} function,
+ and shared between many views with
+ \l{QAbstractItemView::setSelectionModel()}{setSelectionModel()},
+ so the construction of new selection models is generally not required.
+
+ A selection is created by specifying a model, and a pair of model
+ indexes to a \l QItemSelection. This uses the indexes to refer to items
+ in the given model, and interprets them as the top-left and bottom-right
+ items in a block of selected items.
+ To apply the selection to items in a model requires the selection to be
+ submitted to a selection model; this can be achieved in a number of ways,
+ each having a different effect on the selections already present in the
+ selection model.
+
+ \section3 Selecting items
+
+ To demonstrate some of the principal features of selections, we construct
+ an instance of a custom table model with 32 items in total, and open a
+ table view onto its data:
+
+ \snippet itemselection/main.cpp 0
+
+ The table view's default selection model is retrieved for later use.
+ We do not modify any items in the model, but instead select a few
+ items that the view will display at the top-left of the table. To do
+ this, we need to retrieve the model indexes corresponding to the
+ top-left and bottom-right items in the region to be selected:
+
+ \snippet itemselection/main.cpp 1
+
+ To select these items in the model, and see the corresponding change
+ in the table view, we need to construct a selection object then apply
+ it to the selection model:
+
+ \snippet itemselection/main.cpp 2
+
+ The selection is applied to the selection model using a command
+ defined by a combination of
+ \l{QItemSelectionModel::SelectionFlag}{selection flags}.
+ In this case, the flags used cause the items recorded in the
+ selection object to be included in the selection model, regardless
+ of their previous state. The resulting selection is shown by the view.
+
+ \image selected-items1.png
+
+ The selection of items can be modified using various operations that
+ are defined by the selection flags. The selection that results from
+ these operations may have a complex structure, but it is represented
+ efficiently by the selection model. The use of different selection
+ flags to manipulate the selected items is described when we examine
+ how to update a selection.
+
+ \section3 Reading the selection state
+
+ The model indexes stored in the selection model can be read using
+ the \l{QItemSelectionModel::selectedIndexes()}{selectedIndexes()}
+ function. This returns an unsorted list of model indexes that we can
+ iterate over as long as we know which model they are for:
+
+ \snippet reading-selections/window.cpp 0
+
+ The above code uses Qt's convenient \l{Container Classes}{foreach
+ keyword} to iterate over, and modify, the items corresponding to the
+ indexes returned by the selection model.
+
+ The selection model emits signals to indicate changes in the
+ selection. These notify other components about changes to both the
+ selection as a whole and the currently focused item in the item
+ model. We can connect the
+ \l{QItemSelectionModel::selectionChanged()}{selectionChanged()}
+ signal to a slot, and examine the items in the model that are selected or
+ deselected when the selection changes. The slot is called with two
+ \l{QItemSelection} objects: one contains a list of indexes that
+ correspond to newly selected items; the other contains indexes that
+ correspond to newly deselected items.
+
+ In the following code, we provide a slot that receives the
+ \l{QItemSelectionModel::selectionChanged()}{selectionChanged()}
+ signal, fills in the selected items with
+ a string, and clears the contents of the deselected items.
+
+ \snippet updating-selections/window.cpp 0
+ \snippet updating-selections/window.cpp 1
+ \codeline
+ \snippet updating-selections/window.cpp 2
+
+ We can keep track of the currently focused item by connecting the
+ \l{QItemSelectionModel::currentChanged()}{currentChanged()} signal
+ to a slot that is called with two model indexes. These correspond to
+ the previously focused item, and the currently focused item.
+
+ In the following code, we provide a slot that receives the
+ \l{QItemSelectionModel::currentChanged()}{currentChanged()} signal,
+ and uses the information provided to update the status bar of a
+ \l QMainWindow:
+
+ \snippet updating-selections/window.cpp 3
+
+ Monitoring selections made by the user is straightforward with these
+ signals, but we can also update the selection model directly.
+
+ \section3 Updating a selection
+
+ Selection commands are provided by a combination of selection flags,
+ defined by \l{QItemSelectionModel::SelectionFlag}.
+ Each selection flag tells the selection model how to update its
+ internal record of selected items when either of the
+ \l{QItemSelection::select()}{select()} functions are called.
+ The most commonly used flag is the
+ \l{QItemSelectionModel::SelectionFlag}{Select} flag
+ which instructs the selection model to record the specified items as
+ being selected. The
+ \l{QItemSelectionModel::SelectionFlag}{Toggle} flag causes the
+ selection model to invert the state of the specified items,
+ selecting any deselected items given, and deselecting any currently
+ selected items. The \l{QItemSelectionModel::SelectionFlag}{Deselect}
+ flag deselects all the specified items.
+
+ Individual items in the selection model are updated by creating a
+ selection of items, and applying them to the selection model. In the
+ following code, we apply a second selection of items to the table
+ model shown above, using the
+ \l{QItemSelectionModel::SelectionFlag}{Toggle} command to invert the
+ selection state of the items given.
+
+ \snippet itemselection/main.cpp 3
+
+ The results of this operation are displayed in the table view,
+ providing a convenient way of visualizing what we have achieved:
+
+ \image selected-items2.png
+
+ By default, the selection commands only operate on the individual
+ items specified by the model indexes. However, the flag used to
+ describe the selection command can be combined with additional flags
+ to change entire rows and columns. For example if you call
+ \l{QItemSelectionModel::select()}{select()} with only one index, but
+ with a command that is a combination of
+ \l{QItemSelectionModel::SelectionFlag}{Select} and
+ \l{QItemSelectionModel::SelectionFlag}{Rows}, the
+ entire row containing the item referred to is selected.
+ The following code demonstrates the use of the
+ \l{QItemSelectionModel::SelectionFlag}{Rows} and
+ \l{QItemSelectionModel::SelectionFlag}{Columns} flags:
+
+ \snippet itemselection/main.cpp 4
+
+ Although only four indexes are supplied to the selection model, the
+ use of the
+ \l{QItemSelectionModel::SelectionFlag}{Columns} and
+ \l{QItemSelectionModel::SelectionFlag}{Rows} selection flags means
+ that two columns and two rows are selected. The following image shows
+ the result of these two selections:
+
+ \image selected-items3.png
+
+ The commands performed on the example model have all involved
+ accumulating a selection of items in the model. It is also possible
+ to clear the selection, or to replace the current selection with
+ a new one.
+
+ To replace the current selection with a new selection, combine
+ the other selection flags with the
+ \l{QItemSelectionModel::SelectionFlag}{Current} flag. A command using
+ this flag instructs the selection model to replace its current collection
+ of model indexes with those specified in a call to
+ \l{QItemSelectionModel::select()}{select()}.
+ To clear all selections before you start adding new ones,
+ combine the other selection flags with the
+ \l{QItemSelectionModel::SelectionFlag}{Clear} flag. This
+ has the effect of resetting the selection model's collection of model
+ indexes.
+
+ \section3 Selecting all items in a model
+
+ To select all items in a model, it is necessary to create a
+ selection for each level of the model that covers all items in that
+ level. We do this by retrieving the indexes corresponding to the
+ top-left and bottom-right items with a given parent index:
+
+ \snippet reading-selections/window.cpp 2
+
+ A selection is constructed with these indexes and the model. The
+ corresponding items are then selected in the selection model:
+
+ \snippet reading-selections/window.cpp 3
+
+ This needs to be performed for all levels in the model.
+ For top-level items, we would define the parent index in the usual way:
+
+ \snippet reading-selections/window.cpp 1
+
+ For hierarchical models, the
+ \l{QAbstractItemModel::hasChildren()}{hasChildren()} function is used to
+ determine whether any given item is the parent of another level of
+ items.
+
+ \section1 Creating new models
+
+ The separation of functionality between the model/view components allows
+ models to be created that can take advantage of existing views. This
+ approach lets us present data from a variety of sources using standard
+ graphical user interface components, such as QListView, QTableView, and
+ QTreeView.
+
+ The QAbstractItemModel class provides an interface that is flexible
+ enough to support data sources that arrange information in hierarchical
+ structures, allowing for the possibility that data will be inserted,
+ removed, modified, or sorted in some way. It also provides support for
+ drag and drop operations.
+
+ The QAbstractListModel and QAbstractTableModel classes provide support
+ for interfaces to simpler non-hierarchical data structures, and are
+ easier to use as a starting point for simple list and table models.
+
+ In this section, we create a simple read-only model to explore
+ the basic principles of the model/view architecture. Later in this
+ section, we adapt this simple model so that items can be modified
+ by the user.
+
+ For an example of a more complex model, see the
+ \l{itemviews/simpletreemodel}{Simple Tree Model} example.
+
+ The requirements of QAbstractItemModel subclasses is described in more
+ detail in the \l{Model Subclassing Reference} document.
+
+ \section2 Designing a model
+
+ When creating a new model for an existing data structure, it is
+ important to consider which type of model should be used to
+ provide an interface onto the data. If the data structure can be
+ represented as a list or table of items, you can subclass
+ QAbstractListModel or QAbstractTableModel since these classes
+ provide suitable default implementations for many functions.
+
+ However, if the underlying data structure can only be represented
+ by a hierarchical tree structure, it is necessary to subclass
+ QAbstractItemModel. This approach is taken in the
+ \l{itemviews/simpletreemodel}{Simple Tree Model} example.
+
+ In this section, we implement a simple model based on a list of
+ strings, so the QAbstractListModel provides an ideal base class on
+ which to build.
+
+ Whatever form the underlying data structure takes, it is
+ usually a good idea to supplement the standard QAbstractItemModel API
+ in specialized models with one that allows more natural access to the
+ underlying data structure. This makes it easier to populate the model
+ with data, yet still enables other general model/view components to
+ interact with it using the standard API. The model described below
+ provides a custom constructor for just this purpose.
+
+ \section2 A read-only example model
+
+ The model implemented here is a simple, non-hierarchical, read-only data
+ model based on the standard QStringListModel class. It has a \l QStringList
+ as its internal data source, and implements only what is needed to make a
+ functioning model. To make the implementation easier, we subclass
+ \l QAbstractListModel because it defines sensible default behavior for list
+ models, and it exposes a simpler interface than the \l QAbstractItemModel
+ class.
+
+ When implementing a model it is important to remember that
+ \l QAbstractItemModel does not store any data itself, it merely
+ presents an interface that the views use to access the data.
+ For a minimal read-only model it is only necessary to implement a few
+ functions as there are default implementations for most of the
+ interface. The class declaration is as follows:
+
+ \snippet stringlistmodel/model.h 0
+ \snippet stringlistmodel/model.h 1
+ \codeline
+ \snippet stringlistmodel/model.h 5
+
+ Apart from the model's constructor, we only need to implement two
+ functions: \l{QAbstractItemModel::rowCount()}{rowCount()} returns the
+ number of rows in the model and \l{QAbstractItemModel::data()}{data()}
+ returns an item of data corresponding to a specified model index.
+
+ Well behaved models also implement
+ \l{QAbstractItemModel::headerData()}{headerData()} to give tree and
+ table views something to display in their headers.
+
+ Note that this is a non-hierarchical model, so we don't have to worry
+ about the parent-child relationships. If our model was hierarchical, we
+ would also have to implement the
+ \l{QAbstractItemModel::index()}{index()} and
+ \l{QAbstractItemModel::parent()}{parent()} functions.
+
+ The list of strings is stored internally in the \c stringList private
+ member variable.
+
+ \section3 Dimensions of the model
+
+ We want the number of rows in the model to be the same as the number of
+ strings in the string list. We implement the
+ \l{QAbstractItemModel::rowCount()}{rowCount()} function with this in
+ mind:
+
+ \snippet stringlistmodel/model.cpp 0
+
+ Since the model is non-hierarchical, we can safely ignore the model index
+ corresponding to the parent item. By default, models derived from
+ QAbstractListModel only contain one column, so we do not need to
+ reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()}
+ function.
+
+ \section3 Model headers and data
+
+ For items in the view, we want to return the strings in the string list.
+ The \l{QAbstractItemModel::data()}{data()} function is responsible for
+ returning the item of data that corresponds to the index argument:
+
+ \snippet stringlistmodel/model.cpp 1-data-read-only
+
+ We only return a valid QVariant if the model index supplied is valid,
+ the row number is within the range of items in the string list, and the
+ requested role is one that we support.
+
+ Some views, such as QTreeView and QTableView, are able to display headers
+ along with the item data. If our model is displayed in a view with headers,
+ we want the headers to show the row and column numbers. We can provide
+ information about the headers by subclassing the
+ \l{QAbstractItemModel::headerData()}{headerData()} function:
+
+ \snippet stringlistmodel/model.cpp 2
+
+ Again, we return a valid QVariant only if the role is one that we support.
+ The orientation of the header is also taken into account when deciding the
+ exact data to return.
+
+ Not all views display headers with the item data, and those that do may
+ be configured to hide them. Nonetheless, it is recommended that you
+ implement the \l{QAbstractItemModel::headerData()}{headerData()} function
+ to provide relevant information about the data provided by the model.
+
+ An item can have several roles, giving out different data depending on the
+ role specified. The items in our model only have one role,
+ \l{Qt::ItemDataRole}{DisplayRole}, so we return the data
+ for items irrespective of the role specified.
+ However, we could reuse the data we provide for the
+ \l{Qt::ItemDataRole}{DisplayRole} in
+ other roles, such as the
+ \l{Qt::ItemDataRole}{ToolTipRole} that views can use to
+ display information about items in a tooltip.
+
+ \section2 An editable model
+
+ The read-only model shows how simple choices could be presented to the
+ user but, for many applications, an editable list model is much more
+ useful. We can modify the read-only model to make the items editable
+ by changing the data() function we implemented for read-only, and
+ by implementing two extra functions:
+ \l{QAbstractItemModel::flags()}{flags()} and
+ \l{QAbstractItemModel::setData()}{setData()}.
+ The following function declarations are added to the class definition:
+
+ \snippet stringlistmodel/model.h 2
+ \snippet stringlistmodel/model.h 3
+
+ \section3 Making the model editable
+
+ A delegate checks whether an item is editable before creating an
+ editor. The model must let the delegate know that its items are
+ editable. We do this by returning the correct flags for each item in
+ the model; in this case, we enable all items and make them both
+ selectable and editable:
+
+ \snippet stringlistmodel/model.cpp 3
+
+ Note that we do not have to know how the delegate performs the actual
+ editing process. We only have to provide a way for the delegate to set the
+ data in the model. This is achieved through the
+ \l{QAbstractItemModel::setData()}{setData()} function:
+
+ \snippet stringlistmodel/model.cpp 4
+ \snippet stringlistmodel/model.cpp 5
+
+ In this model, the item in the string list that corresponds to the
+ model index is replaced by the value provided. However, before we
+ can modify the string list, we must make sure that the index is
+ valid, the item is of the correct type, and that the role is
+ supported. By convention, we insist that the role is the
+ \l{Qt::ItemDataRole}{EditRole} since this is the role used by the
+ standard item delegate. For boolean values, however, you can use
+ Qt::CheckStateRole and set the Qt::ItemIsUserCheckable flag; a
+ checkbox is then used for editing the value. The underlying
+ data in this model is the same for all roles, so this detail just
+ makes it easier to integrate the model with standard components.
+
+ When the data has been set, the model must let the views know that some
+ data has changed. This is done by emitting the
+ \l{QAbstractItemModel::dataChanged()}{dataChanged()} signal. Since only
+ one item of data has changed, the range of items specified in the signal
+ is limited to just one model index.
+
+ Also the data() function needs to be changed to add the Qt::EditRole test:
+
+ \snippet stringlistmodel/model.cpp 1
+
+ \section3 Inserting and removing rows
+
+ It is possible to change the number of rows and columns in a model. In the
+ string list model it only makes sense to change the number of rows, so we
+ only reimplement the functions for inserting and removing rows. These are
+ declared in the class definition:
+
+ \snippet stringlistmodel/model.h 4
+
+ Since rows in this model correspond to strings in a list, the
+ \c insertRows() function inserts a number of empty strings into the string
+ list before the specified position. The number of strings inserted is
+ equivalent to the number of rows specified.
+
+ The parent index is normally used to determine where in the model the
+ rows should be added. In this case, we only have a single top-level list
+ of strings, so we just insert empty strings into that list.
+
+ \snippet stringlistmodel/model.cpp 6
+ \snippet stringlistmodel/model.cpp 7
+
+ The model first calls the
+ \l{QAbstractItemModel::beginInsertRows()}{beginInsertRows()} function to
+ inform other components that the number of rows is about to change. The
+ function specifies the row numbers of the first and last new rows to be
+ inserted, and the model index for their parent item. After changing the
+ string list, it calls
+ \l{QAbstractItemModel::endInsertRows()}{endInsertRows()} to complete the
+ operation and inform other components that the dimensions of the model
+ have changed, returning true to indicate success.
+
+ The function to remove rows from the model is also simple to write.
+ The rows to be removed from the model are specified by the position and
+ the number of rows given.
+ We ignore the parent index to simplify our implementation, and just
+ remove the corresponding items from the string list.
+
+ \snippet stringlistmodel/model.cpp 8
+ \snippet stringlistmodel/model.cpp 9
+
+ The \l{QAbstractItemModel::beginRemoveRows()}{beginRemoveRows()} function
+ is always called before any underlying data is removed, and specifies the
+ first and last rows to be removed. This allows other components to access
+ the data before it becomes unavailable.
+ After the rows have been removed, the model emits
+ \l{QAbstractItemModel::endRemoveRows()}{endRemoveRows()} to finish the
+ operation and let other components know that the dimensions of the model
+ have changed.
+
+ \section2 Next steps
+
+ We can display the data provided by this model, or any other model, using
+ the \l QListView class to present the model's items in the form of a vertical
+ list.
+ For the string list model, this view also provides a default editor so that
+ the items can be manipulated. We examine the possibilities made available by
+ the standard view classes in \l{View Classes}.
+
+ The \l{Model Subclassing Reference} document discusses the requirements of
+ QAbstractItemModel subclasses in more detail, and provides a guide to the
+ virtual functions that must be implemented to enable various features in
+ different types of models.
+
+ \section1 Item view convenience classes
+
+ Qt 4 also introduced some standard widgets to provide classic
+ item-based container widgets. These behave in a similar way to the
+ item view classes in Qt 3, but have been rewritten to use the
+ underlying model/view framework for performance and
+ maintainability. The old item view classes are still available in
+ the compatibility library (see the \l{porting4.html}{Porting
+ Guide} for more information).
+
+ The item-based widgets have been given names which reflect their uses:
+ \c QListWidget provides a list of items, \c QTreeWidget displays a
+ multi-level tree structure, and \c QTableWidget provides a table of cell
+ items. Each class inherits the behavior of the \c QAbstractItemView
+ class which implements common behavior for item selection and header
+ management.
+
+ \section2 List widgets
+
+ Single level lists of items are typically displayed using a \c QListWidget
+ and a number of \c{QListWidgetItem}s. A list widget is constructed in the
+ same way as any other widget:
+
+ \snippet qlistwidget-using/mainwindow.cpp 0
+
+ List items can be added directly to the list widget when they are
+ constructed:
+
+ \snippet qlistwidget-using/mainwindow.cpp 3
+
+ They can also be constructed without a parent list widget and added to
+ a list at some later time:
+
+ \snippet qlistwidget-using/mainwindow.cpp 6
+ \snippet qlistwidget-using/mainwindow.cpp 7
+
+ Each item in a list can display a text label and an icon. The colors
+ and font used to render the text can be changed to provide a customized
+ appearance for items. Tooltips, status tips, and "What's
+ This?" help are all easily configured to ensure that the list is properly
+ integrated into the application.
+
+ \snippet qlistwidget-using/mainwindow.cpp 8
+
+ By default, items in a list are presented in the order of their creation.
+ Lists of items can be sorted according to the criteria given in
+ \l{Qt::SortOrder} to produce a list of items that is sorted in forward or
+ reverse alphabetical order:
+
+ \snippet qlistwidget-using/mainwindow.cpp 4
+ \snippet qlistwidget-using/mainwindow.cpp 5
+
+ \section2 Tree widgets
+
+ Trees or hierarchical lists of items are provided by the \c QTreeWidget
+ and \c QTreeWidgetItem classes. Each item in the tree widget can have
+ child items of its own, and can display a number of columns of
+ information. Tree widgets are created just like any other widget:
+
+ \snippet qtreewidget-using/mainwindow.cpp 0
+
+ Before items can be added to the tree widget, the number of columns must
+ be set. For example, we could define two columns, and create a header
+ to provide labels at the top of each column:
+
+ \snippet qtreewidget-using/mainwindow.cpp 1
+ \snippet qtreewidget-using/mainwindow.cpp 2
+
+ The easiest way to set up the labels for each section is to supply a string
+ list. For more sophisticated headers, you can construct a tree item,
+ decorate it as you wish, and use that as the tree widget's header.
+
+ Top-level items in the tree widget are constructed with the tree widget as
+ their parent widget. They can be inserted in an arbitrary order, or you
+ can ensure that they are listed in a particular order by specifying the
+ previous item when constructing each item:
+
+ \snippet qtreewidget-using/mainwindow.cpp 3
+ \codeline
+ \snippet qtreewidget-using/mainwindow.cpp 4
+
+ Tree widgets deal with top-level items slightly differently to other
+ items from deeper within the tree. Items can be removed from the top
+ level of the tree by calling the tree widget's
+ \l{QTreeWidget::takeTopLevelItem()}{takeTopLevelItem()} function, but
+ items from lower levels are removed by calling their parent item's
+ \l{QTreeWidgetItem::takeChild()}{takeChild()} function.
+ Items are inserted in the top level of the tree with the
+ \l{QTreeWidget::insertTopLevelItem()}{insertTopLevelItem()} function.
+ At lower levels in the tree, the parent item's
+ \l{QTreeWidgetItem::insertChild()}{insertChild()} function is used.
+
+ It is easy to move items around between the top level and lower levels
+ in the tree. We just need to check whether the items are top-level items
+ or not, and this information is supplied by each item's \c parent()
+ function. For example, we can remove the current item in the tree widget
+ regardless of its location:
+
+ \snippet qtreewidget-using/mainwindow.cpp 10
+ \snippet qtreewidget-using/mainwindow.cpp 11
+
+ Inserting the item somewhere else in the tree widget follows the same
+ pattern:
+
+ \snippet qtreewidget-using/mainwindow.cpp 8
+ \snippet qtreewidget-using/mainwindow.cpp 9
+
+ \section2 Table widgets
+
+ Tables of items similar to those found in spreadsheet applications
+ are constructed with the \c QTableWidget and \c QTableWidgetItem. These
+ provide a scrolling table widget with headers and items to use within it.
+
+ Tables can be created with a set number of rows and columns, or these
+ can be added to an unsized table as they are needed.
+
+ \snippet qtablewidget-using/mainwindow.h 0
+ \snippet qtablewidget-using/mainwindow.cpp 0
+
+ Items are constructed outside the table before being added to the table
+ at the required location:
+
+ \snippet qtablewidget-using/mainwindow.cpp 3
+
+ Horizontal and vertical headers can be added to the table by constructing
+ items outside the table and using them as headers:
+
+ \snippet qtablewidget-using/mainwindow.cpp 1
+
+ Note that the rows and columns in the table begin at zero.
+
+ \section2 Common features
+
+ There are a number of item-based features common to each of the
+ convenience classes that are available through the same interfaces
+ in each class. We present these in the following sections with some
+ examples for different widgets.
+ Look at the list of \l{Model/View Classes} for each of the widgets
+ for more details about the use of each function used.
+
+ \section3 Hidden items
+
+ It is sometimes useful to be able to hide items in an item view widget
+ rather than remove them. Items for all of the above widgets can be
+ hidden and later shown again. You can determine whether an item is hidden
+ by calling the isItemHidden() function, and items can be hidden with
+ \c setItemHidden().
+
+ Since this operation is item-based, the same function is available for
+ all three convenience classes.
+
+ \section3 Selections
+
+ The way items are selected is controlled by the widget's selection mode
+ (\l{QAbstractItemView::SelectionMode}).
+ This property controls whether the user can select one or many items and,
+ in many-item selections, whether the selection must be a continuous range
+ of items. The selection mode works in the same way for all of the
+ above widgets.
+
+ \table
+ \row
+ \li \image selection-single.png
+ \li \b{Single item selections:}
+ Where the user needs to choose a single item from a widget, the
+ default \c SingleSelection mode is most suitable. In this mode, the
+ current item and the selected item are the same.
+
+ \row
+ \li \image selection-multi.png
+ \li \b{Multi-item selections:}
+ In this mode, the user can toggle the selection state of any item in the
+ widget without changing the existing selection, much like the way
+ non-exclusive checkboxes can be toggled independently.
+
+ \row
+ \li \image selection-extended.png
+ \li \b{Extended selections:}
+ Widgets that often require many adjacent items to be selected, such
+ as those found in spreadsheets, require the \c ExtendedSelection mode.
+ In this mode, continuous ranges of items in the widget can be selected
+ with both the mouse and the keyboard.
+ Complex selections, involving many items that are not adjacent to other
+ selected items in the widget, can also be created if modifier keys are
+ used.
+
+ If the user selects an item without using a modifier key, the existing
+ selection is cleared.
+ \endtable
+
+ The selected items in a widget are read using the \c selectedItems()
+ function, providing a list of relevant items that can be iterated over.
+ For example, we can find the sum of all the numeric values within a
+ list of selected items with the following code:
+
+ \snippet qtablewidget-using/mainwindow.cpp 4
+
+ Note that for the single selection mode, the current item will be in
+ the selection. In the multi-selection and extended selection modes, the
+ current item may not lie within the selection, depending on the way the
+ user formed the selection.
+
+ \section3 Searching
+
+ It is often useful to be able to find items within an item view widget,
+ either as a developer or as a service to present to users. All three
+ item view convenience classes provide a common \c findItems() function
+ to make this as consistent and simple as possible.
+
+ Items are searched for by the text that they contain according to
+ criteria specified by a selection of values from Qt::MatchFlags.
+ We can obtain a list of matching items with the \c findItems()
+ function:
+
+ \snippet qtreewidget-using/mainwindow.cpp 6
+ \snippet qtreewidget-using/mainwindow.cpp 7
+
+ The above code causes items in a tree widget to be selected if they
+ contain the text given in the search string. This pattern can also be
+ used in the list and table widgets.
+
+ \section1 Using Drag and Drop with Item Views
+
+ Qt's drag and drop infrastructure is fully supported by the model/view framework.
+ Items in lists, tables, and trees can be dragged within the views, and data can be
+ imported and exported as MIME-encoded data.
+
+ The standard views automatically support internal drag and drop, where items are
+ moved around to change the order in which they are displayed. By default, drag and
+ drop is not enabled for these views because they are configured for the simplest,
+ most common uses. To allow items to be dragged around, certain properties of the
+ view need to be enabled, and the items themselves must also allow dragging to occur.
+
+ The requirements for a model that only allows items to be exported from a
+ view, and which does not allow data to be dropped into it, are fewer than
+ those for a fully-enabled drag and drop model.
+
+ See also the \l{Model Subclassing Reference} for more information about
+ enabling drag and drop support in new models.
+
+ \section2 Using convenience views
+
+ Each of the types of item used with QListWidget, QTableWidget, and QTreeWidget
+ is configured to use a different set of flags by default. For example, each
+ QListWidgetItem or QTreeWidgetItem is initially enabled, checkable, selectable,
+ and can be used as the source of a drag and drop operation; each QTableWidgetItem
+ can also be edited and used as the target of a drag and drop operation.
+
+ Although all of the standard items have one or both flags set for drag and drop,
+ you generally need to set various properties in the view itself to take advantage
+ of the built-in support for drag and drop:
+
+ \list
+ \li To enable item dragging, set the view's
+ \l{QAbstractItemView::dragEnabled}{dragEnabled} property to \c true.
+ \li To allow the user to drop either internal or external items within the view,
+ set the view's \l{QAbstractScrollArea::}{viewport()}'s
+ \l{QWidget::acceptDrops}{acceptDrops} property to \c true.
+ \li To show the user where the item currently being dragged will be placed if
+ dropped, set the view's \l{QAbstractItemView::showDropIndicator}{showDropIndicator}
+ property. This provides the user with continuously updating information about
+ item placement within the view.
+ \endlist
+
+ For example, we can enable drag and drop in a list widget with the following lines
+ of code:
+
+ \snippet qlistwidget-dnd/mainwindow.cpp 0
+
+ The result is a list widget which allows the items to be copied
+ around within the view, and even lets the user drag items between
+ views containing the same type of data. In both situations, the
+ items are copied rather than moved.
+
+ To enable the user to move the items around within the view, we
+ must set the list widget's \l {QAbstractItemView::}{dragDropMode}:
+
+ \snippet qlistwidget-dnd/mainwindow.cpp 1
+
+ \section2 Using model/view classes
+
+ Setting up a view for drag and drop follows the same pattern used with the
+ convenience views. For example, a QListView can be set up in the same way as a
+ QListWidget:
+
+ \snippet qlistview-dnd/mainwindow.cpp 0
+
+ Since access to the data displayed by the view is controlled by a model, the
+ model used also has to provide support for drag and drop operations. The
+ actions supported by a model can be specified by reimplementing the
+ QAbstractItemModel::supportedDropActions() function. For example, copy and
+ move operations are enabled with the following code:
+
+ \snippet qlistview-dnd/model.cpp 10
+
+ Although any combination of values from Qt::DropActions can be given, the
+ model needs to be written to support them. For example, to allow Qt::MoveAction
+ to be used properly with a list model, the model must provide an implementation
+ of QAbstractItemModel::removeRows(), either directly or by inheriting the
+ implementation from its base class.
+
+ \section3 Enabling drag and drop for items
+
+ Models indicate to views which items can be dragged, and which will accept drops,
+ by reimplementing the QAbstractItemModel::flags() function to provide suitable
+ flags.
+
+ For example, a model which provides a simple list based on QAbstractListModel
+ can enable drag and drop for each of the items by ensuring that the flags
+ returned contain the \l Qt::ItemIsDragEnabled and \l Qt::ItemIsDropEnabled
+ values:
+
+ \snippet qlistview-dnd/model.cpp 7
+
+ Note that items can be dropped into the top level of the model, but dragging is
+ only enabled for valid items.
+
+ In the above code, since the model is derived from QStringListModel, we
+ obtain a default set of flags by calling its implementation of the flags()
+ function.
+
+ \section3 Encoding exported data
+
+ When items of data are exported from a model in a drag and drop operation, they
+ are encoded into an appropriate format corresponding to one or more MIME types.
+ Models declare the MIME types that they can use to supply items by reimplementing
+ the QAbstractItemModel::mimeTypes() function, returning a list of standard MIME
+ types.
+
+ For example, a model that only provides plain text would provide the following
+ implementation:
+
+ \snippet qlistview-dnd/model.cpp 9
+
+ The model must also provide code to encode data in the advertised format. This
+ is achieved by reimplementing the QAbstractItemModel::mimeData() function to
+ provide a QMimeData object, just as in any other drag and drop operation.
+
+ The following code shows how each item of data, corresponding to a given list of
+ indexes, is encoded as plain text and stored in a QMimeData object.
+
+ \snippet qlistview-dnd/model.cpp 8
+
+ Since a list of model indexes is supplied to the function, this approach is general
+ enough to be used in both hierarchical and non-heirarchical models.
+
+ Note that custom datatypes must be declared as \l{QMetaObject}{meta objects}
+ and that stream operators must be implemented for them. See the QMetaObject
+ class description for details.
+
+ \section3 Inserting dropped data into a model
+
+ The way that any given model handles dropped data depends on both its type
+ (list, table, or tree) and the way its contents is likely to be presented to
+ the user. Generally, the approach taken to accommodate dropped data should
+ be the one that most suits the model's underlying data store.
+
+ Different types of model tend to handle dropped data in different ways. List
+ and table models only provide a flat structure in which items of data are
+ stored. As a result, they may insert new rows (and columns) when data is
+ dropped on an existing item in a view, or they may overwrite the item's
+ contents in the model using some of the data supplied. Tree models are
+ often able to add child items containing new data to their underlying data
+ stores, and will therefore behave more predictably as far as the user
+ is concerned.
+
+ Dropped data is handled by a model's reimplementation of
+ QAbstractItemModel::dropMimeData(). For example, a model that handles a
+ simple list of strings can provide an implementation that handles data
+ dropped onto existing items separately to data dropped into the top level
+ of the model (i.e., onto an invalid item).
+
+ The model first has to make sure that the operation should be acted on,
+ the data supplied is in a format that can be used, and that its destination
+ within the model is valid:
+
+ \snippet qlistview-dnd/model.cpp 0
+ \snippet qlistview-dnd/model.cpp 1
+
+ A simple one column string list model can indicate failure if the data
+ supplied is not plain text, or if the column number given for the drop
+ is invalid.
+
+ The data to be inserted into the model is treated differently depending on
+ whether it is dropped onto an existing item or not. In this simple example,
+ we want to allow drops between existing items, before the first item in the
+ list, and after the last item.
+
+ When a drop occurs, the model index corresponding to the parent item will
+ either be valid, indicating that the drop occurred on an item, or it will
+ be invalid, indicating that the drop occurred somewhere in the view that
+ corresponds to top level of the model.
+
+ \snippet qlistview-dnd/model.cpp 2
+
+ We initially examine the row number supplied to see if we can use it
+ to insert items into the model, regardless of whether the parent index is
+ valid or not.
+
+ \snippet qlistview-dnd/model.cpp 3
+
+ If the parent model index is valid, the drop occurred on an item. In this
+ simple list model, we find out the row number of the item and use that
+ value to insert dropped items into the top level of the model.
+
+ \snippet qlistview-dnd/model.cpp 4
+
+ When a drop occurs elsewhere in the view, and the row number is unusable,
+ we append items to the top level of the model.
+
+ In hierarchical models, when a drop occurs on an item, it would be better to
+ insert new items into the model as children of that item. In the simple
+ example shown here, the model only has one level, so this approach is not
+ appropriate.
+
+ \section3 Decoding imported data
+
+ Each implementation of \l{QAbstractItemModel::dropMimeData()}{dropMimeData()} must
+ also decode the data and insert it into the model's underlying data structure.
+
+ For a simple string list model, the encoded items can be decoded and streamed
+ into a QStringList:
+
+ \snippet qlistview-dnd/model.cpp 5
+
+ The strings can then be inserted into the underlying data store. For consistency,
+ this can be done through the model's own interface:
+
+ \snippet qlistview-dnd/model.cpp 6
+
+ Note that the model will typically need to provide implementations of the
+ QAbstractItemModel::insertRows() and QAbstractItemModel::setData() functions.
+
+ \sa {Item Views Puzzle Example}
+
+ \section1 Proxy models
+
+ In the model/view framework, items of data supplied by a single model can be shared
+ by any number of views, and each of these can possibly represent the same information
+ in completely different ways.
+ Custom views and delegates are effective ways to provide radically different
+ representations of the same data. However, applications often need to provide
+ conventional views onto processed versions of the same data, such as differently-sorted
+ views onto a list of items.
+
+ Although it seems appropriate to perform sorting and filtering operations as internal
+ functions of views, this approach does not allow multiple views to share the results
+ of such potentially costly operations. The alternative approach, involving sorting
+ within the model itself, leads to the similar problem where each view has to display
+ items of data that are organized according to the most recent processing operation.
+
+ To solve this problem, the model/view framework uses proxy models to manage the
+ information supplied between individual models and views. Proxy models are components
+ that behave like ordinary models from the perspective of a view, and access data from
+ source models on behalf of that view. The signals and slots used by the model/view
+ framework ensure that each view is updated appropriately no matter how many proxy models
+ are placed between itself and the source model.
+
+ \section2 Using proxy models
+
+ Proxy models can be inserted between an existing model and any number of views.
+ Qt is supplied with a standard proxy model, QSortFilterProxyModel, that is usually
+ instantiated and used directly, but can also be subclassed to provide custom filtering
+ and sorting behavior. The QSortFilterProxyModel class can be used in the following way:
+
+ \snippet qsortfilterproxymodel/main.cpp 0
+ \codeline
+ \snippet qsortfilterproxymodel/main.cpp 1
+
+ Since proxy models are inherit from QAbstractItemModel, they can be connected to
+ any kind of view, and can be shared between views. They can also be used to
+ process the information obtained from other proxy models in a pipeline arrangement.
+
+ The QSortFilterProxyModel class is designed to be instantiated and used directly
+ in applications. More specialized proxy models can be created by subclassing this
+ classes and implementing the required comparison operations.
+
+ \section2 Customizing proxy models
+
+ Generally, the type of processing used in a proxy model involves mapping each item of
+ data from its original location in the source model to either a different location in
+ the proxy model. In some models, some items may have no corresponding location in the
+ proxy model; these models are \e filtering proxy models. Views access items using
+ model indexes provided by the proxy model, and these contain no information about the
+ source model or the locations of the original items in that model.
+
+ QSortFilterProxyModel enables data from a source model to be filtered before
+ being supplied to views, and also allows the contents of a source model to
+ be supplied to views as pre-sorted data.
+
+ \section3 Custom filtering models
+
+ The QSortFilterProxyModel class provides a filtering model that is fairly versatile,
+ and which can be used in a variety of common situations. For advanced users,
+ QSortFilterProxyModel can be subclassed, providing a mechanism that enables custom
+ filters to be implemented.
+
+ Subclasses of QSortFilterProxyModel can reimplement two virtual functions that are
+ called whenever a model index from the proxy model is requested or used:
+
+ \list
+ \li \l{QSortFilterProxyModel::filterAcceptsColumn()}{filterAcceptsColumn()} is used to
+ filter specific columns from part of the source model.
+ \li \l{QSortFilterProxyModel::filterAcceptsRow()}{filterAcceptsRow()} is used to filter
+ specific rows from part of the source model.
+ \endlist
+
+ The default implementations of the above functions in QSortFilterProxyModel
+ return true to ensure that all items are passed through to views; reimplementations
+ of these functions should return false to filter out individual rows and columns.
+
+ \section3 Custom sorting models
+
+ QSortFilterProxyModel instances use Qt's built-in qStableSort() function to set up
+ mappings between items in the source model and those in the proxy model, allowing a
+ sorted hierarchy of items to be exposed to views without modifying the structure of the
+ source model. To provide custom sorting behavior, reimplement the
+ \l{QSortFilterProxyModel::lessThan()}{lessThan()} function to perform custom
+ comparisons.
+
+ \section1 Model subclassing reference
+
+ Model subclasses need to provide implementations of many of the virtual functions
+ defined in the QAbstractItemModel base class. The number of these functions that need
+ to be implemented depends on the type of model - whether it supplies views with
+ a simple list, a table, or a complex hierarchy of items. Models that inherit from
+ QAbstractListModel and QAbstractTableModel can take advantage of the default
+ implementations of functions provided by those classes. Models that expose items
+ of data in tree-like structures must provide implementations for many of the
+ virtual functions in QAbstractItemModel.
+
+ The functions that need to be implemented in a model subclass can be divided into three
+ groups:
+
+ \list
+ \li \b{Item data handling:} All models need to implement functions to enable views and
+ delegates to query the dimensions of the model, examine items, and retrieve data.
+ \li \b{Navigation and index creation:} Hierarchical models need to provide functions
+ that views can call to navigate the tree-like structures they expose, and obtain
+ model indexes for items.
+ \li \b{Drag and drop support and MIME type handling:} Models inherit functions that
+ control the way that internal and external drag and drop operations are performed.
+ These functions allow items of data to be described in terms of MIME types that
+ other components and applications can understand.
+ \endlist
+
+ For more information, see the \l
+ {"Item View Classes" Chapter of C++ GUI Programming with Qt 4}.
+
+ \section2 Item data handling
+
+ Models can provide varying levels of access to the data they provide: They can be
+ simple read-only components, some models may support resizing operations, and
+ others may allow items to be edited.
+
+ \section2 Read-Only access
+
+ To provide read-only access to data provided by a model, the following functions
+ \e{must} be implemented in the model's subclass:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::flags()}{flags()}
+ \li Used by other components to obtain information about each item provided by
+ the model. In many models, the combination of flags should include
+ Qt::ItemIsEnabled and Qt::ItemIsSelectable.
+ \row \li \l{QAbstractItemModel::data()}{data()}
+ \li Used to supply item data to views and delegates. Generally, models only
+ need to supply data for Qt::DisplayRole and any application-specific user
+ roles, but it is also good practice to provide data for Qt::ToolTipRole,
+ Qt::AccessibleTextRole, and Qt::AccessibleDescriptionRole.
+ See the Qt::ItemDataRole enum documentation for information about the types
+ associated with each role.
+ \row \li \l{QAbstractItemModel::headerData()}{headerData()}
+ \li Provides views with information to show in their headers. The information is
+ only retrieved by views that can display header information.
+ \row \li \l{QAbstractItemModel::rowCount()}{rowCount()}
+ \li Provides the number of rows of data exposed by the model.
+ \endtable
+
+ These four functions must be implemented in all types of model, including list models
+ (QAbstractListModel subclasses) and table models (QAbstractTableModel subclasses).
+
+ Additionally, the following functions \e{must} be implemented in direct subclasses
+ of QAbstractTableModel and QAbstractItemModel:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::columnCount()}{columnCount()}
+ \li Provides the number of columns of data exposed by the model. List models do not
+ provide this function because it is already implemented in QAbstractListModel.
+ \endtable
+
+ \section3 Editable items
+
+ Editable models allow items of data to be modified, and may also provide
+ functions to allow rows and columns to be inserted and removed. To enable
+ editing, the following functions must be implemented correctly:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::flags()}{flags()}
+ \li Must return an appropriate combination of flags for each item. In particular,
+ the value returned by this function must include \l{Qt::ItemIsEditable} in
+ addition to the values applied to items in a read-only model.
+ \row \li \l{QAbstractItemModel::setData()}{setData()}
+ \li Used to modify the item of data associated with a specified model index.
+ To be able to accept user input, provided by user interface elements, this
+ function must handle data associated with Qt::EditRole.
+ The implementation may also accept data associated with many different kinds
+ of roles specified by Qt::ItemDataRole. After changing the item of data,
+ models must emit the \l{QAbstractItemModel::dataChanged()}{dataChanged()}
+ signal to inform other components of the change.
+ \row \li \l{QAbstractItemModel::setHeaderData()}{setHeaderData()}
+ \li Used to modify horizontal and vertical header information. After changing
+ the item of data, models must emit the
+ \l{QAbstractItemModel::headerDataChanged()}{headerDataChanged()}
+ signal to inform other components of the change.
+ \endtable
+
+ \section3 Resizable models
+
+ All types of model can support the insertion and removal of rows. Table models
+ and hierarchical models can also support the insertion and removal of columns.
+ It is important to notify other components about changes to the model's dimensions
+ both \e before and \e after they occur. As a result, the following functions
+ can be implemented to allow the model to be resized, but implementations must
+ ensure that the appropriate functions are called to notify attached views and
+ delegates:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::insertRows()}{insertRows()}
+ \li Used to add new rows and items of data to all types of model.
+ Implementations must call
+ \l{QAbstractItemModel::beginInsertRows()}{beginInsertRows()} \e before
+ inserting new rows into any underlying data structures, and call
+ \l{QAbstractItemModel::endInsertRows()}{endInsertRows()}
+ \e{immediately afterwards}.
+ \row \li \l{QAbstractItemModel::removeRows()}{removeRows()}
+ \li Used to remove rows and the items of data they contain from all types of model.
+ Implementations must call
+ \l{QAbstractItemModel::beginRemoveRows()}{beginRemoveRows()}
+ \e before inserting new columns into any underlying data structures, and call
+ \l{QAbstractItemModel::endRemoveRows()}{endRemoveRows()}
+ \e{immediately afterwards}.
+ \row \li \l{QAbstractItemModel::insertColumns()}{insertColumns()}
+ \li Used to add new columns and items of data to table models and hierarchical models.
+ Implementations must call
+ \l{QAbstractItemModel::beginInsertColumns()}{beginInsertColumns()} \e before
+ rows are removed from any underlying data structures, and call
+ \l{QAbstractItemModel::endInsertColumns()}{endInsertColumns()}
+ \e{immediately afterwards}.
+ \row \li \l{QAbstractItemModel::removeColumns()}{removeColumns()}
+ \li Used to remove columns and the items of data they contain from table models and
+ hierarchical models.
+ Implementations must call
+ \l{QAbstractItemModel::beginRemoveColumns()}{beginRemoveColumns()}
+ \e before columns are removed from any underlying data structures, and call
+ \l{QAbstractItemModel::endRemoveColumns()}{endRemoveColumns()}
+ \e{immediately afterwards}.
+ \endtable
+
+ Generally, these functions should return true if the operation was successful.
+ However, there may be cases where the operation only partly succeeded; for example,
+ if less than the specified number of rows could be inserted. In such cases, the
+ model should return false to indicate failure to enable any attached components to
+ handle the situation.
+
+ The signals emitted by the functions called in implementations of the resizing
+ API give attached components the chance to take action before any data becomes
+ unavailable. The encapsulation of insert and remove operations with begin and end
+ functions also enable the model to manage
+ \l{QPersistentModelIndex}{persistent model indexes} correctly.
+
+ Normally, the begin and end functions are capable of informing other components
+ about changes to the model's underlying structure. For more complex changes to the
+ model's structure, perhaps involving internal reorganization or sorting of data,
+ it is necessary to emit the \l{QAbstractItemModel::layoutChanged()}{layoutChanged()}
+ signal to cause any attached views to be updated.
+
+ \section3 Lazy population of model data
+
+ Lazy population of model data effectively allows requests for information
+ about the model to be deferred until it is actually needed by views.
+
+ Some models need to obtain data from remote sources, or must perform
+ time-consuming operations to obtain information about the way the
+ data is organized. Since views generally request as much information
+ as possible in order to accurately display model data, it can be useful
+ to restrict the amount of information returned to them to reduce
+ unnecessary follow-up requests for data.
+
+ In hierarchical models where finding the number of children of a given
+ item is an expensive operation, it is useful to ensure that the model's
+ \l{QAbstractItemModel::}{rowCount()} implementation is only called when
+ necessary. In such cases, the \l{QAbstractItemModel::}{hasChildren()}
+ function can be reimplemented to provide an inexpensive way for views to
+ check for the presence of children and, in the case of QTreeView, draw
+ the appropriate decoration for their parent item.
+
+ Whether the reimplementation of \l{QAbstractItemModel::}{hasChildren()}
+ returns \c true or \c false, it may not be necessary for the view to call
+ \l{QAbstractItemModel::}{rowCount()} to find out how many children are
+ present. For example, QTreeView does not need to know how many children
+ there are if the parent item has not been expanded to show them.
+
+ If it is known that many items will have children, reimplementing
+ \l{QAbstractItemModel::}{hasChildren()} to unconditionally return \c true
+ is sometimes a useful approach to take. This ensures that each item can
+ be later examined for children while making initial population of model
+ data as fast as possible. The only disadvantage is that items without
+ children may be displayed incorrectly in some views until the user
+ attempts to view the non-existent child items.
+
+ \section2 Navigation and model index creation
+
+ Hierarchical models need to provide functions that views can call to navigate the
+ tree-like structures they expose, and obtain model indexes for items.
+
+ \section3 Parents and children
+
+ Since the structure exposed to views is determined by the underlying data
+ structure, it is up to each model subclass to create its own model indexes
+ by providing implementations of the following functions:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::index()}{index()}
+ \li Given a model index for a parent item, this function allows views and delegates
+ to access children of that item. If no valid child item - corresponding to the
+ specified row, column, and parent model index, can be found, the function
+ must return QModelIndex(), which is an invalid model index.
+ \row \li \l{QAbstractItemModel::parent()}{parent()}
+ \li Provides a model index corresponding to the parent of any given child item.
+ If the model index specified corresponds to a top-level item in the model, or if
+ there is no valid parent item in the model, the function must return
+ an invalid model index, created with the empty QModelIndex() constructor.
+ \endtable
+
+ Both functions above use the \l{QAbstractItemModel::createIndex()}{createIndex()}
+ factory function to generate indexes for other components to use. It is normal for
+ models to supply some unique identifier to this function to ensure that
+ the model index can be re-associated with its corresponding item later on.
+
+ \section2 Drag and drop support and MIME type handling
+
+ The model/view classes support drag and drop operations, providing default behavior
+ that is sufficient for many applications. However, it is also possible to customize
+ the way items are encoded during drag and drop operations, whether they are copied
+ or moved by default, and how they are inserted into existing models.
+
+ Additionally, the convenience view classes implement specialized behavior that
+ should closely follow that expected by existing developers.
+ The \l{#Convenience Views}{Convenience Views} section provides an overview of this
+ behavior.
+
+ \section3 MIME data
+
+ By default, the built-in models and views use an internal MIME type
+ (\c{application/x-qabstractitemmodeldatalist}) to pass around information about
+ model indexes. This specifies data for a list of items, containing the row and
+ column numbers of each item, and information about the roles that each item
+ supports.
+
+ Data encoded using this MIME type can be obtained by calling
+ QAbstractItemModel::mimeData() with a QModelIndexList containing the items to
+ be serialized.
+ \omit
+ The following types are used to store information about
+ each item as it is streamed into a QByteArray and stored in a QMimeData object:
+
+ \table 90%
+ \header \li Description \li Type
+ \row \li Row \li int
+ \row \li Column \li int
+ \row \li Data for each role \li QMap<int, QVariant>
+ \endtable
+
+ This information can be retrieved for use in non-model classes by calling
+ QMimeData::data() with the \c{application/x-qabstractitemmodeldatalist} MIME
+ type and streaming out the items one by one.
+ \endomit
+
+ When implementing drag and drop support in a custom model, it is possible to
+ export items of data in specialized formats by reimplementing the following
+ function:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::mimeData()}{mimeData()}
+ \li This function can be reimplemented to return data in formats other
+ than the default \c{application/x-qabstractitemmodeldatalist} internal
+ MIME type.
+
+ Subclasses can obtain the default QMimeData object from the base class
+ and add data to it in additional formats.
+ \endtable
+
+ For many models, it is useful to provide the contents of items in common format
+ represented by MIME types such as \c{text/plain} and \c{image/png}. Note that
+ images, colors and HTML documents can easily be added to a QMimeData object with
+ the QMimeData::setImageData(), QMimeData::setColorData(), and
+ QMimeData::setHtml() functions.
+
+ \section3 Accepting dropped data
+
+ When a drag and drop operation is performed over a view, the underlying model is
+ queried to determine which types of operation it supports and the MIME types
+ it can accept. This information is provided by the
+ QAbstractItemModel::supportedDropActions() and QAbstractItemModel::mimeTypes()
+ functions. Models that do not override the implementations provided by
+ QAbstractItemModel support copy operations and the default internal MIME type
+ for items.
+
+ When serialized item data is dropped onto a view, the data is inserted into
+ the current model using its implementation of QAbstractItemModel::dropMimeData().
+ The default implementation of this function will never overwrite any data in the
+ model; instead, it tries to insert the items of data either as siblings of an
+ item, or as children of that item.
+
+ To take advantage of QAbstractItemModel's default implementation for the built-in
+ MIME type, new models must provide reimplementations of the following functions:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::insertRows()}{insertRows()}
+ \li {1, 2} These functions enable the model to automatically insert new data using
+ the existing implementation provided by QAbstractItemModel::dropMimeData().
+ \row \li \l{QAbstractItemModel::insertColumns()}{insertColumns()}
+ \row \li \l{QAbstractItemModel::setData()}{setData()}
+ \li Allows the new rows and columns to be populated with items.
+ \row \li \l{QAbstractItemModel::setItemData()}{setItemData()}
+ \li This function provides more efficient support for populating new items.
+ \endtable
+
+ To accept other forms of data, these functions must be reimplemented:
+
+ \table 90%
+ \row \li \l{QAbstractItemModel::supportedDropActions()}{supportedDropActions()}
+ \li Used to return a combination of \l{Qt::DropActions}{drop actions},
+ indicating the types of drag and drop operations that the model accepts.
+ \row \li \l{QAbstractItemModel::mimeTypes()}{mimeTypes()}
+ \li Used to return a list of MIME types that can be decoded and handled by
+ the model. Generally, the MIME types that are supported for input into
+ the model are the same as those that it can use when encoding data for
+ use by external components.
+ \row \li \l{QAbstractItemModel::dropMimeData()}{dropMimeData()}
+ \li Performs the actual decoding of the data transferred by drag and drop
+ operations, determines where in the model it will be set, and inserts
+ new rows and columns where necessary. How this function is implemented
+ in subclasses depends on the requirements of the data exposed by each
+ model.
+ \endtable
+
+ If the implementation of the \l{QAbstractItemModel::dropMimeData()}{dropMimeData()}
+ function changes the dimensions of a model by inserting or removing rows or
+ columns, or if items of data are modified, care must be taken to ensure that
+ all relevant signals are emitted. It can be useful to simply call
+ reimplementations of other functions in the subclass, such as
+ \l{QAbstractItemModel::setData()}{setData()},
+ \l{QAbstractItemModel::insertRows()}{insertRows()}, and
+ \l{QAbstractItemModel::insertColumns()}{insertColumns()}, to ensure that the
+ model behaves consistently.
+
+ In order to ensure drag operations work properly, it is important to
+ reimplement the following functions that remove data from the model:
+
+ \list
+ \li \l{QAbstractItemModel::}{removeRows()}
+ \li \l{QAbstractItemModel::}{removeRow()}
+ \li \l{QAbstractItemModel::}{removeColumns()}
+ \li \l{QAbstractItemModel::}{removeColumn()}
+ \endlist
+
+ For more information about drag and drop with item views, refer to
+ \l{Using drag and drop with item views}.
+
+ \section3 Convenience views
+
+ The convenience views (QListWidget, QTableWidget, and QTreeWidget) override
+ the default drag and drop functionality to provide less flexible, but more
+ natural behavior that is appropriate for many applications. For example,
+ since it is more common to drop data into cells in a QTableWidget, replacing
+ the existing contents with the data being transferred, the underlying model
+ will set the data of the target items rather than insert new rows and columns
+ into the model. For more information on drag and drop in convenience views,
+ you can see \l{Using drag and drop with item views}.
+
+ \section2 Performance optimization for large amounts of data
+
+ The \l{QAbstractItemModel::}{canFetchMore()} function checks if the parent
+ has more data available and returns true or false accordingly. The
+ \l{QAbstractItemModel::}{fetchMore()} function fetches data based on the
+ parent specified. Both these functions can be combined, for example, in a
+ database query involving incremental data to populate a QAbstractItemModel.
+ We reimplement \l{QAbstractItemModel::}{canFetchMore()} to indicate if there
+ is more data to be fetched and \l{QAbstractItemModel::}{fetchMore()} to
+ populate the model as required.
+
+ Another example would be dynamically populated tree models, where we
+ reimplement \l{QAbstractItemModel::}{fetchMore()} when a branch in the tree
+ model is expanded.
+
+ If your reimplementation of \l{QAbstractItemModel::}{fetchMore()} adds rows
+ to the model, you need to call \l{QAbstractItemModel::}{beginInsertRows()}
+ and \l{QAbstractItemModel::}{endInsertRows()}. Also, both
+ \l{QAbstractItemModel::}{canFetchMore()} and \l{QAbstractItemModel::}
+ {fetchMore()} must be reimplemented as their default implementation returns
+ false and does nothing.
+
+ \keyword Model/View Classes
+ \section1 The model/view classes
+
+ These classes use the model/view design pattern in which the
+ underlying data (in the model) is kept separate from the way the
+ data is presented and manipulated by the user (in the view).
+
+ \annotatedlist model-view
+
+ \section1 Related examples
+
+ \list
+ \li \l{itemviews/dirview}{Dir View}
+ \li \l{itemviews/spinboxdelegate}{Spin Box Delegate}
+ \li \l{itemviews/pixelator}{Pixelator}
+ \li \l{itemviews/simpletreemodel}{Simple Tree Model}
+ \li \l{itemviews/chart}{Chart}
+ \endlist
+*/
diff --git a/doc/src/widgets/modelview.qdoc b/src/widgets/doc/src/modelview.qdoc
index fdd25def31..97432b4df4 100644
--- a/doc/src/widgets/modelview.qdoc
+++ b/src/widgets/doc/src/modelview.qdoc
@@ -201,7 +201,7 @@
add editing capabilities later.
(file source: examples/tutorials/modelview/1_readonly/main.cpp)
- \snippet examples/tutorials/modelview/1_readonly/main.cpp Quoting ModelView Tutorial
+ \snippet tutorials/modelview/1_readonly/main.cpp Quoting ModelView Tutorial
We have the usual \l {modelview-part2-main-cpp.html}{main()} function:
@@ -222,12 +222,12 @@
is easier to use than the more general QAbstractItemModel.
(file source: examples/tutorials/modelview/1_readonly/mymodel.h)
- \snippet examples/tutorials/modelview/1_readonly/mymodel.h Quoting ModelView Tutorial
+ \snippet tutorials/modelview/1_readonly/mymodel.h Quoting ModelView Tutorial
QAbstractTableModel requires the implementation of three abstract methods.
(file source: examples/tutorials/modelview/1_readonly/mymodel.cpp)
- \snippet examples/tutorials/modelview/1_readonly/mymodel.cpp Quoting ModelView Tutorial
+ \snippet tutorials/modelview/1_readonly/mymodel.cpp Quoting ModelView Tutorial
The number of rows and columns is provided by
\l{QAbstractItemModel::rowCount()}{MyModel::rowCount()} and
@@ -263,7 +263,7 @@
role to return different pieces of information depending on its value.
(file source: examples/tutorials/modelview/2_formatting/mymodel.cpp)
- \snippet examples/tutorials/modelview/2_formatting/mymodel.cpp Quoting ModelView Tutorial
+ \snippet tutorials/modelview/2_formatting/mymodel.cpp Quoting ModelView Tutorial
Each formatting property will be requested from the model with a separate
call to the \l{QAbstractItemModel::data()}{data()} method. The \c role
@@ -311,7 +311,7 @@
stream. In our small example, \l{QAbstractItemModel::}{data()} will be
called 42 times.
Each time you hover the cursor over the field,
- \l{QAbstractItemModel::}{data()} will be called again \mdash 7 times for
+ \l{QAbstractItemModel::}{data()} will be called again -- 7 times for
each cell. That's why it is important to make sure that your data is
available when \l{QAbstractItemModel::}{data()} is invoked and expensive
lookup operations are cached.
@@ -324,7 +324,7 @@
second because we are showing the current time.
(file source: examples/tutorials/modelview/3_changingmodel/mymodel.cpp)
- \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_QVariant
+ \snippet tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_QVariant
Something is missing to make the clock tick. We need to tell the view every
second that the time has changed and that it needs to be read again. We do
@@ -332,12 +332,12 @@
connect its timeout signal.
(file source: examples/tutorials/modelview/3_changingmodel/mymodel.cpp)
- \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_a
+ \snippet tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_a
Here is the corresponding slot:
(file source: examples/tutorials/modelview/3_changingmodel/mymodel.cpp)
- \snippet examples/tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_b
+ \snippet tutorials/modelview/3_changingmodel/mymodel.cpp quoting mymodel_b
We ask the view to read the data in the top left cell again by emitting the
\l{QAbstractItemModel::}{dataChanged()} signal. Note that we did not
@@ -353,7 +353,7 @@
\l{QAbstractItemModel::headerData()}{headerData()} method:
(file source: examples/tutorials/modelview/4_headers/mymodel.cpp)
- \snippet examples/tutorials/modelview/4_headers/mymodel.cpp quoting mymodel_c
+ \snippet tutorials/modelview/4_headers/mymodel.cpp quoting mymodel_c
Note that method \l{QAbstractItemModel::headerData()}{headerData()} also has
a parameter role which has the same meaning as in
@@ -372,7 +372,7 @@
\l{QAbstractItemModel::}{setData()} and \l{QAbstractItemModel::}{flags()}.
(file source: examples/tutorials/modelview/5_edit/mymodel.h)
- \snippet examples/tutorials/modelview/5_edit/mymodel.h Quoting ModelView Tutorial
+ \snippet tutorials/modelview/5_edit/mymodel.h Quoting ModelView Tutorial
We use \c the two-dimensional array QString \c m_gridData to store our data.
This makes \c m_gridData the core of \c MyModel. The rest of \c MyModel acts
@@ -381,7 +381,7 @@
makes it possible to transfer the modified text to the window title.
(file source: examples/tutorials/modelview/5_edit/mymodel.cpp)
- \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_e
+ \snippet tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_e
\l{QAbstractItemModel::setData()}{setData()} will be called each time the
user edits a cell. The \c index parameter tells us which field has been
@@ -392,7 +392,7 @@
\l Qt::CheckStateRole.
(file source: examples/tutorials/modelview/5_edit/mymodel.cpp)
- \snippet examples/tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_f
+ \snippet tutorials/modelview/5_edit/mymodel.cpp quoting mymodel_f
Various properties of a cell can be adjusted with
\l{QAbstractItemModel::flags()}{flags()}.
@@ -436,7 +436,7 @@
\image tree_2_with_algorithm.png
(file source: examples/tutorials/modelview/6_treeview/mainwindow.cpp)
- \snippet examples/tutorials/modelview/6_treeview/mainwindow.cpp Quoting ModelView Tutorial
+ \snippet tutorials/modelview/6_treeview/mainwindow.cpp Quoting ModelView Tutorial
We simply instantiate a QStandardItemModel and add a couple of
\l{QStandardItem}{QStandardItems} to the constructor. We can then make a
@@ -454,7 +454,7 @@
So let's create a couple of items:
(file source: examples/tutorials/modelview/7_selections/mainwindow.cpp)
- \snippet examples/tutorials/modelview/7_selections/mainwindow.cpp quoting modelview_a
+ \snippet tutorials/modelview/7_selections/mainwindow.cpp quoting modelview_a
Views manage selections within a separate selection model, which can be
retrieved with the \l{QAbstractItemView::}{selectionModel()} method. We
@@ -462,7 +462,7 @@
\l{QAbstractItemView::}{selectionChanged()} signal.
(file source: examples/tutorials/modelview/7_selections/mainwindow.cpp)
- \snippet examples/tutorials/modelview/7_selections/mainwindow.cpp quoting modelview_b
+ \snippet tutorials/modelview/7_selections/mainwindow.cpp quoting modelview_b
We get the model index that corresponds to the selection by calling
\l{QItemSelectionModel::currentIndex()}{treeView->selectionModel()->currentIndex()}
diff --git a/doc/src/widgets/qtwidgets.qdoc b/src/widgets/doc/src/qtwidgets.qdoc
index 4be460a2ab..9267b0fb44 100644
--- a/doc/src/widgets/qtwidgets.qdoc
+++ b/src/widgets/doc/src/qtwidgets.qdoc
@@ -35,11 +35,11 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtwidgets.cpp 1
+ \snippet code/doc_src_qtwidgets.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtwidgets.pro 0
+ \snippet code/doc_src_qtwidgets.pro 0
*/
diff --git a/doc/src/widgets/widgets-and-layouts/focus.qdoc b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
index 60f05948b4..60f05948b4 100644
--- a/doc/src/widgets/widgets-and-layouts/focus.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-cde.qdoc
index a74cab0509..a74cab0509 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-cde.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-cde.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
index bed6d0ca40..bed6d0ca40 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-cleanlooks.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc
index 820f0b4140..820f0b4140 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-gtk.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
index 488a3f7665..488a3f7665 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-macintosh.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-motif.qdoc
index 5cbffc5516..5cbffc5516 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-motif.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-motif.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-plastique.qdoc
index 359fac8018..359fac8018 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-plastique.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-plastique.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc
index b118c845c6..b118c845c6 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-windows.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
index db1a7cee90..db1a7cee90 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-windowsvista.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
index 2ade5681e2..2ade5681e2 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery-windowsxp.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/gallery.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc
index a2f4db5a7b..a2f4db5a7b 100644
--- a/doc/src/widgets/widgets-and-layouts/gallery.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc
diff --git a/doc/src/widgets/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index 6e1a5f70e1..807f9ae8f9 100644
--- a/doc/src/widgets/widgets-and-layouts/layout.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
@@ -118,25 +118,25 @@
The following code creates a QHBoxLayout that manages the geometry of five
\l{QPushButton}{QPushButtons}, as shown on the first screenshot above:
- \snippet doc/src/snippets/layouts/layouts.cpp 0
- \snippet doc/src/snippets/layouts/layouts.cpp 1
- \snippet doc/src/snippets/layouts/layouts.cpp 2
+ \snippet layouts/layouts.cpp 0
+ \snippet layouts/layouts.cpp 1
+ \snippet layouts/layouts.cpp 2
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 3
- \snippet doc/src/snippets/layouts/layouts.cpp 4
- \snippet doc/src/snippets/layouts/layouts.cpp 5
+ \snippet layouts/layouts.cpp 3
+ \snippet layouts/layouts.cpp 4
+ \snippet layouts/layouts.cpp 5
The code for QVBoxLayout is identical, except the line where the layout is
created. The code for QGridLayout is a bit different, because we need to
specify the row and column position of the child widget:
- \snippet doc/src/snippets/layouts/layouts.cpp 12
- \snippet doc/src/snippets/layouts/layouts.cpp 13
- \snippet doc/src/snippets/layouts/layouts.cpp 14
+ \snippet layouts/layouts.cpp 12
+ \snippet layouts/layouts.cpp 13
+ \snippet layouts/layouts.cpp 14
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 15
- \snippet doc/src/snippets/layouts/layouts.cpp 16
- \snippet doc/src/snippets/layouts/layouts.cpp 17
+ \snippet layouts/layouts.cpp 15
+ \snippet layouts/layouts.cpp 16
+ \snippet layouts/layouts.cpp 17
The third QPushButton spans 2 columns. This is possible by specifying 2 as
the fifth argument to QGridLayout::addWidget().
@@ -147,13 +147,13 @@
QFormLayout to place three \l{QPushButton}{QPushButtons} and a corresponding
QLineEdit on a row.
- \snippet doc/src/snippets/layouts/layouts.cpp 18
- \snippet doc/src/snippets/layouts/layouts.cpp 19
- \snippet doc/src/snippets/layouts/layouts.cpp 20
+ \snippet layouts/layouts.cpp 18
+ \snippet layouts/layouts.cpp 19
+ \snippet layouts/layouts.cpp 20
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 21
- \snippet doc/src/snippets/layouts/layouts.cpp 22
- \snippet doc/src/snippets/layouts/layouts.cpp 23
+ \snippet layouts/layouts.cpp 21
+ \snippet layouts/layouts.cpp 22
+ \snippet layouts/layouts.cpp 23
\section2 Tips for Using Layouts
@@ -319,16 +319,16 @@
\section2 The Header File (\c card.h)
- \snippet doc/src/snippets/code/doc_src_layout.cpp 0
+ \snippet code/doc_src_layout.cpp 0
\section2 The Implementation File (\c card.cpp)
- \snippet doc/src/snippets/code/doc_src_layout.cpp 1
+ \snippet code/doc_src_layout.cpp 1
First we define \c{count()} to fetch the number of items in the list.
- \snippet doc/src/snippets/code/doc_src_layout.cpp 2
+ \snippet code/doc_src_layout.cpp 2
Then we define two functions that iterate over the layout: \c{itemAt()}
and \c{takeAt()}. These functions are used internally by the layout system
@@ -341,7 +341,7 @@
structure, we may have to spend more effort defining a linear order for the
items.
- \snippet doc/src/snippets/code/doc_src_layout.cpp 3
+ \snippet code/doc_src_layout.cpp 3
\c{addItem()} implements the default placement strategy for layout items.
This function must be implemented. It is used by QLayout::add(), by the
@@ -351,26 +351,26 @@
QGridLayout::addItem(), QGridLayout::addWidget(), and
QGridLayout::addLayout().
- \snippet doc/src/snippets/code/doc_src_layout.cpp 4
+ \snippet code/doc_src_layout.cpp 4
The layout takes over responsibility of the items added. Since QLayoutItem
does not inherit QObject, we must delete the items manually. In the
destructor, we remove each item from the list using \c{takeAt()}, and
then delete it.
- \snippet doc/src/snippets/code/doc_src_layout.cpp 5
+ \snippet code/doc_src_layout.cpp 5
The \c{setGeometry()} function actually performs the layout. The rectangle
supplied as an argument does not include \c{margin()}. If relevant, use
\c{spacing()} as the distance between items.
- \snippet doc/src/snippets/code/doc_src_layout.cpp 6
+ \snippet code/doc_src_layout.cpp 6
\c{sizeHint()} and \c{minimumSize()} are normally very similar in
implementation. The sizes returned by both functions should include
\c{spacing()}, but not \c{margin()}.
- \snippet doc/src/snippets/code/doc_src_layout.cpp 7
+ \snippet code/doc_src_layout.cpp 7
\section2 Further Notes
diff --git a/doc/src/widgets/widgets-and-layouts/styles.qdoc b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
index b9e3a30333..d6706d7994 100644
--- a/doc/src/widgets/widgets-and-layouts/styles.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
@@ -283,21 +283,21 @@
pointer type is correct. If the object isn't of the right type,
qstyleoption_cast() returns 0. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 0
+ \snippet code/doc_src_qt4-styles.cpp 0
The following code snippet illustrates how to use QStyle to
draw the focus rectangle from a custom widget's paintEvent():
- \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 1
+ \snippet code/doc_src_qt4-styles.cpp 1
The next example shows how to derive from an existing style to
customize the look of a graphical element:
- \snippet doc/src/snippets/customstyle/customstyle.h 0
+ \snippet customstyle/customstyle.h 0
\codeline
- \snippet doc/src/snippets/customstyle/customstyle.cpp 2
- \snippet doc/src/snippets/customstyle/customstyle.cpp 3
- \snippet doc/src/snippets/customstyle/customstyle.cpp 4
+ \snippet customstyle/customstyle.cpp 2
+ \snippet customstyle/customstyle.cpp 3
+ \snippet customstyle/customstyle.cpp 4
\section2 QStyle Functions
@@ -542,7 +542,7 @@
We start with a look at how QCheckBox builds it style option,
which is QStyleOptionButton for checkboxes:
- \snippet doc/src/snippets/code/doc_src_styles.cpp 0
+ \snippet code/doc_src_styles.cpp 0
First we let QStyleOption set up the option with the information
that is common for all widgets with \c initFrom(). We will look at
@@ -561,7 +561,7 @@
attributes that are common for all widgets. We print its
implementation here:
- \snippet doc/src/snippets/code/doc_src_styles.cpp 1
+ \snippet code/doc_src_styles.cpp 1
The State_Enabled is set when the widget is enabled. When the
widget has focus the State_HasFocus flag is set. Equally, the
@@ -625,7 +625,7 @@
notably, it wraps the methods in QStyle used for painting. The
QCheckBox draws itself as follows:
- \snippet doc/src/snippets/code/doc_src_styles.cpp 2
+ \snippet code/doc_src_styles.cpp 2
QCommonStyle handles the CE_CheckBox element. The QCheckBox
has two sub elements: SE_CheckBoxIndicator (the checked indicator)
@@ -633,7 +633,7 @@
checkbox label). QCommonStyle also implements these sub element
bounding rectangles. We have a look at the QCommonStyle code:
- \snippet doc/src/snippets/code/doc_src_styles.cpp 3
+ \snippet code/doc_src_styles.cpp 3
As can be seen from the code extract, the common style gets
the bounding rectangles of the two sub elements of
@@ -644,7 +644,7 @@
handles CE_CheckboxLabel. We will examine each implementation and
start with CE_CheckBoxLabel:
- \snippet doc/src/snippets/code/doc_src_styles.cpp 4
+ \snippet code/doc_src_styles.cpp 4
\l{QStyle::}{visualAlignment()} adjusts the alignment of text
according to the layout direction. We then draw an icon if it
@@ -663,7 +663,7 @@
We take a look at the java implementation
of CE_CheckBoxIndicator in \c drawControl():
- \snippet doc/src/snippets/javastyle.cpp 0
+ \snippet javastyle.cpp 0
We first save the state of the painter. This is not always
necessary but in this case the QWindowsStyle needs the painter in
@@ -682,7 +682,7 @@
here if the widget is disabled. We would then have to use
another image with the indicator in the disabled color.
- \snippet doc/src/snippets/javastyle.cpp 1
+ \snippet javastyle.cpp 1
We have seen how check boxes are styled in the java style from the
widget gets a paint request to the style is finished painting. To
diff --git a/doc/src/widgets/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index eaedb847c8..3b31efbdfc 100644
--- a/doc/src/widgets/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -73,7 +73,7 @@
\l{QLineEdit}s should use yellow as their background color, and
all \l{QCheckBox}es should use red as the text color:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 0
+ \snippet code/doc_src_stylesheet.qdoc 0
For this kind of customization, style sheets are much more
powerful than QPalette. For example, it might be tempting to set
@@ -157,7 +157,7 @@
the \e{declaration} specifies which properties should be set on
the widget. For example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 1
+ \snippet code/doc_src_stylesheet.qdoc 1
In the above style rule, \c QPushButton is the selector and \c{{
color: red }} is the declaration. The rule specifies that
@@ -174,17 +174,17 @@
using commas (\c{,}) to separate the selectors. For example,
the rule
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 2
+ \snippet code/doc_src_stylesheet.qdoc 2
is equivalent to this sequence of three rules:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 3
+ \snippet code/doc_src_stylesheet.qdoc 3
The declaration part of a style rule is a list of
\tt{\e{property}: \e{value}} pairs, enclosed in braces (\c{{}})
and separated with semicolons. For example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 4
+ \snippet code/doc_src_stylesheet.qdoc 4
See the \l{List of Properties} section below for the list of
properties provided by Qt widgets.
@@ -271,7 +271,7 @@
possible to restrict the application of a rule to specific widget
subcontrols. For example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 5
+ \snippet code/doc_src_stylesheet.qdoc 5
The above rule styles the drop-down button of all \l{QComboBox}es.
Although the double-colon (\c{::}) syntax is reminiscent of CSS3
@@ -295,7 +295,7 @@
rectangle of the QComboBox instead of the default Padding rectangle, we
can specify:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 6
+ \snippet code/doc_src_stylesheet.qdoc 6
The alignment of the drop-down within the Margin rectangle is changed
using \l{Qt Style Sheets Reference#subcontrol-position-prop}
@@ -314,7 +314,7 @@
pressed, we might like the arrow inside to be offset to give a
"pressed" effect. To achieve this, we can specify:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 7
+ \snippet code/doc_src_stylesheet.qdoc 7
The absolute positioning scheme
(\l{Qt Style Sheets Reference#position-prop}{position} : absolute),
@@ -340,34 +340,34 @@
(\c{:}) in between. For example, the following rule applies when
the mouse hovers over a QPushButton:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 8
+ \snippet code/doc_src_stylesheet.qdoc 8
Pseudo-states can be negated using the exclamation operator. For
example, the following rule applies when the mouse does not hover
over a QRadioButton:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 9
+ \snippet code/doc_src_stylesheet.qdoc 9
Pseudo-states can be chained, in which case a logical AND is
implied. For example, the following rule applies to when the
mouse hovers over a checked QCheckBox:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 10
+ \snippet code/doc_src_stylesheet.qdoc 10
Negated Pseudo-states may appear in Pseudo-state chains. For example,
the following rule applies when the mouse hovers over a QPushButton
that is not pressed:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 11
+ \snippet code/doc_src_stylesheet.qdoc 11
If needed, logical OR can be expressed using the comma operator:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 12
+ \snippet code/doc_src_stylesheet.qdoc 12
Pseudo-states can appear in combination with subcontrols. For
example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 13
+ \snippet code/doc_src_stylesheet.qdoc 13
See the \l{List of Pseudo-States} section below for the list of
pseudo-states provided by Qt widgets.
@@ -378,7 +378,7 @@
properties with different values. Consider the following style
sheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 14
+ \snippet code/doc_src_stylesheet.qdoc 14
Both rules match QPushButton instances called \c okButton and
there is a conflict for the \c color property. To resolve this
@@ -393,27 +393,27 @@
sheet specifies that a \l{QPushButton} should have white text
when the mouse is hovering over it, otherwise red text:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 15
+ \snippet code/doc_src_stylesheet.qdoc 15
Here's a tricky one:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 16
+ \snippet code/doc_src_stylesheet.qdoc 16
Here, both selectors have the same specificity, so if the mouse
hovers over the button while it is enabled, the second rule takes
precedence. If we want the text to be white in that case, we can
reorder the rules like this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 17
+ \snippet code/doc_src_stylesheet.qdoc 17
Alternatively, we can make the first rule more specific:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 18
+ \snippet code/doc_src_stylesheet.qdoc 18
A similar issue arises in conjunction with Type Selectors.
Consider the following example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 19
+ \snippet code/doc_src_stylesheet.qdoc 19
Both rules apply to QPushButton instances (since QPushButton
inherits QAbstractButton) and there is a conflict for the
@@ -447,7 +447,7 @@
\e{Some examples:}
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 20
+ \snippet code/doc_src_stylesheet.qdoc 20
\endquotation
\section1 Cascading
@@ -469,11 +469,11 @@
sheet. Consider the following example. First, we set a style
sheet on the QApplication:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 21
+ \snippet code/doc_src_stylesheet.cpp 21
Then we set a style sheet on a QPushButton object:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 22
+ \snippet code/doc_src_stylesheet.cpp 22
The style sheet on the QPushButton forces the QPushButton (and
any child widget) to have blue text, in spite of the more
@@ -481,7 +481,7 @@
The result would have been the same if we had written
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 23
+ \snippet code/doc_src_stylesheet.cpp 23
except that if the QPushButton had children (which is unlikely),
the style sheet would have no impact on them.
@@ -500,14 +500,14 @@
For example, consider a QPushButton inside a QGroupBox:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 24
+ \snippet code/doc_src_stylesheet.cpp 24
The QPushButton does not have an explicit color set. Hence, instead
of inheriting color of its parent QGroupBox, it has the system color.
If we want to set the color on a QGroupBox and its children,
we can write:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 25
+ \snippet code/doc_src_stylesheet.cpp 25
In contrast, setting a font and propagate using QWidget::setFont() and
QWidget::setPalette() propagates to child widgets.
@@ -517,7 +517,7 @@
The Type Selector can be used to style widgets of a particular type. For
example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 26
+ \snippet code/doc_src_stylesheet.cpp 26
Qt Style Sheet uses QObject::className() of the widget to determine
when to apply the Type Selector. When custom widgets are inside namespaces,
@@ -526,7 +526,7 @@
when using the Type Selector for widgets inside namespaces, we must
replace the "::" with "--". For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 27
+ \snippet code/doc_src_stylesheet.cpp 27
\section1 Setting QObject properties
@@ -534,7 +534,7 @@
can be set using the qproperty-<property name> syntax.
For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 28
+ \snippet code/doc_src_stylesheet.qdoc 28
If the property references an enum declared with Q_ENUMS, you should
reference its constants by name, i.e., not their numeric value.
@@ -982,7 +982,7 @@
because, by default, the QPushButton draws a native border which completely
overlaps the background-color. For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 30
+ \snippet code/doc_src_stylesheet.qdoc 30
See \l{Qt Style Sheets Examples#Customizing QPushButton}{Customizing QPushButton}
for an example.
@@ -1260,7 +1260,7 @@
because, by default, the QToolButton draws a native border which completely
overlaps the background-color. For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 31
+ \snippet code/doc_src_stylesheet.qdoc 31
See \l{Qt Style Sheets Examples#Customizing QToolButton}{Customizing QToolButton}
for an example.
@@ -1328,7 +1328,7 @@
If you subclass from QWidget, you need to provide a paintEvent for your
custom QWidget as below:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 32
+ \snippet code/doc_src_stylesheet.cpp 32
The above code is a no-operation if there is no stylesheet set.
@@ -1364,7 +1364,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 33
+ \snippet code/doc_src_stylesheet.qdoc 33
See also \l{Qt Style Sheets Reference#background-prop}{background} and
\l{#selection-background-color-prop}{selection-background-color}.
@@ -1384,7 +1384,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 34
+ \snippet code/doc_src_stylesheet.qdoc 34
Often, it is required to set a fill pattern similar to the styles
@@ -1395,7 +1395,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 35
+ \snippet code/doc_src_stylesheet.qdoc 35
See also \l{#background-origin-prop}{background-origin},
\l{#selection-background-color-prop}{selection-background-color},
@@ -1410,7 +1410,7 @@
Examples:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 36
+ \snippet code/doc_src_stylesheet.qdoc 36
\row
\li \c background-image \target background-image-prop
@@ -1421,7 +1421,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 37
+ \snippet code/doc_src_stylesheet.qdoc 37
\row
\li \c background-repeat \target background-repeat-prop
@@ -1434,7 +1434,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 38
+ \snippet code/doc_src_stylesheet.qdoc 38
\row
\li \c background-position
@@ -1447,7 +1447,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 39
+ \snippet code/doc_src_stylesheet.qdoc 39
\row
\li \b{\c background-attachment} \target background-attachment-prop
@@ -1458,7 +1458,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 40
+ \snippet code/doc_src_stylesheet.qdoc 40
See also \l{Qt Style Sheets Reference#background-prop}{background}
@@ -1481,7 +1481,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 41
+ \snippet code/doc_src_stylesheet.qdoc 41
See also \l{Qt Style Sheets Reference#background-prop}{background},
\l{#background-origin-prop}{background-origin} and \l{The Box Model}.
@@ -1503,7 +1503,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 42
+ \snippet code/doc_src_stylesheet.qdoc 42
See also \l{Qt Style Sheets Reference#background-prop}{background} and
\l{The Box Model}.
@@ -1523,7 +1523,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 43
+ \snippet code/doc_src_stylesheet.qdoc 43
\row
\li \c border-top
@@ -1573,7 +1573,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 44
+ \snippet code/doc_src_stylesheet.qdoc 44
See also \l{Qt Style Sheets Reference#border-style-prop}{border-style},
\l{Qt Style Sheets Reference#border-width-prop}{border-width},
@@ -1638,7 +1638,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 45
+ \snippet code/doc_src_stylesheet.qdoc 45
See also \l{Qt Style Sheets Reference#border-width-prop}{border-width} and
\l{The Box Model}.
@@ -1681,7 +1681,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 46
+ \snippet code/doc_src_stylesheet.qdoc 46
See also \l{#border-color-prop}{border-color},
\l{Qt Style Sheets Reference#border-style-prop}{border-style},
@@ -1722,7 +1722,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 47
+ \snippet code/doc_src_stylesheet.qdoc 47
See also \l{#border-color-prop}{border-color},
\l{#border-radius-prop}{border-radius},
@@ -1766,7 +1766,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 48
+ \snippet code/doc_src_stylesheet.qdoc 48
See also \l{Qt Style Sheets Reference#left-prop}{left}, \l{#right-prop}{right}, and
\l{Qt Style Sheets Reference#top-prop}{top}.
@@ -1787,7 +1787,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 49
+ \snippet code/doc_src_stylesheet.qdoc 49
\row
\li \b{\c color} \target color-prop
@@ -1803,7 +1803,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 50
+ \snippet code/doc_src_stylesheet.qdoc 50
See also \l{Qt Style Sheets Reference#background-prop}{background} and
\l{#selection-color-prop}{selection-color}.
@@ -1819,7 +1819,7 @@
See the \l{Qt Style Sheets Reference#list of icons}{List of Icons}
section for information on how to set icons.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 51
+ \snippet code/doc_src_stylesheet.qdoc 51
\note Styles defining this property must be applied before the
QDialogButtonBox is created; this means that you must apply the
@@ -1837,7 +1837,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 52
+ \snippet code/doc_src_stylesheet.qdoc 52
\endomit
\row
@@ -1855,7 +1855,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 53
+ \snippet code/doc_src_stylesheet.qdoc 53
\row
\li \c font-family
@@ -1864,7 +1864,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 54
+ \snippet code/doc_src_stylesheet.qdoc 54
\row
\li \c font-size
@@ -1874,7 +1874,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 55
+ \snippet code/doc_src_stylesheet.qdoc 55
\row
\li \c font-style
@@ -1883,7 +1883,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 56
+ \snippet code/doc_src_stylesheet.qdoc 56
\row
\li \c font-weight
@@ -1901,7 +1901,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 57
+ \snippet code/doc_src_stylesheet.qdoc 57
\row
\li \b{\c height} \target height-prop
@@ -1918,7 +1918,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 58
+ \snippet code/doc_src_stylesheet.qdoc 58
See also \l{#width-prop}{width}.
@@ -1966,7 +1966,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 59
+ \snippet code/doc_src_stylesheet.qdoc 59
\row
\li \b{\c image-position} \target image-position-prop
@@ -1990,7 +1990,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 60
+ \snippet code/doc_src_stylesheet.qdoc 60
See also \l{#right-prop}{right}, \l{Qt Style Sheets Reference#top-prop}{top}, and
\l{#bottom-prop}{bottom}.
@@ -2006,7 +2006,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 61
+ \snippet code/doc_src_stylesheet.qdoc 61
\row
\li \b{\c margin} \target margin-prop
@@ -2025,7 +2025,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 62
+ \snippet code/doc_src_stylesheet.qdoc 62
See also \l{Qt Style Sheets Reference#padding-prop}{padding},
\l{#spacing-prop}{spacing}, and \l{The Box Model}.
@@ -2066,7 +2066,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 63
+ \snippet code/doc_src_stylesheet.qdoc 63
See also \l{#max-width-prop}{max-width}.
@@ -2086,7 +2086,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 64
+ \snippet code/doc_src_stylesheet.qdoc 64
See also \l{#max-height-prop}{max-height}.
@@ -2104,7 +2104,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 65
+ \snippet code/doc_src_stylesheet.qdoc 65
\row
\li \b{\c min-height} \target min-height-prop
@@ -2125,7 +2125,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 66
+ \snippet code/doc_src_stylesheet.qdoc 66
See also \l{#min-width-prop}{min-width}.
@@ -2148,7 +2148,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 67
+ \snippet code/doc_src_stylesheet.qdoc 67
See also \l{#min-height-prop}{min-height}.
@@ -2165,7 +2165,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 68
+ \snippet code/doc_src_stylesheet.qdoc 68
\row
\li \b{\c padding} \target padding-prop
@@ -2184,7 +2184,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 69
+ \snippet code/doc_src_stylesheet.qdoc 69
See also \l{#margin-prop}{margin},
\l{#spacing-prop}{spacing}, and \l{The Box Model}.
@@ -2243,7 +2243,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 70
+ \snippet code/doc_src_stylesheet.qdoc 70
See also \l{Qt Style Sheets Reference#left-prop}{left}, \l{Qt Style Sheets Reference#top-prop}{top}, and
\l{#bottom-prop}{bottom}.
@@ -2262,7 +2262,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 71
+ \snippet code/doc_src_stylesheet.qdoc 71
See also \l{#selection-color-prop}{selection-color} and
\l{Qt Style Sheets Reference#background-prop}{background}.
@@ -2281,7 +2281,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 72
+ \snippet code/doc_src_stylesheet.qdoc 72
See also
\l{#selection-background-color-prop}{selection-background-color}
@@ -2300,7 +2300,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 73
+ \snippet code/doc_src_stylesheet.qdoc 73
\row
\li \b{\c spacing*} \target spacing-prop
@@ -2315,7 +2315,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 74
+ \snippet code/doc_src_stylesheet.qdoc 74
See also \l{Qt Style Sheets Reference#padding-prop}{padding} and
\l{#margin-prop}{margin}.
@@ -2331,7 +2331,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 75
+ \snippet code/doc_src_stylesheet.qdoc 75
See also
\l{Qt Style Sheets Reference#subcontrol-position-prop}{subcontrol-position}.
@@ -2348,7 +2348,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 76
+ \snippet code/doc_src_stylesheet.qdoc 76
See also
\l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}.
@@ -2363,7 +2363,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 77
+ \snippet code/doc_src_stylesheet.qdoc 77
This property is currently supported only by QPushButton
and QProgressBar.
@@ -2392,7 +2392,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 78
+ \snippet code/doc_src_stylesheet.qdoc 78
See also \l{Qt Style Sheets Reference#left-prop}{left}, \l{#right-prop}{right}, and
\l{#bottom-prop}{bottom}.
@@ -2412,7 +2412,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 79
+ \snippet code/doc_src_stylesheet.qdoc 79
See also \l{#height-prop}{height}.
@@ -2671,7 +2671,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 80
+ \snippet code/doc_src_stylesheet.qdoc 80
\row
\li \b Attachment \target Attachment
@@ -2695,7 +2695,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 81
+ \snippet code/doc_src_stylesheet.qdoc 81
\row
\li \b Border \target Border
@@ -2750,7 +2750,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 82
+ \snippet code/doc_src_stylesheet.qdoc 82
\row
\li \b{Box Lengths} \target Box Lengths
@@ -2765,7 +2765,7 @@
Examples:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 83
+ \snippet code/doc_src_stylesheet.qdoc 83
\row
\li \b{Brush} \target Brush
@@ -2791,7 +2791,7 @@
Examples:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 84
+ \snippet code/doc_src_stylesheet.qdoc 84
\note The RGB colors allowed are the same as those allowed with
CSS 2.1, as listed
@@ -2852,7 +2852,7 @@
Examples:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 85
+ \snippet code/doc_src_stylesheet.qdoc 85
\row
\li \b{Icon} \target Icon
@@ -2861,7 +2861,7 @@
\li A list of url, QIcon::Mode and QIcon::State.
Example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 86
+ \snippet code/doc_src_stylesheet.qdoc 86
\row
\li \b{Length} \target Length
@@ -2930,7 +2930,7 @@
in the widget's QPalette.
For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 87
+ \snippet code/doc_src_stylesheet.qdoc 87
\row
\li \b{Radius} \target Radius
@@ -3373,35 +3373,35 @@
\l{QLineEdit}s in an application. This could be achieved like
this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 88
+ \snippet code/doc_src_stylesheet.cpp 88
If we want the property to apply only to the \l{QLineEdit}s that are
children (or grandchildren or grand-grandchildren) of a specific dialog,
we would rather do this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 89
+ \snippet code/doc_src_stylesheet.cpp 89
If we want the property to apply only to one specific QLineEdit,
we can give it a name using QObject::setObjectName() and use an
ID Selector to refer to it:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 90
+ \snippet code/doc_src_stylesheet.cpp 90
Alternatively, we can set the
\l{Qt Style Sheets Reference#background-prop}{background-color} property directly on the
QLineEdit, omitting the selector:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 91
+ \snippet code/doc_src_stylesheet.cpp 91
To ensure a good contrast, we should also specify a suitable
color for the text:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 92
+ \snippet code/doc_src_stylesheet.cpp 92
It might be a good idea to change the colors used for selected
text as well:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 93
+ \snippet code/doc_src_stylesheet.cpp 93
\section2 Customizing Using Dynamic Properties
@@ -3413,7 +3413,7 @@
turns out this is very easy to implement using Qt Style Sheets.
First, we would use the following application-wide style sheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 94
+ \snippet code/doc_src_stylesheet.qdoc 94
This means that every widget whose \c mandatoryField Qt property
is set to true would have a yellow background.
@@ -3422,7 +3422,7 @@
\c mandatoryField property on the fly and set it to true. For
example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 95
+ \snippet code/doc_src_stylesheet.cpp 95
\section2 Customizing a QPushButton Using the Box Model
@@ -3432,7 +3432,7 @@
First, we are tempted to use this style sheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 96
+ \snippet code/doc_src_stylesheet.qdoc 96
However, the result is a boring, flat button with no borders:
@@ -3453,7 +3453,7 @@
Let's improve the situation by specifying a border:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 97
+ \snippet code/doc_src_stylesheet.qdoc 97
\image stylesheet-redbutton2.png A red button with a beige border
@@ -3463,7 +3463,7 @@
enforce a minimum width, round the corners, and specify a larger
font to make the button look nicer:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 98
+ \snippet code/doc_src_stylesheet.qdoc 98
\image stylesheet-redbutton3.png A red button with a round beige border and big, bold text
@@ -3471,7 +3471,7 @@
press it. We can fix this by specifying a slightly different
background color and use a different border style.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 99
+ \snippet code/doc_src_stylesheet.qdoc 99
\section2 Customizing the QPushButton's Menu Indicator Sub-Control
@@ -3480,7 +3480,7 @@
QPushButton::setMenu()) has a menu indicator. Let's customize
the menu indicator for the red push button:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 100
+ \snippet code/doc_src_stylesheet.qdoc 100
By default, the menu indicator is located at the bottom-right
corner of the padding rectangle. We can change this by specifying
@@ -3490,7 +3490,7 @@
\l{Qt Style Sheets Reference#left-prop}{left} to move the indicator by a few pixels. For
example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 101
+ \snippet code/doc_src_stylesheet.qdoc 101
This positions the \c myindicator.png to the center right of the
QPushButton's \l{Qt Style Sheets Reference#padding-prop}{padding} rectangle (see
@@ -3503,24 +3503,24 @@
QLineEdit red by setting the following application-wide
stylesheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 102
+ \snippet code/doc_src_stylesheet.qdoc 102
However, we would like to give a visual indication that a
QLineEdit is read-only by making it appear gray:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 103
+ \snippet code/doc_src_stylesheet.qdoc 103
At some point, our design team comes with the requirement that
all \l{QLineEdit}s in the registration form (with the
\l{QObject::objectName}{object name} \c registrationDialog) to be
brown:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 104
+ \snippet code/doc_src_stylesheet.qdoc 104
A few UI design meetings later, we decide that all our
\l{QDialog}s should have brown colored \l{QLineEdit}s:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 105
+ \snippet code/doc_src_stylesheet.qdoc 105
Quiz: What happens if we have a read-only QLineEdit in a QDialog?
[Hint: The \l{The Style Sheet Syntax#Conflict Resolution}{Conflict Resolution} section above explains
@@ -3535,40 +3535,40 @@
The background of any QAbstractScrollArea (Item views, QTextEdit
and QTextBrowser) can be set using the background properties. For example,
to set a background-image that scrolls with the scroll bar:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 106
+ \snippet code/doc_src_stylesheet.qdoc 106
If the background-image is to be fixed with the viewport:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 107
+ \snippet code/doc_src_stylesheet.qdoc 107
\section2 Customizing QCheckBox
Styling of a QCheckBox is almost identical to styling a QRadioButton. The
main difference is that a tristate QCheckBox has an indeterminate state.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 108
+ \snippet code/doc_src_stylesheet.qdoc 108
\section2 Customizing QComboBox
We will look at an example where the drop down button of a QComboBox
appears "merged" with the combo box frame.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 109
+ \snippet code/doc_src_stylesheet.qdoc 109
The pop-up of the QComboBox is a QAbstractItemView and is styled using
the descendant selector:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 110
+ \snippet code/doc_src_stylesheet.qdoc 110
\section2 Customizing QDockWidget
The title bar and the buttons of a QDockWidget can be customized as
follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 111
+ \snippet code/doc_src_stylesheet.qdoc 111
If one desires to move the dock widget buttons to the left, the following
style sheet can be used:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 112
+ \snippet code/doc_src_stylesheet.qdoc 112
\note To customize the separator (resize handle) of a QDockWidget,
use QMainWindow::separator.
@@ -3577,73 +3577,73 @@
A QFrame is styled using the \l{The Box Model}.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 113
+ \snippet code/doc_src_stylesheet.qdoc 113
\section2 Customizing QGroupBox
Let us look at an example that moves the QGroupBox's title to
the center.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 114
+ \snippet code/doc_src_stylesheet.qdoc 114
For a checkable QGroupBox, use the \{#indicator-sub}{::indicator} subcontrol
and style it exactly like a QCheckBox (i.e)
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 115
+ \snippet code/doc_src_stylesheet.qdoc 115
\section2 Customizing QHeaderView
QHeaderView is customized as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 116
+ \snippet code/doc_src_stylesheet.qdoc 116
\section2 Customizing QLineEdit
The frame of a QLineEdit is styled using the \l{The Box Model}. To
create a line edit with rounded corners, we can set:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 117
+ \snippet code/doc_src_stylesheet.qdoc 117
The password character of line edits that have QLineEdit::Password
echo mode can be set using:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 118
+ \snippet code/doc_src_stylesheet.qdoc 118
The background of a read only QLineEdit can be modified as below:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 119
+ \snippet code/doc_src_stylesheet.qdoc 119
\section2 Customizing QListView
The background color of alternating rows can be customized using the following
style sheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 120
+ \snippet code/doc_src_stylesheet.qdoc 120
To provide a special background when you hover over items, we can use the
\l{item-sub}{::item} subcontrol. For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 121
+ \snippet code/doc_src_stylesheet.qdoc 121
\section2 Customizing QMainWindow
The separator of a QMainWindow can be styled as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 122
+ \snippet code/doc_src_stylesheet.qdoc 122
\section2 Customizing QMenu
Individual items of a QMenu are styled using the 'item' subcontrol as
follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 123
+ \snippet code/doc_src_stylesheet.qdoc 123
For a more advanced customization, use a style sheet as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 124
+ \snippet code/doc_src_stylesheet.qdoc 124
\section2 Customizing QMenuBar
QMenuBar is styled as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 125
+ \snippet code/doc_src_stylesheet.qdoc 125
\section2 Customizing QProgressBar
@@ -3659,13 +3659,13 @@
{border} to grey and the \l{stylesheet-reference.html#chunk-sub}{chunk}
to cerulean.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 126
+ \snippet code/doc_src_stylesheet.qdoc 126
This leaves the \l{stylesheet-reference.html#text-align-prop}
{text-align}, which we customize by positioning the text in the center of
the progress bar.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 127
+ \snippet code/doc_src_stylesheet.qdoc 127
A \l{stylesheet-reference.html#margin-prop}{margin} can be included to
obtain more visible chunks.
@@ -3675,18 +3675,18 @@
In the screenshot above, we use a
\l{stylesheet-reference.html#margin-prop}{margin} of 0.5 pixels.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 128
+ \snippet code/doc_src_stylesheet.qdoc 128
\section2 Customizing QPushButton
A QPushButton is styled as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 129
+ \snippet code/doc_src_stylesheet.qdoc 129
For a QPushButton with a menu, use the
\l{Qt Style Sheets Reference#menu-indicator-sub}{::menu-indicator}
subcontrol.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 130
+ \snippet code/doc_src_stylesheet.qdoc 130
Checkable QPushButton have the \l{Qt Style Sheets Reference#checked-ps}
{:checked} pseudo state set.
@@ -3694,7 +3694,7 @@
\section2 Customizing QRadioButton
The indicator of a QRadioButton can be changed using:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 131
+ \snippet code/doc_src_stylesheet.qdoc 131
\section2 Customizing QScrollBar
@@ -3710,52 +3710,52 @@
The scroll bar above has been styled in aquamarine with a solid grey
border.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 132
+ \snippet code/doc_src_stylesheet.qdoc 132
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 133
+ \snippet code/doc_src_stylesheet.qdoc 133
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 134
+ \snippet code/doc_src_stylesheet.qdoc 134
The \l{stylesheet-reference.html#left-arrow-sub}{left-arrow} and
\l{stylesheet-reference.html#right-arrow-sub}{right-arrow} have a solid grey
border with a white background. As an alternative, you could also embed the
image of an arrow.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 135
+ \snippet code/doc_src_stylesheet.qdoc 135
If you want the scroll buttons of the scroll bar to be placed together
(instead of the edges) like on Mac OS X, you can use the following
stylesheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 136
+ \snippet code/doc_src_stylesheet.qdoc 136
The scroll bar using the above stylesheet looks like this:
\image stylesheet-scrollbar2.png
To customize a vertical scroll bar use a style sheet similar to the following:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 137
+ \snippet code/doc_src_stylesheet.qdoc 137
\section2 Customizing QSizeGrip
QSizeGrip is usually styled by just setting an image.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 138
+ \snippet code/doc_src_stylesheet.qdoc 138
\section2 Customizing QSlider
You can style horizontal slider as below:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 139
+ \snippet code/doc_src_stylesheet.qdoc 139
If you want to change the color of the slider parts before and after the handle, you can use the add-page
and sub-page subcontrols. For example, for a vertical slider:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 140
+ \snippet code/doc_src_stylesheet.qdoc 140
\section2 Customizing QSpinBox
QSpinBox can be completely customized as below (the style sheet has commentary inline):
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 141
+ \snippet code/doc_src_stylesheet.qdoc 141
\section2 Customizing QSplitter
@@ -3764,17 +3764,17 @@
The grip or the handle is customized using the
\l{Qt Style Sheets Reference#handle-sub}{::handle} subcontrol.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 142
+ \snippet code/doc_src_stylesheet.qdoc 142
\section2 Customizing QStatusBar
We can provide a background for the status bar and a border for items
inside the status bar as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 143
+ \snippet code/doc_src_stylesheet.qdoc 143
Note that widgets that have been added to the QStatusBar can be styled
using the descendant declaration (i.e)
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 144
+ \snippet code/doc_src_stylesheet.qdoc 144
\section2 Customizing QTabWidget and QTabBar
@@ -3782,7 +3782,7 @@
For the screenshot above, we need a stylesheet as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 145
+ \snippet code/doc_src_stylesheet.qdoc 145
Often we require the tabs to overlap to look like below:
\image tabWidget-stylesheet2.png
@@ -3791,18 +3791,18 @@
\l{http://www.communitymx.com/content/article.cfm?cid=B0029}
{negative margins}. The resulting stylesheet looks like this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 146
+ \snippet code/doc_src_stylesheet.qdoc 146
To move the tab bar to the center (as below), we require the following stylesheet:
\image tabWidget-stylesheet3.png
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 147
+ \snippet code/doc_src_stylesheet.qdoc 147
The tear indicator and the scroll buttons can be further customized as follows:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 148
+ \snippet code/doc_src_stylesheet.qdoc 148
Since Qt 4.6 the close button can be customized as follow:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 159
+ \snippet code/doc_src_stylesheet.qdoc 159
\section2 Customizing QTableView
@@ -3815,22 +3815,22 @@
\l{stylesheet-reference.html#selection-background-color-prop}
{selection-background-color} property and the syntax required is:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 149
+ \snippet code/doc_src_stylesheet.qdoc 149
The corner widget can be customized using the following style sheet
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 150
+ \snippet code/doc_src_stylesheet.qdoc 150
\section2 Customizing QToolBar
The background and the handle of a QToolBar is customized as below:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 151
+ \snippet code/doc_src_stylesheet.qdoc 151
\section2 Customizing QToolBox
The tabs of the QToolBox are customized using the 'tab' subcontrol.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 152
+ \snippet code/doc_src_stylesheet.qdoc 152
\section2 Customizing QToolButton
@@ -3851,7 +3851,7 @@
QToolButton::MenuButtonPopup. In this case, we style it as follows:
\endlist
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 153
+ \snippet code/doc_src_stylesheet.qdoc 153
\section2 Customizing QToolTip
@@ -3860,25 +3860,25 @@
that support it, the opacity property may be set to adjust the opacity.
For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 154
+ \snippet code/doc_src_stylesheet.qdoc 154
\section2 Customizing QTreeView
The background color of alternating rows can be customized using the following
style sheet:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 155
+ \snippet code/doc_src_stylesheet.qdoc 155
To provide a special background when you hover over items, we can use the
\l{item-sub}{::item} subcontrol. For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 156
+ \snippet code/doc_src_stylesheet.qdoc 156
The branches of a QTreeView are styled using the
\l{Qt Style Sheets Reference#branch-sub}{::branch} subcontrol. The
following stylesheet color codes the various states when drawing
a branch.
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 157
+ \snippet code/doc_src_stylesheet.qdoc 157
Colorful, though it is, a more useful example can be made using the
following images:
@@ -3898,7 +3898,7 @@
\li branch-open.png
\endtable
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 158
+ \snippet code/doc_src_stylesheet.qdoc 158
The resulting tree view looks like this:
@@ -3932,7 +3932,7 @@
Consider the following snippet:
- \snippet doc/src/snippets/stylesheet/common-mistakes.cpp 1
+ \snippet stylesheet/common-mistakes.cpp 1
This will produce a button looking like this:
diff --git a/doc/src/widgets/widgets-and-layouts/widgets.qdoc b/src/widgets/doc/src/widgets-and-layouts/widgets.qdoc
index e80b0fbec0..e80b0fbec0 100644
--- a/doc/src/widgets/widgets-and-layouts/widgets.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/widgets.qdoc
diff --git a/doc/src/widgets/widgets-tutorial.qdoc b/src/widgets/doc/src/widgets-tutorial.qdoc
index 735a7ebc54..37f095d500 100644
--- a/doc/src/widgets/widgets-tutorial.qdoc
+++ b/src/widgets/doc/src/widgets-tutorial.qdoc
@@ -63,7 +63,7 @@
A typical \c main() function in \c{main.cpp} looks like this:
- \snippet doc/src/snippets/widgets-tutorial/template.cpp main.cpp body
+ \snippet widgets-tutorial/template.cpp main.cpp body
First, a QApplication object is constructed, which can be
configured with arguments passed in from the command line. After
diff --git a/doc/src/widgets/windows-and-dialogs/dialogs.qdoc b/src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc
index e1c6de42b8..e1c6de42b8 100644
--- a/doc/src/widgets/windows-and-dialogs/dialogs.qdoc
+++ b/src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc
diff --git a/doc/src/widgets/windows-and-dialogs/mainwindow.qdoc b/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
index 3a2efb06a2..3c175669fb 100644
--- a/doc/src/widgets/windows-and-dialogs/mainwindow.qdoc
+++ b/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -198,17 +198,17 @@
the first time it is called. You can also call
QMainWindow::setMenuBar() to use a custom menu bar in the main window.
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 0
+ \snippet code/doc_src_qt4-mainwindow.cpp 0
\dots
- \snippet examples/mainwindows/menus/mainwindow.cpp 5
+ \snippet mainwindows/menus/mainwindow.cpp 5
\dots
Once actions have been created, we can add them to the main window
components. To begin with, we add them to the pop-up menus:
- \snippet examples/mainwindows/menus/mainwindow.cpp 10
+ \snippet mainwindows/menus/mainwindow.cpp 10
\dots
- \snippet examples/mainwindows/menus/mainwindow.cpp 11
+ \snippet mainwindows/menus/mainwindow.cpp 11
\dots
The QToolBar and QMenu classes use Qt's action system to provide a
@@ -220,9 +220,9 @@
We create a toolbar as a child of the main window, and add the desired
actions to it:
- \snippet examples/mainwindows/sdi/mainwindow.cpp 0
+ \snippet mainwindows/sdi/mainwindow.cpp 0
\dots
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 1
+ \snippet code/doc_src_qt4-mainwindow.cpp 1
In this example, the toolbar is restricted to the top and bottom
toolbar areas of the main window, and is initially placed in the
@@ -234,7 +234,7 @@
dock widget as a child of the main window, and add widgets as children
of the dock widget:
- \snippet doc/src/snippets/dockwidgets/mainwindow.cpp 0
+ \snippet dockwidgets/mainwindow.cpp 0
In this example, the dock widget can only be placed in the left and
right dock areas, and it is initially placed in the left dock area.
@@ -244,7 +244,7 @@
required, the default can be changed with the
QMainWindow::setCorner() function:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 2
+ \snippet code/doc_src_qt4-mainwindow.cpp 2
The following diagram shows the configuration produced by the above code.
Note that the left and right dock widgets will occupy the top and bottom
@@ -255,7 +255,7 @@
Once all of the main window components have been set up, the central widget
is created and installed by using code similar to the following:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 3
+ \snippet code/doc_src_qt4-mainwindow.cpp 3
The central widget can be any subclass of QWidget.
*/
diff --git a/src/widgets/effects/qgraphicseffect.cpp b/src/widgets/effects/qgraphicseffect.cpp
index 80c0aff492..5bfa8cc5e5 100644
--- a/src/widgets/effects/qgraphicseffect.cpp
+++ b/src/widgets/effects/qgraphicseffect.cpp
@@ -243,7 +243,7 @@ void QGraphicsEffectSource::draw(QPainter *painter)
For example:
- \snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 0
+ \snippet code/src_gui_effects_qgraphicseffect.cpp 0
\sa QGraphicsEffect::draw()
*/
@@ -545,7 +545,7 @@ void QGraphicsEffect::updateBoundingRect()
For example:
- \snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 1
+ \snippet code/src_gui_effects_qgraphicseffect.cpp 1
This function should not be called explicitly by the user, since it is
meant for reimplementation purposes only.
@@ -1154,7 +1154,7 @@ void QGraphicsOpacityEffect::setOpacity(qreal opacity)
For example:
- \snippet doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp 2
+ \snippet code/src_gui_effects_qgraphicseffect.cpp 2
There is no opacity mask by default.
diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp
index a141fa9e55..7e42eefef2 100644
--- a/src/widgets/effects/qpixmapfilter.cpp
+++ b/src/widgets/effects/qpixmapfilter.cpp
@@ -198,7 +198,7 @@ QRectF QPixmapFilter::boundingRectFor(const QRectF &rect) const
\endomit
Example:
- \snippet doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp 1
+ \snippet code/src_gui_image_qpixmapfilter.cpp 1
\sa {Pixmap Filters Example}, QPixmapColorizeFilter, QPixmapDropShadowFilter
@@ -1011,7 +1011,7 @@ static void grayscale(const QImage &image, QImage &dest, const QRect& rect = QRe
chosen color. The alpha-channel is not changed.
Example:
- \snippet doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp 0
+ \snippet code/src_gui_image_qpixmapfilter.cpp 0
\sa QPainter::CompositionMode
@@ -1194,7 +1194,7 @@ public:
radius of 1 at an offset of 8 pixels towards the lower right.
Example:
- \snippet doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp 2
+ \snippet code/src_gui_image_qpixmapfilter.cpp 2
\sa QPixmapColorizeFilter, QPixmapConvolutionFilter
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
index 348d8f2d09..06db3826ea 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
@@ -64,7 +64,7 @@
Anchors are always set up between edges of an item, where the "center" is also considered to
be an edge. Consider the following example:
- \snippet examples/graphicsview/simpleanchorlayout/main.cpp adding anchors
+ \snippet graphicsview/simpleanchorlayout/main.cpp adding anchors
Here, the right edge of item \c a is anchored to the left edge of item \c b and the bottom
edge of item \c a is anchored to the top edge of item \c b, with the result that
@@ -75,7 +75,7 @@
above. Here, we see how a widget can be anchored to the top-left corner of the enclosing
layout:
- \snippet examples/graphicsview/simpleanchorlayout/main.cpp adding a corner anchor
+ \snippet graphicsview/simpleanchorlayout/main.cpp adding a corner anchor
In cases where anchors are used to match the widths or heights of widgets, it is
convenient to use the addAnchors() function. As with the other functions for specifying
@@ -299,11 +299,11 @@ QGraphicsAnchorLayout::anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint fi
This is a convenience function, since anchoring corners can be expressed as anchoring
two edges. For instance:
- \snippet examples/graphicsview/simpleanchorlayout/main.cpp adding a corner anchor in two steps
+ \snippet graphicsview/simpleanchorlayout/main.cpp adding a corner anchor in two steps
This can also be achieved with the following line of code:
- \snippet examples/graphicsview/simpleanchorlayout/main.cpp adding a corner anchor
+ \snippet graphicsview/simpleanchorlayout/main.cpp adding a corner anchor
If there is already an anchor between the edge pairs, it will be replaced by the anchors that
this function specifies.
@@ -341,11 +341,11 @@ void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem,
For example, the following example anchors the left and right edges of two items
to match their widths:
- \snippet examples/graphicsview/simpleanchorlayout/main.cpp adding anchors to match sizes in two steps
+ \snippet graphicsview/simpleanchorlayout/main.cpp adding anchors to match sizes in two steps
This can also be achieved using the following line of code:
- \snippet examples/graphicsview/simpleanchorlayout/main.cpp adding anchors to match sizes
+ \snippet graphicsview/simpleanchorlayout/main.cpp adding anchors to match sizes
\sa addAnchor(), addCornerAnchors()
*/
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.cpp b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
index c5e7e83cf4..53d7cbd4be 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
@@ -54,7 +54,7 @@
QGraphicsWidget::setLayout(). QGraphicsGridLayout automatically computes
the dimensions of the grid as you add items.
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicsgridlayout.cpp 0
The layout takes ownership of the items. In some cases when the layout
item also inherits from QGraphicsItem (such as QGraphicsWidget) there will be a
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index dab1965da5..1ce914b219 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -90,7 +90,7 @@
by the item, and paint(), which implements the actual painting. For
example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 0
The boundingRect() function has many different purposes.
QGraphicsScene bases its item index on boundingRect(), and
@@ -277,7 +277,7 @@
classes in Qt are associated with a unique value for Type,
e.g. the value returned by QGraphicsPathItem::type() is 2.
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 18
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 18
*/
/*!
@@ -288,7 +288,7 @@
used in conjunction with a reimplementation of QGraphicsItem::type()
and declaring a Type enum value. Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 1
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 1
\note UserType = 65536
*/
@@ -2133,7 +2133,7 @@ void QGraphicsItem::setToolTip(const QString &toolTip)
An editor item might want to use an I-beam cursor:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 2
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 2
If no cursor has been set, the cursor of the item beneath is used.
@@ -2153,7 +2153,7 @@ QCursor QGraphicsItem::cursor() const
An editor item might want to use an I-beam cursor:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 3
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 3
If no cursor has been set, the cursor of the item beneath is used.
@@ -4146,7 +4146,7 @@ QMatrix QGraphicsItem::sceneMatrix() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 4
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 4
Unlike transform(), which returns only an item's local transformation, this
function includes the item's (and any parents') position, and all the transfomation properties.
@@ -4171,7 +4171,7 @@ QTransform QGraphicsItem::sceneTransform() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 5
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 5
This function is the same as combining this item's scene transform with
the view's viewport transform, but it also understands the
@@ -4474,7 +4474,7 @@ void QGraphicsItem::resetTransform()
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 6
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 6
\sa setTransform(), transform(), scale(), shear(), translate()
*/
@@ -4500,7 +4500,7 @@ void QGraphicsItem::rotate(qreal angle)
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 7
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 7
\sa setTransform(), transform()
*/
@@ -4787,7 +4787,7 @@ QRectF QGraphicsItem::childrenBoundingRect() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 8
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 8
\sa boundingRegion(), shape(), contains(), {The Graphics View Coordinate
System}, prepareGeometryChange()
@@ -4835,7 +4835,7 @@ QRectF QGraphicsItem::sceneBoundingRect() const
may choose to return an elliptic shape for better collision detection. For
example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 9
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 9
The outline of a shape can vary depending on the width and style of the
pen used when drawing. If you want to include this outline in the item's
@@ -5327,7 +5327,7 @@ void QGraphicsItem::setBoundingRegionGranularity(qreal granularity)
provided, it points to the widget that is being painted on; otherwise, it
is 0. For cached painting, \a widget is always 0.
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 10
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 10
The painter's pen is 0-width by default, and its pen is initialized to the
QPalette::Text brush from the paint device's palette. The brush is
@@ -5736,7 +5736,7 @@ void QGraphicsItem::update(const QRectF &rect)
by other items, you can map the \a rect to viewport coordinates and scroll the
viewport.
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 19
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 19
\sa boundingRect()
*/
@@ -6515,7 +6515,7 @@ bool QGraphicsItem::isUnderMouse() const
Custom item data is useful for storing arbitrary properties in any
item. Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 11
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 11
Qt does not use this feature for storing data; it is provided solely
for the convenience of the user.
@@ -6572,7 +6572,7 @@ void QGraphicsItem::setData(int key, const QVariant &value)
For example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp QGraphicsItem type
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp QGraphicsItem type
\sa UserType
*/
@@ -6589,7 +6589,7 @@ int QGraphicsItem::type() const
To filter another item's events, install this item as an event filter
for the other item. Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 12
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 12
An item can only filter events for other items in the same
scene. Also, an item cannot filter its own events; instead, you
@@ -6805,7 +6805,7 @@ bool QGraphicsItem::sceneEvent(QEvent *event)
It's common to open a QMenu in response to receiving a context menu
event. Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 13
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 13
The default implementation ignores the event.
@@ -6830,7 +6830,7 @@ void QGraphicsItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
A common implementation of dragEnterEvent accepts or ignores \a event
depending on the associated mime data in \a event. Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 14
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 14
Items do not receive drag and drop events by default; to enable this
feature, call \c setAcceptDrops(true).
@@ -7424,7 +7424,7 @@ void QGraphicsItem::updateMicroFocus()
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 15
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 15
The default implementation does nothing, and returns \a value.
@@ -7519,7 +7519,7 @@ void QGraphicsItem::removeFromIndex()
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 16
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 16
\sa boundingRect()
*/
@@ -10613,11 +10613,11 @@ Qt::TextInteractionFlags QGraphicsTextItem::textInteractionFlags() const
/*!
\since 4.5
- If \a b is true, the \gui Tab key will cause the widget to change focus;
+ If \a b is true, the \uicontrol Tab key will cause the widget to change focus;
otherwise, the tab key will insert a tab into the document.
In some occasions text edits should not allow the user to input tabulators
- or change indentation using the \gui Tab key, as this breaks the focus
+ or change indentation using the \uicontrol Tab key, as this breaks the focus
chain. The default is false.
\sa tabChangesFocus(), ItemIsFocusable, textInteractionFlags()
@@ -10630,7 +10630,7 @@ void QGraphicsTextItem::setTabChangesFocus(bool b)
/*!
\since 4.5
- Returns true if the \gui Tab key will cause the widget to change focus;
+ Returns true if the \uicontrol Tab key will cause the widget to change focus;
otherwise, false is returned.
By default, this behavior is disabled, and this function will return false.
@@ -11010,7 +11010,7 @@ QVariant QGraphicsSimpleTextItem::extension(const QVariant &variant) const
QGraphicsScene::destroyItemGroup(), or you can manually remove all
items from the group by calling removeFromGroup().
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 17
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 17
The operation of adding and removing items preserves the items'
scene-relative position and transformation, as opposed to calling
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.cpp b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
index f21220b3b1..bb90337c5e 100644
--- a/src/widgets/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
@@ -70,7 +70,7 @@
An example animation with a timeline follows:
- \snippet doc/src/snippets/timeline/main.cpp 0
+ \snippet timeline/main.cpp 0
Note that steps lie between 0.0 and 1.0. It may be necessary to use
\l{QTimeLine::}{setUpdateInterval()}. The default update interval
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.cpp b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
index 535e2ddf59..f312e2e7ba 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
@@ -56,7 +56,7 @@
and finally assign the layout to a widget by calling
QGraphicsWidget::setLayout().
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicslinearlayout.cpp 0
You can add widgets, layouts, stretches (addStretch(), insertStretch() or
setStretchFactor()), and spacings (setItemSpacing()) to a linear
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index 4cda3e51fb..b09ddbab41 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicsproxywidget.cpp 0
QGraphicsProxyWidget takes care of automatically embedding popup children
of embedded widgets through creating a child proxy for each popup. This
@@ -104,7 +104,7 @@ QT_BEGIN_NAMESPACE
For example, in the code snippet below, we embed a group box into the proxy:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp 1
+ \snippet code/src_gui_graphicsview_qgraphicsproxywidget.cpp 1
The image below is the output obtained with its contents margin and
contents rect labeled.
@@ -131,7 +131,7 @@ QT_BEGIN_NAMESPACE
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp 2
+ \snippet code/src_gui_graphicsview_qgraphicsproxywidget.cpp 2
QGraphicsProxyWidget maintains symmetry for the following states:
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 583e6da90a..282c6a2a2a 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -60,7 +60,7 @@
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicsscene.cpp 0
Note that QGraphicsScene has no visual appearance of its own; it only
manages the items. You need to create a QGraphicsView widget to visualize
@@ -1715,7 +1715,7 @@ void QGraphicsScene::setSceneRect(const QRectF &rect)
device, such as a QImage (e.g., to take a screenshot), or for printing
with QPrinter. For example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp 1
+ \snippet code/src_gui_graphicsview_qgraphicsscene.cpp 1
If \a source is a null rect, this function will use sceneRect() to
determine what to render. If \a target is a null rect, the dimensions of \a
@@ -1866,7 +1866,7 @@ void QGraphicsScene::setItemIndexMethod(ItemIndexMethod method)
granularity of the scene's partitioning. The size of each scene segment is
determined by the following algorithm:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp 2
+ \snippet code/src_gui_graphicsview_qgraphicsscene.cpp 2
The BSP tree has an optimal size when each segment contains between 0 and
10 items.
@@ -3146,7 +3146,7 @@ QGraphicsItem *QGraphicsScene::mouseGrabberItem() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp 3
+ \snippet code/src_gui_graphicsview_qgraphicsscene.cpp 3
QGraphicsScene::render() calls drawBackground() to draw the scene
background. For more detailed control over how the background is drawn,
@@ -3181,7 +3181,7 @@ void QGraphicsScene::setBackgroundBrush(const QBrush &brush)
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp 4
+ \snippet code/src_gui_graphicsview_qgraphicsscene.cpp 4
QGraphicsScene::render() calls drawForeground() to draw the scene
foreground. For more detailed control over how the foreground is
@@ -3295,7 +3295,7 @@ void QGraphicsScene::update(const QRectF &rect)
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp 5
+ \snippet code/src_gui_graphicsview_qgraphicsscene.cpp 5
Note that QGraphicsView currently supports background caching only (see
QGraphicsView::CacheBackground). This function is equivalent to calling
@@ -5340,7 +5340,7 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
Example:
- \snippet doc/src/snippets/graphicssceneadditemsnippet.cpp 0
+ \snippet graphicssceneadditemsnippet.cpp 0
Since Qt 4.6, this function is not called anymore unless
the QGraphicsView::IndirectPainting flag is given as an Optimization
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp
index 91b6fb08da..580380e19a 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp
@@ -1461,7 +1461,7 @@ void QGraphicsSceneDragDropEvent::setProposedAction(Qt::DropAction action)
Sets the proposed action as accepted, i.e, the drop action
is set to the proposed action. This is equal to:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicssceneevent.cpp 0
When using this function, one should not call \c accept().
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index cabf2eb5a5..3629341d9e 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -62,7 +62,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
center of the scene and display any items that are visible at this
point. For example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 0
You can explicitly scroll to any position on the scene by using the
scroll bars, or by calling centerOn(). By passing a point to centerOn(),
@@ -1189,7 +1189,7 @@ QSize QGraphicsView::sizeHint() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 1
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 1
*/
QPainter::RenderHints QGraphicsView::renderHints() const
{
@@ -1472,7 +1472,7 @@ void QGraphicsView::setRubberBandSelectionMode(Qt::ItemSelectionMode mode)
especially with a transformed view. The CacheBackground flag enables
caching of the view's background. For example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 2
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 2
The cache is invalidated every time the view is transformed. However, when
scrolling, only partial invalidation is required.
@@ -1727,7 +1727,7 @@ QMatrix QGraphicsView::matrix() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 3
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 3
To simplify interation with items using a transformed view, QGraphicsView
provides mapTo... and mapFrom... functions that can translate between
@@ -2030,7 +2030,7 @@ void QGraphicsView::fitInView(const QGraphicsItem *item, Qt::AspectRatioMode asp
onto a paint device, such as a QImage (e.g., to take a screenshot), or for
printing to QPrinter. For example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 4
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 4
If \a source is a null rect, this function will use viewport()->rect() to
determine what to draw. If \a target is a null rect, the full dimensions
@@ -2155,7 +2155,7 @@ QList<QGraphicsItem *> QGraphicsView::items() const
a subclass in QGraphicsView. \a pos is in untransformed viewport
coordinates, just like QMouseEvent::pos().
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 5
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 5
\sa QGraphicsScene::items(), {QGraphicsItem#Sorting}{Sorting}
*/
@@ -2270,7 +2270,7 @@ QList<QGraphicsItem *> QGraphicsView::items(const QPainterPath &path, Qt::ItemSe
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 6
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 6
\sa items(), {QGraphicsItem#Sorting}{Sorting}
*/
@@ -3792,7 +3792,7 @@ bool QGraphicsView::isTransformed() const
Example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp 7
+ \snippet code/src_gui_graphicsview_qgraphicsview.cpp 7
To simplify interation with items using a transformed view, QGraphicsView
provides mapTo... and mapFrom... functions that can translate between
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index 1f45582442..267d70104d 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -677,7 +677,7 @@ QRectF QGraphicsWidget::windowFrameRect() const
For example:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp 0
+ \snippet code/src_gui_graphicsview_qgraphicswidget.cpp 0
\sa QStyleOption::initFrom()
*/
@@ -2098,11 +2098,11 @@ QList<QAction *> QGraphicsWidget::actions() const
Note that since the tab order of the \a second widget is changed, you
should order a chain like this:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp 1
+ \snippet code/src_gui_graphicsview_qgraphicswidget.cpp 1
\e not like this:
- \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp 2
+ \snippet code/src_gui_graphicsview_qgraphicswidget.cpp 2
If \a first is 0, this indicates that \a second should be the first widget
to receive input focus should the scene gain Tab focus (i.e., the user
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 125beab91b..890eba3407 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE
We create the \c WidgetDelegate class, which inherits from
QStyledItemDelegate. We do the drawing in the paint() function:
- \snippet doc/src/snippets/widgetdelegate.cpp 0
+ \snippet widgetdelegate.cpp 0
Notice that we use a QStyleOptionProgressBar and initialize its
members. We can then use the current QStyle to draw it.
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index 2ff039595a..777767ee70 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -308,7 +308,7 @@ void QAbstractItemViewPrivate::_q_scrollerStateChanged()
setVerticalScrollMode(). To set the range of the scroll bars, you
can, for example, reimplement the view's resizeEvent() function:
- \snippet doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp 0
+ \snippet code/src_gui_itemviews_qabstractitemview.cpp 0
Note that the range is not updated until the widget is shown.
@@ -654,7 +654,7 @@ QAbstractItemView::~QAbstractItemView()
views. We recommend that you delete the old selection model if it is no
longer required. This is done with the following code:
- \snippet doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp 2
+ \snippet code/src_gui_itemviews_qabstractitemview.cpp 2
If both the old model and the old selection model do not have parents, or
if their parents are long-lived objects, it may be preferable to call their
@@ -3124,7 +3124,7 @@ void QAbstractItemView::closePersistentEditor(const QModelIndex &index)
deleted. For example, in the code snippet below, the QLineEdit object will
be deleted.
- \snippet doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp 1
+ \snippet code/src_gui_itemviews_qabstractitemview.cpp 1
This function should only be used to display static content within the
visible area corresponding to an item of data. If you want to display
diff --git a/src/widgets/itemviews/qdatawidgetmapper.cpp b/src/widgets/itemviews/qdatawidgetmapper.cpp
index 2f7b1f7ecb..4396519810 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.cpp
+++ b/src/widgets/itemviews/qdatawidgetmapper.cpp
@@ -289,7 +289,7 @@ void QDataWidgetMapperPrivate::_q_modelDestroyed()
The following code will map the columns of the model to widgets called \c mySpinBox,
\c myLineEdit and \c{myCountryChooser}:
- \snippet doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp 0
+ \snippet code/src_gui_itemviews_qdatawidgetmapper.cpp 0
After the call to toFirst(), \c mySpinBox displays the value \c{1}, \c myLineEdit
displays \c{Qt Norway} and \c myCountryChooser displays \c{Oslo}. The
@@ -476,7 +476,7 @@ QModelIndex QDataWidgetMapper::rootIndex() const
is mapped to the QLineEdit \c nameLineEdit, and the second is
mapped to the QSpinBox \c{ageSpinBox}:
- \snippet doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp 1
+ \snippet code/src_gui_itemviews_qdatawidgetmapper.cpp 1
\b{Notes:}
\list
@@ -737,7 +737,7 @@ int QDataWidgetMapper::currentIndex() const
with new data whenever the selection of a QTableView named
\c myTableView changes:
- \snippet doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp 2
+ \snippet code/src_gui_itemviews_qdatawidgetmapper.cpp 2
\sa currentIndex()
*/
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index 252192a3fc..f5700746b8 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -401,7 +401,7 @@ QString QItemDelegatePrivate::valueToText(const QVariant &value, const QStyleOpt
For example, a selected item may need to be displayed differently to
unselected items, as shown in the following code:
- \snippet examples/itemviews/pixelator/pixeldelegate.cpp 2
+ \snippet itemviews/pixelator/pixeldelegate.cpp 2
\dots
After painting, you should ensure that the painter is returned to its
@@ -1137,21 +1137,21 @@ QRect QItemDelegate::textRectangle(QPainter * /*painter*/, const QRect &rect,
key press events are handled by default:
\list
- \li \gui Tab
- \li \gui Backtab
- \li \gui Enter
- \li \gui Return
- \li \gui Esc
+ \li \uicontrol Tab
+ \li \uicontrol Backtab
+ \li \uicontrol Enter
+ \li \uicontrol Return
+ \li \uicontrol Esc
\endlist
- In the case of \gui Tab, \gui Backtab, \gui Enter and \gui Return
+ In the case of \uicontrol Tab, \uicontrol Backtab, \uicontrol Enter and \uicontrol Return
key press events, the \a editor's data is comitted to the model
- and the editor is closed. If the \a event is a \gui Tab key press
+ and the editor is closed. If the \a event is a \uicontrol Tab key press
the view will open an editor on the next item in the
- view. Likewise, if the \a event is a \gui Backtab key press the
+ view. Likewise, if the \a event is a \uicontrol Backtab key press the
view will open an editor on the \e previous item in the view.
- If the event is a \gui Esc key press event, the \a editor is
+ If the event is a \uicontrol Esc key press event, the \a editor is
closed \e without committing its data.
\sa commitData(), closeEditor()
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index b4180c18dd..f970a77ab4 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -339,7 +339,7 @@ void QItemEditorFactory::setDefaultFactory(QItemEditorFactory *factory)
editing data. A property is set as the user property with the USER
keyword:
- \snippet doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp 0
+ \snippet code/src_gui_itemviews_qitemeditorfactory.cpp 0
If the editor does not provide a user property, it must return the
name of the property from valuePropertyName(); delegates will then
@@ -405,7 +405,7 @@ void QItemEditorFactory::setDefaultFactory(QItemEditorFactory *factory)
This way, it is not necessary to subclass
QItemEditorCreatorBase.
- \snippet doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp 1
+ \snippet code/src_gui_itemviews_qitemeditorfactory.cpp 1
The constructor takes the name of the property that contains the
editing data. QItemDelegate can then access the property by name
@@ -456,7 +456,7 @@ void QItemEditorFactory::setDefaultFactory(QItemEditorFactory *factory)
Example:
- \snippet doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp 2
+ \snippet code/src_gui_itemviews_qitemeditorfactory.cpp 2
Setting the \c editorFactory created above in an item delegate via
QItemDelegate::setItemEditorFactory() makes sure that all values of type
@@ -468,7 +468,7 @@ void QItemEditorFactory::setDefaultFactory(QItemEditorFactory *factory)
System}{meta-object system}). You set the user property with
the USER keyword:
- \snippet doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp 3
+ \snippet code/src_gui_itemviews_qitemeditorfactory.cpp 3
\sa QItemEditorCreatorBase, QItemEditorCreator,
QItemEditorFactory, QItemDelegate, {Color Editor Factory Example}
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index 01cb7b4235..4a17b65328 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -474,7 +474,7 @@ Qt::DropActions QListModel::supportedDropActions() const
List items can be inserted automatically into a list, when they are
constructed, by specifying the list widget:
- \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 2
+ \snippet qlistwidget-using/mainwindow.cpp 2
Alternatively, list items can also be created without a parent widget, and
later inserted into a list using QListWidget::insertItem().
@@ -1154,7 +1154,7 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
List widgets are constructed in the same way as other widgets:
- \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 0
+ \snippet qlistwidget-using/mainwindow.cpp 0
The selectionMode() of a list widget determines how many of the items in
the list can be selected at the same time, and whether complex selections
@@ -1166,15 +1166,15 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
parent widget and added to the list later. If a list widget already exists
when the items are constructed, the first method is easier to use:
- \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 1
+ \snippet qlistwidget-using/mainwindow.cpp 1
If you need to insert a new item into the list at a particular position,
then it should be constructed without a parent widget. The insertItem()
function should then be used to place it within the list. The list widget
will take ownership of the item.
- \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 6
- \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 7
+ \snippet qlistwidget-using/mainwindow.cpp 6
+ \snippet qlistwidget-using/mainwindow.cpp 7
For multiple items, insertItems() can be used instead. The number of items
in the list is found with the count() function. To remove items from the
@@ -1258,7 +1258,7 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
This signal is emitted when the \a item is activated. The \a item is
activated when the user clicks or double clicks on it, depending on the
system configuration. It is also activated when the user presses the
- activation key (on Windows and X11 this is the \gui Return key, on Mac OS
+ activation key (on Windows and X11 this is the \uicontrol Return key, on Mac OS
X it is \key{Ctrl+0}).
*/
diff --git a/src/widgets/itemviews/qstandarditemmodel.cpp b/src/widgets/itemviews/qstandarditemmodel.cpp
index 5616d76c4a..4f488993f8 100644
--- a/src/widgets/itemviews/qstandarditemmodel.cpp
+++ b/src/widgets/itemviews/qstandarditemmodel.cpp
@@ -1989,11 +1989,11 @@ QDataStream &operator<<(QDataStream &out, const QStandardItem &item)
An example usage of QStandardItemModel to create a table:
- \snippet doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp 0
+ \snippet code/src_gui_itemviews_qstandarditemmodel.cpp 0
An example usage of QStandardItemModel to create a tree:
- \snippet doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp 1
+ \snippet code/src_gui_itemviews_qstandarditemmodel.cpp 1
After setting the model on a view, you typically want to react to user
actions, such as an item being clicked. Since a QAbstractItemView provides
@@ -2005,19 +2005,19 @@ QDataStream &operator<<(QDataStream &out, const QStandardItem &item)
a QAbstractItemView signal, such as QAbstractItemView::clicked(). First
you connect the view's signal to a slot in your class:
- \snippet doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp 2
+ \snippet code/src_gui_itemviews_qstandarditemmodel.cpp 2
When you receive the signal, you call itemFromIndex() on the given model
index to get a pointer to the item:
- \snippet doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp 3
+ \snippet code/src_gui_itemviews_qstandarditemmodel.cpp 3
Conversely, you must obtain the QModelIndex of an item when you want to
invoke a model/view function that takes an index as argument. You can
obtain the index either by using the model's indexFromItem() function, or,
equivalently, by calling QStandardItem::index():
- \snippet doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp 4
+ \snippet code/src_gui_itemviews_qstandarditemmodel.cpp 4
You are, of course, not required to use the item-based approach; you could
instead rely entirely on the QAbstractItemModel interface when working with
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index 02ae80ca0b..fce80341e1 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -603,21 +603,21 @@ void QStyledItemDelegate::setItemEditorFactory(QItemEditorFactory *factory)
key press events are handled by default:
\list
- \li \gui Tab
- \li \gui Backtab
- \li \gui Enter
- \li \gui Return
- \li \gui Esc
+ \li \uicontrol Tab
+ \li \uicontrol Backtab
+ \li \uicontrol Enter
+ \li \uicontrol Return
+ \li \uicontrol Esc
\endlist
- In the case of \gui Tab, \gui Backtab, \gui Enter and \gui Return
+ In the case of \uicontrol Tab, \uicontrol Backtab, \uicontrol Enter and \uicontrol Return
key press events, the \a editor's data is comitted to the model
- and the editor is closed. If the \a event is a \gui Tab key press
+ and the editor is closed. If the \a event is a \uicontrol Tab key press
the view will open an editor on the next item in the
- view. Likewise, if the \a event is a \gui Backtab key press the
+ view. Likewise, if the \a event is a \uicontrol Backtab key press the
view will open an editor on the \e previous item in the view.
- If the event is a \gui Esc key press event, the \a editor is
+ If the event is a \uicontrol Esc key press event, the \a editor is
closed \e without committing its data.
\sa commitData(), closeEditor()
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index 7ae74640d6..a50b6f3111 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -979,7 +979,7 @@ QTableWidgetSelectionRange::~QTableWidgetSelectionRange()
Top-level items are constructed without a parent then inserted at the
position specified by a pair of row and column numbers:
- \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 3
+ \snippet qtablewidget-using/mainwindow.cpp 3
Each item can have its own background brush which is set with
the setBackground() function. The current background brush can be
@@ -1504,18 +1504,18 @@ QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)
Table widgets can be constructed with the required numbers of rows and
columns:
- \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 0
+ \snippet qtablewidget-using/mainwindow.cpp 0
Alternatively, tables can be constructed without a given size and resized
later:
- \snippet doc/src/snippets/qtablewidget-resizing/mainwindow.cpp 0
- \snippet doc/src/snippets/qtablewidget-resizing/mainwindow.cpp 1
+ \snippet qtablewidget-resizing/mainwindow.cpp 0
+ \snippet qtablewidget-resizing/mainwindow.cpp 1
Items are created ouside the table (with no parent widget) and inserted
into the table with setItem():
- \snippet doc/src/snippets/qtablewidget-resizing/mainwindow.cpp 2
+ \snippet qtablewidget-resizing/mainwindow.cpp 2
If you want to enable sorting in your table widget, do so after you
have populated it with items, otherwise sorting may interfere with
@@ -1530,7 +1530,7 @@ QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)
construct a table item with an icon and aligned text, and use it as the
header for a particular column:
- \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 2
+ \snippet qtablewidget-using/mainwindow.cpp 2
The number of rows in the table can be found with rowCount(), and the
number of columns with columnCount(). The table can be cleared with the
@@ -2267,7 +2267,7 @@ QWidget *QTableWidget::cellWidget(int row, int column) const
deleted. For example, in the code snippet below, the QLineEdit object will
be deleted.
- \snippet doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp 0
+ \snippet code/src_gui_itemviews_qtablewidget.cpp 0
\sa cellWidget()
*/
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 04835b63b4..44dd4b0761 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -85,8 +85,8 @@ QT_BEGIN_NAMESPACE
model. In the following example, the contents of a directory are
supplied by a QFileSystemModel and displayed as a tree:
- \snippet doc/src/snippets/shareddirmodel/main.cpp 3
- \snippet doc/src/snippets/shareddirmodel/main.cpp 6
+ \snippet shareddirmodel/main.cpp 3
+ \snippet shareddirmodel/main.cpp 6
The model/view architecture ensures that the contents of the tree view
are updated as the model changes.
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index e2d84825f0..d9d6c1434c 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -901,12 +901,12 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
to represent cities of the world, and adds a entry for Oslo as a child
item:
- \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 3
+ \snippet qtreewidget-using/mainwindow.cpp 3
Items can be added in a particular order by specifying the item they
follow when they are constructed:
- \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 5
+ \snippet qtreewidget-using/mainwindow.cpp 5
Each column in an item can have its own background brush which is set with
the setBackground() function. The current background brush can be
@@ -2355,7 +2355,7 @@ void QTreeWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
In its simplest form, a tree widget can be constructed in the following way:
- \snippet doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp 0
+ \snippet code/src_gui_itemviews_qtreewidget.cpp 0
Before items can be added to the tree widget, the number of columns must
be set with setColumnCount(). This allows each item to have one or more
diff --git a/src/widgets/itemviews/qtreewidgetitemiterator.cpp b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
index 116860ce89..45fddc7333 100644
--- a/src/widgets/itemviews/qtreewidgetitemiterator.cpp
+++ b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
For example, the following code examples each item in a tree, checking the
text in the first column against a user-specified search string:
- \snippet doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp 0
+ \snippet qtreewidgetitemiterator-using/mainwindow.cpp 0
It is also possible to filter out certain types of node by passing certain
\l{IteratorFlag}{flags} to the constructor of QTreeWidgetItemIterator.
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index c4f7995087..f3455d34ad 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -235,10 +235,10 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
menu and toolbar, then connected to the slot which will perform
the action. For example:
- \snippet examples/mainwindows/application/mainwindow.cpp 19
+ \snippet mainwindows/application/mainwindow.cpp 19
\codeline
- \snippet examples/mainwindows/application/mainwindow.cpp 28
- \snippet examples/mainwindows/application/mainwindow.cpp 31
+ \snippet mainwindows/application/mainwindow.cpp 28
+ \snippet mainwindows/application/mainwindow.cpp 31
We recommend that actions are created as children of the window
they are used in. In most cases actions will be children of
@@ -1037,7 +1037,7 @@ bool QAction::isChecked() const
which indicates that they are unavailable. For example, they might
be displayed using only shades of gray.
- \gui{What's This?} help on disabled actions is still available, provided
+ \uicontrol{What's This?} help on disabled actions is still available, provided
that the QAction::whatsThis property is set.
An action will be disabled when all widgets to which it is added
@@ -1328,7 +1328,7 @@ QAction::SoftKeyRole QAction::softKeyRole() const
the presence (or abscence) of the attribute.
For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qaction.cpp 0
+ \snippet code/src_gui_kernel_qaction.cpp 0
\sa QAction::icon QApplication::setAttribute()
*/
diff --git a/src/widgets/kernel/qactiongroup.cpp b/src/widgets/kernel/qactiongroup.cpp
index 46ca378bbe..2cf8932859 100644
--- a/src/widgets/kernel/qactiongroup.cpp
+++ b/src/widgets/kernel/qactiongroup.cpp
@@ -109,15 +109,15 @@ void QActionGroupPrivate::_q_actionHovered()
\inmodule QtWidgets
In some situations it is useful to group QAction objects together.
- For example, if you have a \gui{Left Align} action, a \gui{Right
- Align} action, a \gui{Justify} action, and a \gui{Center} action,
+ For example, if you have a \uicontrol{Left Align} action, a \uicontrol{Right
+ Align} action, a \uicontrol{Justify} action, and a \uicontrol{Center} action,
only one of these actions should be active at any one time. One
simple way of achieving this is to group the actions together in
an action group.
Here's a example (from the \l{mainwindows/menus}{Menus} example):
- \snippet examples/mainwindows/menus/mainwindow.cpp 6
+ \snippet mainwindows/menus/mainwindow.cpp 6
Here we create a new action group. Since the action group is
exclusive by default, only one of the actions in the group is
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index e3fe157a73..60328c4cf6 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -569,7 +569,7 @@ QApplication::QApplication(int &argc, char **argv, int _internal)
\obsolete
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 0
+ \snippet code/src_gui_kernel_qapplication.cpp 0
*/
QApplication::QApplication(int &argc, char **argv, bool GUIenabled , int _internal)
@@ -1099,7 +1099,7 @@ QStyle *QApplication::style()
still the parent of the application object.
Example usage:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 1
+ \snippet code/src_gui_kernel_qapplication.cpp 1
When switching application styles, the color palette is set back to the
initial colors or the system defaults. This is necessary since certain
@@ -1291,7 +1291,7 @@ int QApplication::colorSpec()
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 2
+ \snippet code/src_gui_kernel_qapplication.cpp 2
\sa colorSpec()
*/
@@ -1315,7 +1315,7 @@ void QApplication::setColorSpec(int spec)
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 3
+ \snippet code/src_gui_kernel_qapplication.cpp 3
By default, this property contains a QSize object with zero width and height.
*/
@@ -1668,7 +1668,7 @@ void QApplication::setWindowIcon(const QIcon &icon)
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 4
+ \snippet code/src_gui_kernel_qapplication.cpp 4
\sa allWidgets(), QWidget::isWindow(), QWidget::isHidden()
*/
@@ -1693,7 +1693,7 @@ QWidgetList QApplication::topLevelWidgets()
\note Some of the widgets may be hidden.
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 5
+ \snippet code/src_gui_kernel_qapplication.cpp 5
\sa topLevelWidgets(), QWidget::isVisible()
*/
@@ -1803,10 +1803,10 @@ QFontMetrics QApplication::fontMetrics()
Closes all top-level windows.
This function is particularly useful for applications with many top-level
- windows. It could, for example, be connected to a \gui{Exit} entry in the
- \gui{File} menu:
+ windows. It could, for example, be connected to a \uicontrol{Exit} entry in the
+ \uicontrol{File} menu:
- \snippet examples/mainwindows/mdi/mainwindow.cpp 0
+ \snippet mainwindows/mdi/mainwindow.cpp 0
The windows are closed in random order, until one window does not accept
the close event. The application quits when the last window was
@@ -1843,7 +1843,7 @@ void QApplication::closeAllWindows()
Displays a simple message box about Qt. The message includes the version
number of Qt being used by the application.
- This is useful for inclusion in the \gui Help menu of an application, as
+ This is useful for inclusion in the \uicontrol Help menu of an application, as
shown in the \l{mainwindows/menus}{Menus} example.
This function is a convenience slot for QMessageBox::aboutQt().
@@ -2866,7 +2866,7 @@ void QApplication::setStartDragDistance(int l)
and the current position (e.g. in the mouse move event) is \c currentPos,
you can find out if a drag should be started with code like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 7
+ \snippet code/src_gui_kernel_qapplication.cpp 7
Qt uses this value internally, e.g. in QFileDialog.
@@ -3715,7 +3715,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
Here's an example of how an application's QApplication::commitData() might
be implemented:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 8
+ \snippet code/src_gui_kernel_qapplication.cpp 8
If an error occurred within the application while saving its data, you may
want to try allowsErrorInteraction() instead.
@@ -3787,7 +3787,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
If the session manager is capable of restoring sessions it will execute
\a command in order to restore the application. The command defaults to
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 9
+ \snippet code/src_gui_kernel_qapplication.cpp 9
The \c -session option is mandatory; otherwise QApplication cannot tell
whether it has been restored or what the current session identifier is.
@@ -3811,7 +3811,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
To iterate over the list, you can use the \l foreach pseudo-keyword:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 10
+ \snippet code/src_gui_kernel_qapplication.cpp 10
\sa setRestartCommand(), restartHint()
*/
@@ -3832,7 +3832,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
To iterate over the list, you can use the \l foreach pseudo-keyword:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 11
+ \snippet code/src_gui_kernel_qapplication.cpp 11
\sa setDiscardCommand(), restartCommand(), setRestartCommand()
*/
@@ -3960,7 +3960,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
Use the two-argument widgetAt() overload to get the child widget. To get
the top-level widget do this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 12
+ \snippet code/src_gui_kernel_qapplication.cpp 12
*/
/*!
@@ -3969,7 +3969,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
Use the single-argument widgetAt() overload to get the child widget. To get
the top-level widget do this:
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 13
+ \snippet code/src_gui_kernel_qapplication.cpp 13
*/
bool QApplicationPrivate::inPopupMode() const
@@ -4091,7 +4091,7 @@ bool QApplication::keypadNavigationEnabled()
flash time, then hidden for the same amount of time, but this may vary.
The default value on X11 is 1000 milliseconds. On Windows, the
- \gui{Control Panel} value is used and setting this property sets the cursor
+ \uicontrol{Control Panel} value is used and setting this property sets the cursor
flash time for all applications.
We recommend that widgets do not cache this value as it may change at any
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp
index 7ea77d211c..46c51d1d37 100644
--- a/src/widgets/kernel/qboxlayout.cpp
+++ b/src/widgets/kernel/qboxlayout.cpp
@@ -1239,13 +1239,13 @@ QBoxLayout::Direction QBoxLayout::direction() const
The simplest use of the class is like this:
- \snippet doc/src/snippets/layouts/layouts.cpp 0
- \snippet doc/src/snippets/layouts/layouts.cpp 1
- \snippet doc/src/snippets/layouts/layouts.cpp 2
+ \snippet layouts/layouts.cpp 0
+ \snippet layouts/layouts.cpp 1
+ \snippet layouts/layouts.cpp 2
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 3
- \snippet doc/src/snippets/layouts/layouts.cpp 4
- \snippet doc/src/snippets/layouts/layouts.cpp 5
+ \snippet layouts/layouts.cpp 3
+ \snippet layouts/layouts.cpp 4
+ \snippet layouts/layouts.cpp 5
First, we create the widgets we want in the layout. Then, we
create the QHBoxLayout object and add the widgets into the
@@ -1302,13 +1302,13 @@ QHBoxLayout::~QHBoxLayout()
The simplest use of the class is like this:
- \snippet doc/src/snippets/layouts/layouts.cpp 6
- \snippet doc/src/snippets/layouts/layouts.cpp 7
- \snippet doc/src/snippets/layouts/layouts.cpp 8
+ \snippet layouts/layouts.cpp 6
+ \snippet layouts/layouts.cpp 7
+ \snippet layouts/layouts.cpp 8
\codeline
- \snippet doc/src/snippets/layouts/layouts.cpp 9
- \snippet doc/src/snippets/layouts/layouts.cpp 10
- \snippet doc/src/snippets/layouts/layouts.cpp 11
+ \snippet layouts/layouts.cpp 9
+ \snippet layouts/layouts.cpp 10
+ \snippet layouts/layouts.cpp 11
First, we create the widgets we want in the layout. Then, we
create the QVBoxLayout object and add the widgets into the
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 440f3f1dc2..bc4527a1e0 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1038,11 +1038,11 @@ QStyle* QFormLayoutPrivate::getStyle() const
creates a QLabel behind the scenes and automatically set up
its buddy. We can then write code like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qformlayout.cpp 0
+ \snippet code/src_gui_kernel_qformlayout.cpp 0
Compare this with the following code, written using QGridLayout:
- \snippet doc/src/snippets/code/src_gui_kernel_qformlayout.cpp 1
+ \snippet code/src_gui_kernel_qformlayout.cpp 1
\endlist
The table below shows the default appearance in different styles.
@@ -1083,7 +1083,7 @@ QStyle* QFormLayoutPrivate::getStyle() const
appearance of QMacStyle on all platforms, but with left-aligned
labels, you could write:
- \snippet doc/src/snippets/code/src_gui_kernel_qformlayout.cpp 2
+ \snippet code/src_gui_kernel_qformlayout.cpp 2
\sa QGridLayout, QBoxLayout, QStackedLayout
*/
diff --git a/src/widgets/kernel/qicon.cpp b/src/widgets/kernel/qicon.cpp
index 9c7f8736f0..448b6a8cfd 100644
--- a/src/widgets/kernel/qicon.cpp
+++ b/src/widgets/kernel/qicon.cpp
@@ -467,11 +467,11 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
resource, and then use it, allowing Qt to work out all the required
icon styles and sizes. For example:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 0
+ \snippet code/src_gui_image_qicon.cpp 0
To undo a QIcon, simply set a null icon in its place:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 1
+ \snippet code/src_gui_image_qicon.cpp 1
Use the QImageReader::supportedImageFormats() and
QImageWriter::supportedImageFormats() functions to retrieve a
@@ -500,7 +500,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
Provide a method to set a QIcon, and when you draw the icon, choose
whichever pixmap is appropriate for the current state of your widget.
For example:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 2
+ \snippet code/src_gui_image_qicon.cpp 2
You might also make use of the \c Active mode, perhaps making your
widget \c Active when the mouse is over the widget (see \l
@@ -950,12 +950,12 @@ QString QIcon::themeName()
To fetch an icon from the current icon theme:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 3
+ \snippet code/src_gui_image_qicon.cpp 3
Or if you want to provide a guaranteed fallback for platforms that
do not support theme icons, you can use the second argument:
- \snippet doc/src/snippets/code/src_gui_image_qicon.cpp 4
+ \snippet code/src_gui_image_qicon.cpp 4
\note By default, only X11 will support themed icons. In order to
use themed icons on Mac and Windows, you will have to bundle a
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 8c4e988411..a7760711b6 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1117,7 +1117,7 @@ bool QLayout::activate()
This function can be used to iterate over a layout. The following
code will draw a rectangle for each layout item in the layout structure of the widget.
- \snippet doc/src/snippets/code/src_gui_kernel_qlayout.cpp 0
+ \snippet code/src_gui_kernel_qlayout.cpp 0
\sa count(), takeAt()
*/
@@ -1134,7 +1134,7 @@ bool QLayout::activate()
The following code fragment shows a safe way to remove all items
from a layout:
- \snippet doc/src/snippets/code/src_gui_kernel_qlayout.cpp 1
+ \snippet code/src_gui_kernel_qlayout.cpp 1
\sa itemAt(), count()
*/
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 6cf3e1fe42..cf220796c5 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -392,7 +392,7 @@ int QLayoutItem::minimumHeightForWidth(int w) const
Reimplement this function in layout managers that support height
for width. A typical implementation will look like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp 0
+ \snippet code/src_gui_kernel_qlayoutitem.cpp 0
Caching is strongly recommended; without it layout will take
exponential time.
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 92f6fbafba..23487073f8 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -284,17 +284,17 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
objects can be informed when a shortcut is executed. The shortcut
can be set up to contain all the key presses necessary to
describe a keyboard shortcut, including the states of modifier
- keys such as \gui Shift, \gui Ctrl, and \gui Alt.
+ keys such as \uicontrol Shift, \uicontrol Ctrl, and \uicontrol Alt.
\target mnemonic
On certain widgets, using '&' in front of a character will
automatically create a mnemonic (a shortcut) for that character,
- e.g. "E&xit" will create the shortcut \gui Alt+X (use '&&' to
+ e.g. "E&xit" will create the shortcut \uicontrol Alt+X (use '&&' to
display an actual ampersand). The widget might consume and perform
an action on a given shortcut. On X11 the ampersand will not be
shown and the character will be underlined. On Windows, shortcuts
- are normally not displayed until the user presses the \gui Alt
+ are normally not displayed until the user presses the \uicontrol Alt
key, but this is a setting the user can change. On Mac, shortcuts
are disabled by default. Call qt_set_sequence_auto_mnemonic() to
enable them. However, because mnemonic shortcuts do not fit in
@@ -310,7 +310,7 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
The simplest way to create a shortcut for a particular widget is
to construct the shortcut with a key sequence. For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qshortcut.cpp 0
+ \snippet code/src_gui_kernel_qshortcut.cpp 0
When the user types the \l{QKeySequence}{key sequence}
for a given shortcut, the shortcut's activated() signal is
@@ -449,7 +449,7 @@ QShortcut::~QShortcut()
This is a key sequence with an optional combination of Shift, Ctrl,
and Alt. The key sequence may be supplied in a number of ways:
- \snippet doc/src/snippets/code/src_gui_kernel_qshortcut.cpp 1
+ \snippet code/src_gui_kernel_qshortcut.cpp 1
By default, this property contains an empty key sequence.
*/
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 0d2e7716e5..7db317e2bb 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -74,17 +74,17 @@ public:
A QStackedLayout can be populated with a number of child widgets
("pages"). For example:
- \snippet doc/src/snippets/qstackedlayout/main.cpp 0
+ \snippet qstackedlayout/main.cpp 0
\codeline
- \snippet doc/src/snippets/qstackedlayout/main.cpp 2
- \snippet doc/src/snippets/qstackedlayout/main.cpp 3
+ \snippet qstackedlayout/main.cpp 2
+ \snippet qstackedlayout/main.cpp 3
QStackedLayout provides no intrinsic means for the user to switch
page. This is typically done through a QComboBox or a QListWidget
that stores the titles of the QStackedLayout's pages. For
example:
- \snippet doc/src/snippets/qstackedlayout/main.cpp 1
+ \snippet qstackedlayout/main.cpp 1
When populating a layout, the widgets are added to an internal
list. The indexOf() function returns the index of a widget in that
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 907a29f3fb..c1a6ead381 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
simple method to determine whether the text can be rendered as
plain text. See Qt::mightBeRichText() for details.
- \snippet doc/src/snippets/whatsthis/whatsthis.cpp 0
+ \snippet whatsthis/whatsthis.cpp 0
An alternative way to enter "What's This?" mode is to call
createAction(), and add the returned QAction to either a menu or
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 2a8a25e4fc..74612559f0 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -2737,12 +2737,12 @@ void QWidget::overrideWindowState(Qt::WindowStates newstate)
windows, the change is immediate. For example, to toggle between
full-screen and normal mode, use the following code:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 0
+ \snippet code/src_gui_kernel_qwidget.cpp 0
In order to restore and activate a minimized window (while
preserving its maximized and/or full-screen state), use the following:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 1
+ \snippet code/src_gui_kernel_qwidget.cpp 1
Calling this function will hide the widget. You must call show() to make
the widget visible again.
@@ -3535,7 +3535,7 @@ QSize QWidget::maximumSize() const
sizeIncrement.height() pixels vertically, with baseSize() as the
basis. Preferred widget sizes are for non-negative integers \e i
and \e j:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 2
+ \snippet code/src_gui_kernel_qwidget.cpp 2
Note that while you can set the size increment for all widgets, it
only affects windows.
@@ -3946,7 +3946,7 @@ QPoint QWidget::mapFromParent(const QPoint &pos) const
Typical usage is changing the window title:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 3
+ \snippet code/src_gui_kernel_qwidget.cpp 3
\sa isWindow()
*/
@@ -4546,7 +4546,7 @@ void QWidget::unsetLayoutDirection()
objects\endlink for a range of useful shapes.
An editor widget might use an I-beam cursor:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 6
+ \snippet code/src_gui_kernel_qwidget.cpp 6
If no cursor has been set, or after a call to unsetCursor(), the
parent's cursor is used.
@@ -4638,7 +4638,7 @@ void QWidget::unsetCursor()
using \a renderFlags to determine how to render. Rendering
starts at \a targetOffset in the \a target. For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 7
+ \snippet code/src_gui_kernel_qwidget.cpp 7
If \a sourceRegion is a null region, this function will use QWidget::rect() as
the region, i.e. the entire widget.
@@ -4646,7 +4646,7 @@ void QWidget::unsetCursor()
Ensure that you call QPainter::end() for the \a target device's
active painter (if any) before rendering. For example:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 8
+ \snippet code/src_gui_kernel_qwidget.cpp 8
\note To obtain the contents of an OpenGL widget, use QGLWidget::grabFrameBuffer()
or QGLWidget::renderPixmap() instead.
@@ -6267,11 +6267,11 @@ bool QWidget::isActiveWindow() const
Note that since the tab order of the \a second widget is changed, you
should order a chain like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 9
+ \snippet code/src_gui_kernel_qwidget.cpp 9
\e not like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 10
+ \snippet code/src_gui_kernel_qwidget.cpp 10
If \a first or \a second has a focus proxy, setTabOrder()
correctly substitutes the proxy.
@@ -6536,7 +6536,7 @@ void QWidget::setGeometry(const QRect &r)
To save the geometry when the window closes, you can
implement a close event like this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 11
+ \snippet code/src_gui_kernel_qwidget.cpp 11
See the \l{Window Geometry} documentation for an overview of geometry
issues with windows.
@@ -6595,7 +6595,7 @@ QByteArray QWidget::saveGeometry() const
To restore geometry saved using QSettings, you can use code like
this:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 12
+ \snippet code/src_gui_kernel_qwidget.cpp 12
See the \l{Window Geometry} documentation for an overview of geometry
issues with windows.
@@ -6921,7 +6921,7 @@ void QWidget::setFocusPolicy(Qt::FocusPolicy policy)
widgets. Disabling updates solves this.
Example:
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 13
+ \snippet code/src_gui_kernel_qwidget.cpp 13
Disabling a widget implicitly disables all its children. Enabling a widget
enables all child widgets \e except top-level widgets or those that
@@ -8667,7 +8667,7 @@ void QWidget::leaveEvent(QEvent *)
\b{Note for the X11 platform}: It is possible to toggle global double
buffering by calling \c qt_x11_set_global_double_buffer(). For example,
- \snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 14
+ \snippet code/src_gui_kernel_qwidget.cpp 14
\note Generally, you should refrain from calling update() or repaint()
\b{inside} a paintEvent(). For example, calling update() or repaint() on
@@ -9128,7 +9128,7 @@ QLayout *QWidget::layout() const
Example:
- \snippet examples/uitools/textfinder/textfinder.cpp 3b
+ \snippet uitools/textfinder/textfinder.cpp 3b
An alternative to calling this function is to pass this widget to
the layout's constructor.
@@ -11367,7 +11367,7 @@ void QWidget::setMask(const QRegion &newMask)
The following code shows how an image with an alpha channel can be
used to generate a mask for a widget:
- \snippet doc/src/snippets/widget-mask/main.cpp 0
+ \snippet widget-mask/main.cpp 0
The label shown by this code is masked using the image it contains,
giving the appearance that an irregularly-shaped image is being drawn
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index 15788e34f5..5c1d0ce098 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded line:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 0
+ \snippet code/src_gui_painting_qdrawutil.cpp 0
\sa qDrawShadeRect(), qDrawShadePanel(), QStyle
*/
@@ -199,7 +199,7 @@ void qDrawShadeLine(QPainter *p, int x1, int y1, int x2, int y2,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded rectangle:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 1
+ \snippet code/src_gui_painting_qdrawutil.cpp 1
\sa qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), QStyle
*/
@@ -300,7 +300,7 @@ void qDrawShadeRect(QPainter *p, int x, int y, int w, int h,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded panel:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 2
+ \snippet code/src_gui_painting_qdrawutil.cpp 2
\sa qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), QStyle
*/
@@ -471,7 +471,7 @@ void qDrawWinButton(QPainter *p, int x, int y, int w, int h,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded panel:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 3
+ \snippet code/src_gui_painting_qdrawutil.cpp 3
\sa qDrawShadePanel(), qDrawWinButton(), QStyle
*/
@@ -507,7 +507,7 @@ void qDrawWinPanel(QPainter *p, int x, int y, int w, int h,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a plain rectangle:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 4
+ \snippet code/src_gui_painting_qdrawutil.cpp 4
\sa qDrawShadeRect(), QStyle
*/
@@ -566,7 +566,7 @@ void qDrawPlainRect(QPainter *p, int x, int y, int w, int h, const QColor &c,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded line:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 5
+ \snippet code/src_gui_painting_qdrawutil.cpp 5
\sa qDrawShadeRect(), qDrawShadePanel(), QStyle
*/
@@ -605,7 +605,7 @@ void qDrawShadeLine(QPainter *p, const QPoint &p1, const QPoint &p2,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded rectangle:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 6
+ \snippet code/src_gui_painting_qdrawutil.cpp 6
\sa qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), QStyle
*/
@@ -642,7 +642,7 @@ void qDrawShadeRect(QPainter *p, const QRect &r,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded panel:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 7
+ \snippet code/src_gui_painting_qdrawutil.cpp 7
\sa qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), QStyle
*/
@@ -703,7 +703,7 @@ void qDrawWinButton(QPainter *p, const QRect &r,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a shaded panel:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 8
+ \snippet code/src_gui_painting_qdrawutil.cpp 8
\sa qDrawShadePanel(), qDrawWinButton(), QStyle
*/
@@ -730,7 +730,7 @@ void qDrawWinPanel(QPainter *p, const QRect &r,
Alternatively you can use a QFrame widget and apply the
QFrame::setFrameStyle() function to display a plain rectangle:
- \snippet doc/src/snippets/code/src_gui_painting_qdrawutil.cpp 9
+ \snippet code/src_gui_painting_qdrawutil.cpp 9
\sa qDrawShadeRect(), QStyle
*/
diff --git a/src/widgets/styles/qproxystyle.cpp b/src/widgets/styles/qproxystyle.cpp
index 5bcd83a6ea..80124872a6 100644
--- a/src/widgets/styles/qproxystyle.cpp
+++ b/src/widgets/styles/qproxystyle.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
The following example shows how to override the shortcut underline
behavior on any platform:
- \snippet doc/src/snippets/code/src_gui_qproxystyle.cpp 1
+ \snippet code/src_gui_qproxystyle.cpp 1
Warning: The \l {QCommonStyle} {common styles} provided by Qt will
respect this hint, because they call QStyle::proxy(), but there is
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index d78a2ee2fb..b4f24acf84 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -107,7 +107,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
QApplication::setStyle() function. It can also be specified by the
user of the application, using the \c -style command-line option:
- \snippet doc/src/snippets/code/src_gui_styles_qstyle.cpp 0
+ \snippet code/src_gui_styles_qstyle.cpp 0
If no style is specified, Qt will choose the most appropriate
style for the user's platform or desktop environment.
@@ -133,7 +133,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
For example, if you want to draw a focus rectangle on your
widget, you can write:
- \snippet doc/src/snippets/styles/styles.cpp 1
+ \snippet styles/styles.cpp 1
QStyle gets all the information it needs to render the graphical
element from QStyleOption. The widget is passed as the last
@@ -154,15 +154,15 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
combines a QStyle, a QPainter, and a QWidget. This makes it
possible to write
- \snippet doc/src/snippets/styles/styles.cpp 5
+ \snippet styles/styles.cpp 5
\dots
- \snippet doc/src/snippets/styles/styles.cpp 7
+ \snippet styles/styles.cpp 7
instead of
- \snippet doc/src/snippets/styles/styles.cpp 2
+ \snippet styles/styles.cpp 2
\dots
- \snippet doc/src/snippets/styles/styles.cpp 3
+ \snippet styles/styles.cpp 3
\section1 Creating a Custom Style
@@ -190,16 +190,16 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
function, so we need to reimplement that function. We need the
following class declaration:
- \snippet doc/src/snippets/customstyle/customstyle.h 0
+ \snippet customstyle/customstyle.h 0
To draw its up and down arrows, QSpinBox uses the
PE_IndicatorSpinUp and PE_IndicatorSpinDown primitive elements.
Here's how to reimplement the drawPrimitive() function to draw
them differently:
- \snippet doc/src/snippets/customstyle/customstyle.cpp 2
- \snippet doc/src/snippets/customstyle/customstyle.cpp 3
- \snippet doc/src/snippets/customstyle/customstyle.cpp 4
+ \snippet customstyle/customstyle.cpp 2
+ \snippet customstyle/customstyle.cpp 3
+ \snippet customstyle/customstyle.cpp 4
Notice that we don't use the \c widget argument, except to pass it
on to the QWindowStyle::drawPrimitive() function. As mentioned
@@ -211,9 +211,9 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
information, be careful to ensure that it isn't 0 and that it is
of the correct type before using it. For example:
- \snippet doc/src/snippets/customstyle/customstyle.cpp 0
+ \snippet customstyle/customstyle.cpp 0
\dots
- \snippet doc/src/snippets/customstyle/customstyle.cpp 1
+ \snippet customstyle/customstyle.cpp 1
When implementing a custom style, you cannot assume that the
widget is a QSpinBox just because the enum value is called
@@ -233,7 +233,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
QApplication::setStyle() static function before creating the
QApplication object:
- \snippet snippets/customstyle/main.cpp using a custom style
+ \snippet customstyle/main.cpp using a custom style
You can call QApplication::setStyle() at any time, but by calling
it before the constructor, you ensure that the user's preference,
@@ -252,7 +252,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
automatically. To use your new style with existing applications,
simply start the application with the following argument:
- \snippet doc/src/snippets/code/src_gui_styles_qstyle.cpp 1
+ \snippet code/src_gui_styles_qstyle.cpp 1
The application will use the look and feel from the custom style you
implemented.
@@ -306,7 +306,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C
We include a small example where we customize the drawing of item
backgrounds.
- \snippet doc/src/snippets/customviewstyle.cpp 0
+ \snippet customviewstyle.cpp 0
The primitive element PE_PanelItemViewItem is responsible for
painting the background of items, and is called from
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 0b0c6e2393..1da5d786c7 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
The following code snippet shows how to use a specific
QStyleOption subclass to paint a push button:
- \snippet doc/src/snippets/qstyleoption/main.cpp 0
+ \snippet qstyleoption/main.cpp 0
In our example, the control is a QStyle::CE_PushButton, and
according to the QStyle::drawControl() documentation the
@@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
For safety, you can use qstyleoption_cast() to ensure that the
pointer type is correct. For example:
- \snippet doc/src/snippets/qstyleoption/main.cpp 4
+ \snippet qstyleoption/main.cpp 4
The qstyleoption_cast() function will return 0 if the object to
which \c option points is not of the correct type.
@@ -3240,7 +3240,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
Example:
- \snippet doc/src/snippets/qstyleoption/main.cpp 4
+ \snippet qstyleoption/main.cpp 4
\sa QStyleOption::type, QStyleOption::version
*/
@@ -3958,7 +3958,7 @@ QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, T
Example:
- \snippet doc/src/snippets/code/src_gui_styles_qstyleoption.cpp 0
+ \snippet code/src_gui_styles_qstyleoption.cpp 0
\sa QStyleHintReturn::type, QStyleHintReturn::version
*/
diff --git a/src/widgets/styles/qstylepainter.cpp b/src/widgets/styles/qstylepainter.cpp
index b15b9d1a38..ff7db79009 100644
--- a/src/widgets/styles/qstylepainter.cpp
+++ b/src/widgets/styles/qstylepainter.cpp
@@ -65,13 +65,13 @@ QT_BEGIN_NAMESPACE
Example using QStyle directly:
- \snippet doc/src/snippets/styles/styles.cpp 1
+ \snippet styles/styles.cpp 1
Example using QStylePainter:
- \snippet doc/src/snippets/styles/styles.cpp 0
- \snippet doc/src/snippets/styles/styles.cpp 4
- \snippet doc/src/snippets/styles/styles.cpp 6
+ \snippet styles/styles.cpp 0
+ \snippet styles/styles.cpp 4
+ \snippet styles/styles.cpp 6
\sa QStyle, QStyleOption
*/
diff --git a/src/widgets/styles/qstyleplugin.cpp b/src/widgets/styles/qstyleplugin.cpp
index 74c29f39c8..b36ffcf181 100644
--- a/src/widgets/styles/qstyleplugin.cpp
+++ b/src/widgets/styles/qstyleplugin.cpp
@@ -83,10 +83,10 @@ QT_BEGIN_NAMESPACE
The style key is usually the class name of the required
style. Note that the keys are case insensitive. For example:
- \snippet doc/src/snippets/qstyleplugin/main.cpp 0
+ \snippet qstyleplugin/main.cpp 0
\codeline
- \snippet doc/src/snippets/qstyleplugin/main.cpp 1
- \snippet doc/src/snippets/qstyleplugin/main.cpp 2
+ \snippet qstyleplugin/main.cpp 1
+ \snippet qstyleplugin/main.cpp 2
\sa keys()
*/
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp
index 91e4a9c3c1..245857b3c3 100644
--- a/src/widgets/util/qcompleter.cpp
+++ b/src/widgets/util/qcompleter.cpp
@@ -62,12 +62,12 @@
For example, here's how to provide auto completions from a simple
word list in a QLineEdit:
- \snippet doc/src/snippets/code/src_gui_util_qcompleter.cpp 0
+ \snippet code/src_gui_util_qcompleter.cpp 0
A QFileSystemModel can be used to provide auto completion of file names.
For example:
- \snippet doc/src/snippets/code/src_gui_util_qcompleter.cpp 1
+ \snippet code/src_gui_util_qcompleter.cpp 1
To set the model on which QCompleter should operate, call
setModel(). By default, QCompleter will attempt to match the \l
@@ -100,7 +100,7 @@
currentCompletion(). You can iterate through the list of
completions as below:
- \snippet doc/src/snippets/code/src_gui_util_qcompleter.cpp 2
+ \snippet code/src_gui_util_qcompleter.cpp 2
completionCount() returns the total number of completions for the
current prefix. completionCount() should be avoided when possible,
diff --git a/src/widgets/util/qundostack.cpp b/src/widgets/util/qundostack.cpp
index 5392dd2f8e..3951017f89 100644
--- a/src/widgets/util/qundostack.cpp
+++ b/src/widgets/util/qundostack.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
a change to the document with redo() and undo the change with undo(). The
implementations for these functions must be provided in a derived class.
- \snippet doc/src/snippets/code/src_gui_util_qundostack.cpp 0
+ \snippet code/src_gui_util_qundostack.cpp 0
A QUndoCommand has an associated text(). This is a short string
describing what the command does. It is used to update the text
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
QUndoCommand objects are owned by the stack they were pushed on.
QUndoStack deletes a command if it has been undone and a new command is pushed. For example:
-\snippet doc/src/snippets/code/src_gui_util_qundostack.cpp 1
+\snippet code/src_gui_util_qundostack.cpp 1
In effect, when a command is pushed, it becomes the top-most command
on the stack.
@@ -93,7 +93,7 @@ QT_BEGIN_NAMESPACE
redo() on all its children. The parent should, however, have a meaningful
text().
- \snippet doc/src/snippets/code/src_gui_util_qundostack.cpp 2
+ \snippet code/src_gui_util_qundostack.cpp 2
Another way to create macros is to use the convenience functions
QUndoStack::beginMacro() and QUndoStack::endMacro().
@@ -182,7 +182,7 @@ int QUndoCommand::id() const
The default implementation returns false.
- \snippet doc/src/snippets/code/src_gui_util_qundostack.cpp 3
+ \snippet code/src_gui_util_qundostack.cpp 3
\sa id() QUndoStack::push()
*/
@@ -943,11 +943,11 @@ QAction *QUndoStack::createRedoAction(QObject *parent, const QString &prefix) co
The stack becomes enabled and appropriate signals are emitted when endMacro()
is called for the outermost macro.
- \snippet doc/src/snippets/code/src_gui_util_qundostack.cpp 4
+ \snippet code/src_gui_util_qundostack.cpp 4
This code is equivalent to:
- \snippet doc/src/snippets/code/src_gui_util_qundostack.cpp 5
+ \snippet code/src_gui_util_qundostack.cpp 5
\sa endMacro()
*/
diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro
index a8be439695..ad1f29259e 100644
--- a/src/widgets/widgets.pro
+++ b/src/widgets/widgets.pro
@@ -15,6 +15,9 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
HEADERS += $$QT_SOURCE_TREE/src/widgets/qtwidgetsversion.h
+QMAKE_DOCS = $$PWD/doc/qtwidgets.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
include(../qbase.pri)
contains(QT_CONFIG, x11sm):CONFIG += x11sm
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index 4e85eae3ff..0c22576f7f 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -86,7 +86,7 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets;
ampersand ('&'), QAbstractButton automatically creates a shortcut
key. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp 0
+ \snippet code/src_gui_widgets_qabstractbutton.cpp 0
The \key Alt+C shortcut is assigned to the button, i.e., when the
user presses \key Alt+C the button will call animateClick(). See
@@ -97,7 +97,7 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets;
function. This is useful mostly for buttons that do not have any
text, because they have no automatic shortcut.
- \snippet doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp 1
+ \snippet code/src_gui_widgets_qabstractbutton.cpp 1
All of the buttons provided by Qt (QPushButton, QToolButton,
QCheckBox, and QRadioButton) can display both \l text and \l{icon}{icons}.
@@ -1361,7 +1361,7 @@ For example, a slot that reacts to signals emitted by newly checked
buttons but which ignores signals from buttons that have been unchecked
can be implemented using the following pattern:
-\snippet doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp 2
+\snippet code/src_gui_widgets_qabstractbutton.cpp 2
Button groups can be created using the QButtonGroup class, and
updates to the button states monitored with the
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index dc96321599..d97b03128e 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -130,13 +130,13 @@ QT_BEGIN_NAMESPACE
QWidget::move(). When the area contents or the viewport size
changes, we do the following:
- \snippet doc/src/snippets/myscrollarea.cpp 1
+ \snippet myscrollarea.cpp 1
When the scroll bars change value, we need to update the widget
position, i.e., find the part of the widget that is to be drawn in
the viewport:
- \snippet doc/src/snippets/myscrollarea.cpp 0
+ \snippet myscrollarea.cpp 0
In order to track scroll bar movements, reimplement the virtual
function scrollContentsBy(). In order to fine-tune scrolling
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index 6c556dc870..4d55c9f0af 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -230,7 +230,7 @@ QString QAbstractSpinBox::text() const
to automatically choose one that will enable the image to fit completely
within the display window, you can set up the spin box like this:
- \snippet examples/widgets/spinboxes/window.cpp 3
+ \snippet widgets/spinboxes/window.cpp 3
The user will then be able to choose a scale from 1% to 1000%
or select "Auto" to leave it up to the application to choose. Your code
@@ -275,7 +275,7 @@ void QAbstractSpinBox::setSpecialValueText(const QString &specialValueText)
to the minimum() value and vica versa. Wrapping only make sense if
you have minimum() and maximum() values set.
- \snippet doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp 0
+ \snippet code/src_gui_widgets_qabstractspinbox.cpp 0
\sa QSpinBox::minimum(), QSpinBox::maximum()
*/
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index 6618304006..5ac7348217 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -2004,7 +2004,7 @@ void QCalendarWidgetPrivate::_q_editingFinished()
\row \li
\image qcalendarwidget-grid.png
\row \li
- \snippet doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp 0
+ \snippet code/src_gui_widgets_qcalendarwidget.cpp 0
\endtable
Finally, the day in the first column can be altered using the
@@ -2421,7 +2421,7 @@ void QCalendarWidget::showToday()
\li \image qcalendarwidget-minimum.png
\row
\li
- \snippet doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp 1
+ \snippet code/src_gui_widgets_qcalendarwidget.cpp 1
\endtable
By default, the minimum date is the earliest date that the QDate
@@ -2472,7 +2472,7 @@ void QCalendarWidget::setMinimumDate(const QDate &date)
\li \image qcalendarwidget-maximum.png
\row
\li
- \snippet doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp 2
+ \snippet code/src_gui_widgets_qcalendarwidget.cpp 2
\endtable
By default, the maximum date is the last day the QDate class can
@@ -2518,11 +2518,11 @@ void QCalendarWidget::setMaximumDate(const QDate &date)
The date range restricts the user selection, i.e. the user can
only select dates within the specified date range. Note that
- \snippet doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp 3
+ \snippet code/src_gui_widgets_qcalendarwidget.cpp 3
is analogous to
- \snippet doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp 4
+ \snippet code/src_gui_widgets_qcalendarwidget.cpp 4
If either the \a min or \a max parameters are not valid QDate
objects, this function does nothing.
@@ -2641,7 +2641,7 @@ void QCalendarWidget::setVerticalHeaderFormat(QCalendarWidget::VerticalHeaderFor
\li \inlineimage qcalendarwidget-grid.png
\row
\li
- \snippet doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp 5
+ \snippet code/src_gui_widgets_qcalendarwidget.cpp 5
\endtable
The default value is false.
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index 13440ac104..a0093800a5 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -107,7 +107,7 @@ public:
constructor or with setText(). A shortcut key can be specified by preceding
the preferred character with an ampersand. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp 0
+ \snippet code/src_gui_widgets_qcheckbox.cpp 0
In this example the shortcut is \e{Alt+A}. See the \l{QShortcut#mnemonic}
{QShortcut} documentation for details (to display an actual ampersand,
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 0cdb2d1176..4c418bde9e 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE
QDateTimeEdit box. Dates and times appear in accordance with the
format set; see setDisplayFormat().
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 0
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 0
Here we've created a new QDateTimeEdit object initialized with
today's date, and restricted the valid date range to today plus or
@@ -397,11 +397,11 @@ void QDateTimeEdit::setMaximumDateTime(const QDateTime &dt)
function call.
\since 4.4
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 1
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 1
is analogous to:
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 2
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 2
If either \a min or \a max are not valid, this function does
nothing.
@@ -560,11 +560,11 @@ void QDateTimeEdit::clearMaximumTime()
Convenience function to set minimum and maximum date with one
function call.
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 3
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 3
is analogous to:
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 4
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 4
If either \a min or \a max are not valid, this function does
nothing.
@@ -587,11 +587,11 @@ void QDateTimeEdit::setDateRange(const QDate &min, const QDate &max)
Convenience function to set minimum and maximum time with one
function call.
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 5
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 5
is analogous to:
- \snippet doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp 6
+ \snippet code/src_gui_widgets_qdatetimeedit.cpp 6
If either \a min or \a max are not valid, this function does
nothing.
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index b787522a50..bcf0753d33 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -86,19 +86,19 @@ QT_BEGIN_NAMESPACE
destructive results.
Most dialogs have buttons that can almost be considered standard (e.g.
- \gui OK and \gui Cancel buttons). It is sometimes convenient to create these
+ \uicontrol OK and \uicontrol Cancel buttons). It is sometimes convenient to create these
buttons in a standard way.
There are a couple ways of using QDialogButtonBox. One ways is to create
the buttons (or button texts) yourself and add them to the button box,
specifying their role.
- \snippet examples/dialogs/extension/finddialog.cpp 1
+ \snippet dialogs/extension/finddialog.cpp 1
Alternatively, QDialogButtonBox provides several standard buttons (e.g. OK, Cancel, Save)
that you can use. They exist as flags so you can OR them together in the constructor.
- \snippet examples/dialogs/tabdialog/tabdialog.cpp 2
+ \snippet dialogs/tabdialog/tabdialog.cpp 2
You can mix and match normal buttons and standard buttons.
@@ -133,6 +133,8 @@ QT_BEGIN_NAMESPACE
\table
\row \li modeless horizontal MacLayout
\li \inlineimage buttonbox-mac-modeless-horizontal.png Screenshot of modeless horizontal MacLayout
+ \row \li modeless vertical MacLayout
+ \li \inlineimage buttonbox-mac-modeless-vertical.png Screenshot of modeless vertical MacLayout
\endtable
When a button is clicked in the button box, the clicked() signal is emitted
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index e40b109455..db45bf4e46 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -1547,7 +1547,7 @@ QAction * QDockWidget::toggleViewAction() const
\li When DockWidgetVerticalTitleBar is set on QDockWidget, the title
bar widget is repositioned accordingly. In resizeEvent(), the title
bar should check what orientation it should assume:
- \snippet doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp 0
+ \snippet code/src_gui_widgets_qdockwidget.cpp 0
\li The title bar widget must have a valid QWidget::sizeHint() and
QWidget::minimumSizeHint(). These functions should take into account
diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp
index b69f65828b..d11ff09a30 100644
--- a/src/widgets/widgets/qframe.cpp
+++ b/src/widgets/widgets/qframe.cpp
@@ -79,7 +79,7 @@ inline void QFramePrivate::init()
screen. QProgressBar has a "sunken" look. QLabel has a flat look.
The frames of widgets like these can be changed.
- \snippet doc/src/snippets/code/src_gui_widgets_qframe.cpp 0
+ \snippet code/src_gui_widgets_qframe.cpp 0
The QFrame class can also be used directly for creating simple
placeholder frames without any contents.
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index d8ad04cd84..343fc85bc9 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -169,7 +169,7 @@ void QGroupBoxPrivate::click()
widgets). The following example shows how we can set up a
QGroupBox with a layout:
- \snippet examples/widgets/groupbox/window.cpp 2
+ \snippet widgets/groupbox/window.cpp 2
\table 100%
\row \li \inlineimage windowsxp-groupbox.png Screenshot of a Windows XP style group box
@@ -261,7 +261,7 @@ void QGroupBox::setTitle(const QString &title)
The group box title text will have a keyboard shortcut if the title
contains an ampersand ('&') followed by a letter.
- \snippet doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp 0
+ \snippet code/src_gui_widgets_qgroupbox.cpp 0
In the example above, \key Alt+U moves the keyboard focus to the
group box. See the \l {QShortcut#mnemonic}{QShortcut}
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 4450066df4..99deca4709 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -115,7 +115,7 @@ QT_BEGIN_NAMESPACE
the bottom right corner (both lines being flush with the right
side of the label):
- \snippet doc/src/snippets/code/src_gui_widgets_qlabel.cpp 0
+ \snippet code/src_gui_widgets_qlabel.cpp 0
The properties and functions QLabel inherits from QFrame can also
be used to specify the widget frame to be used for any given label.
@@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE
mnemonic (see QKeySequence) that will set the keyboard focus to
the other widget (called the QLabel's "buddy"). For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qlabel.cpp 1
+ \snippet code/src_gui_widgets_qlabel.cpp 1
In this example, keyboard focus is transferred to the label's
buddy (the QLineEdit) when the user presses Alt+P. If the buddy
@@ -1150,7 +1150,7 @@ void QLabelPrivate::updateLabel()
In a dialog, you might create two data entry widgets and a label
for each, and set up the geometry layout so each label is just to
the left of its data entry widget (its "buddy"), for example:
- \snippet doc/src/snippets/code/src_gui_widgets_qlabel.cpp 2
+ \snippet code/src_gui_widgets_qlabel.cpp 2
With the code above, the focus jumps to the Name field when the
user presses Alt+N, and to the Phone field when the user presses
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 1ea636ffb2..bbf34b9853 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -1980,7 +1980,7 @@ void QLineEdit::dropEvent(QDropEvent* e)
to extend the standard context menu, reimplement this function, call
createStandardContextMenu() and extend the menu returned.
- \snippet doc/src/snippets/code/src_gui_widgets_qlineedit.cpp 0
+ \snippet code/src_gui_widgets_qlineedit.cpp 0
The \a event parameter is used to obtain the position where
the mouse cursor was when the event was generated.
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index 1c8e6ba0e8..3aff6ee5d9 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -85,7 +85,7 @@
developer to provide the autorelease pool.
The following is a snippet of subclassing QMacCocoaViewContainer to wrap a NSSearchField.
- \snippet examples/mainwindows/macmainwindow/macmainwindow.mm 0
+ \snippet mainwindows/macmainwindow/macmainwindow.mm 0
*/
diff --git a/src/widgets/widgets/qmacnativewidget_mac.mm b/src/widgets/widgets/qmacnativewidget_mac.mm
index 7974e93d88..e608b4a756 100644
--- a/src/widgets/widgets/qmacnativewidget_mac.mm
+++ b/src/widgets/widgets/qmacnativewidget_mac.mm
@@ -70,11 +70,11 @@
Here is an example of putting a QPushButton into a NSWindow:
- \snippet doc/src/snippets/qmacnativewidget/main.mm 0
+ \snippet qmacnativewidget/main.mm 0
On Carbon, this would do the equivalent:
- \snippet doc/src/snippets/qmacnativewidget/main.mm 1
+ \snippet qmacnativewidget/main.mm 1
Note that QMacNativeWidget requires knowledge of Carbon or Cocoa. All it
does is get the Qt hierarchy into a window not owned by Qt. It is then up
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 7607f2f238..efd5db07ab 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -261,7 +261,7 @@ void QMainWindowPrivate::init()
An example of how to create menus follows:
- \snippet examples/mainwindows/application/mainwindow.cpp 26
+ \snippet mainwindows/application/mainwindow.cpp 26
The \c createPopupMenu() function creates popup menus when the
main window receives context menu events. The default
@@ -288,7 +288,7 @@ void QMainWindowPrivate::init()
An example of toolbar creation follows:
- \snippet examples/mainwindows/application/mainwindow.cpp 29
+ \snippet mainwindows/application/mainwindow.cpp 29
\section2 Creating Dock Widgets
@@ -312,7 +312,7 @@ void QMainWindowPrivate::init()
We give an example of how to create and add dock widgets to a
main window:
- \snippet doc/src/snippets/mainwindowsnippet.cpp 0
+ \snippet mainwindowsnippet.cpp 0
\section2 The Status Bar
@@ -485,7 +485,7 @@ void QMainWindow::setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle)
can then share among all the Mac windows. Create a parent-less
menu bar this way:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenubar.cpp 1
+ \snippet code/src_gui_widgets_qmenubar.cpp 1
\sa setMenuBar()
*/
@@ -1213,7 +1213,7 @@ Qt::DockWidgetArea QMainWindow::dockWidgetArea(QDockWidget *dockwidget) const
To save the geometry when the window closes, you can
implement a close event like this:
- \snippet doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp 0
+ \snippet code/src_gui_widgets_qmainwindow.cpp 0
\sa restoreState(), QWidget::saveGeometry(), QWidget::restoreGeometry()
*/
@@ -1237,7 +1237,7 @@ QByteArray QMainWindow::saveState(int version) const
To restore geometry saved using QSettings, you can use code like
this:
- \snippet doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp 1
+ \snippet code/src_gui_widgets_qmainwindow.cpp 1
\sa saveState(), QWidget::saveGeometry(),
QWidget::restoreGeometry(), restoreDockWidget()
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index eb483ac0fe..b859fc437e 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -53,7 +53,7 @@
applications, but can also be placed in any layout. The following
code adds an area to a main window:
- \snippet doc/src/snippets/mdiareasnippets.cpp 0
+ \snippet mdiareasnippets.cpp 0
Unlike the window managers for top-level windows, all window flags
(Qt::WindowFlags) are supported by QMdiArea as long as the flags
@@ -1929,7 +1929,7 @@ void QMdiArea::activatePreviousSubWindow()
\note Once the subwindow has been added, its parent will be the
\e{viewport widget} of the QMdiArea.
- \snippet doc/src/snippets/mdiareasnippets.cpp 1
+ \snippet mdiareasnippets.cpp 1
When you create your own subwindow, you must set the
Qt::WA_DeleteOnClose widget attribute if you want the window to be
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 5dc26f6ee8..955e2e5c8c 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1990,11 +1990,11 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
In most situations you'll want to specify the position yourself,
for example, the current mouse position:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 0
+ \snippet code/src_gui_widgets_qmenu.cpp 0
or aligned to a widget:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 1
+ \snippet code/src_gui_widgets_qmenu.cpp 1
or in reaction to a QMouseEvent *e:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 2
+ \snippet code/src_gui_widgets_qmenu.cpp 2
*/
QAction *QMenu::exec()
{
@@ -2022,11 +2022,11 @@ QAction *QMenu::exec()
Common usage is to position the menu at the current mouse
position:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 3
+ \snippet code/src_gui_widgets_qmenu.cpp 3
or aligned to a widget:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 4
+ \snippet code/src_gui_widgets_qmenu.cpp 4
or in reaction to a QMouseEvent *e:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 5
+ \snippet code/src_gui_widgets_qmenu.cpp 5
When positioning a menu with exec() or popup(), bear in mind that
you cannot rely on the menu's current size(). For performance
@@ -2074,7 +2074,7 @@ QAction *QMenu::exec(const QPoint &p, QAction *action)
(normally because the user pressed Esc).
This is equivalent to:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenu.cpp 6
+ \snippet code/src_gui_widgets_qmenu.cpp 6
\sa popup(), QWidget::mapToGlobal()
*/
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 11ae61fb90..80b6faa1a0 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -586,7 +586,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
menu items with addMenu(). For example, asuming that \c menubar
is a pointer to a QMenuBar and \c fileMenu is a pointer to a
QMenu, the following statement inserts the menu into the menu bar:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenubar.cpp 0
+ \snippet code/src_gui_widgets_qmenubar.cpp 0
The ampersand in the menu item's text sets Alt+F as a shortcut for
this menu. (You can use "\&\&" to get a real ampersand in the menu
@@ -605,7 +605,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
Example (from the \l{mainwindows/menus}{Menus} example):
- \snippet examples/mainwindows/menus/mainwindow.cpp 9
+ \snippet mainwindows/menus/mainwindow.cpp 9
Menu items may be removed with removeAction().
@@ -619,7 +619,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
of menu bars and their behavior when the user interacts with them.
For example, Windows systems are often configured so that the
underlined character mnemonics that indicate keyboard shortcuts
- for items in the menu bar are only shown when the \gui{Alt} key is
+ for items in the menu bar are only shown when the \uicontrol{Alt} key is
pressed.
\table
@@ -628,13 +628,13 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
Plastique widget style.
\li The \l{QPlastiqueStyle}{Plastique widget style}, like most
- other styles, handles the \gui{Help} menu in the same way as it
+ other styles, handles the \uicontrol{Help} menu in the same way as it
handles any other menu.
\row \li \inlineimage motif-menubar.png A menu bar shown in the
Motif widget style.
- \li The \l{QMotifStyle}{Motif widget style} treats \gui{Help} menus
+ \li The \l{QMotifStyle}{Motif widget style} treats \uicontrol{Help} menus
in a special way, placing them at right-hand end of the menu bar.
\endtable
@@ -677,7 +677,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
bar, you must create a menu bar that does not have a parent.
Create a parent-less menu bar this way:
- \snippet doc/src/snippets/code/src_gui_widgets_qmenubar.cpp 1
+ \snippet code/src_gui_widgets_qmenubar.cpp 1
\b{Note:} Do \e{not} call QMainWindow::menuBar() to create the
shared menu bar, because that menu bar will have the QMainWindow
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index fad2d4e747..dad0a6b7b6 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -2039,7 +2039,7 @@ bool QPlainTextEdit::focusNextPrevChild(bool next)
Information about the event is passed in the \a event object.
- \snippet doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp 0
+ \snippet code/src_gui_widgets_qplaintextedit.cpp 0
*/
void QPlainTextEdit::contextMenuEvent(QContextMenuEvent *e)
{
@@ -2479,7 +2479,7 @@ QTextCharFormat QPlainTextEdit::currentCharFormat() const
It is equivalent to
- \snippet doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp 1
+ \snippet code/src_gui_widgets_qplaintextedit.cpp 1
*/
void QPlainTextEdit::insertPlainText(const QString &text)
{
@@ -2528,10 +2528,10 @@ void QPlainTextEdit::print(QPagedPaintDevice *printer) const
#endif
/*! \property QPlainTextEdit::tabChangesFocus
- \brief whether \gui Tab changes focus or is accepted as input
+ \brief whether \uicontrol Tab changes focus or is accepted as input
In some occasions text edits should not allow the user to input
- tabulators or change indentation using the \gui Tab key, as this breaks
+ tabulators or change indentation using the \uicontrol Tab key, as this breaks
the focus chain. The default is false.
*/
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index 291e3548a2..9853924182 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
preceding the preferred character with an ampersand in the
text. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp 0
+ \snippet code/src_gui_widgets_qpushbutton.cpp 0
In this example the shortcut is \e{Alt+D}. See the \l
{QShortcut#mnemonic}{QShortcut} documentation for details (to
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index 11cd89bca2..15dbdd4284 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -105,7 +105,7 @@ void QRadioButtonPrivate::init()
can be specified by preceding the preferred character with an
ampersand in the text. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp 0
+ \snippet code/src_gui_widgets_qradiobutton.cpp 0
In this example the shortcut is \e{Alt+c}. See the \l
{QShortcut#mnemonic}{QShortcut} documentation for details (to
diff --git a/src/widgets/widgets/qrubberband.cpp b/src/widgets/widgets/qrubberband.cpp
index 0f95f0188a..8173ffe657 100644
--- a/src/widgets/widgets/qrubberband.cpp
+++ b/src/widgets/widgets/qrubberband.cpp
@@ -112,7 +112,7 @@ void QRubberBand::initStyleOption(QStyleOptionRubberBand *option) const
setGeometry(), move() or resize() to position and size it. A common
pattern is to do this in conjunction with mouse events. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qrubberband.cpp 0
+ \snippet code/src_gui_widgets_qrubberband.cpp 0
If you pass a parent to QRubberBand's constructor, the rubber band will
display only inside its parent, but stays on top of other child widgets.
diff --git a/src/widgets/widgets/qscrollarea.cpp b/src/widgets/widgets/qscrollarea.cpp
index 84be2d569b..99b4151d8c 100644
--- a/src/widgets/widgets/qscrollarea.cpp
+++ b/src/widgets/widgets/qscrollarea.cpp
@@ -69,7 +69,7 @@ QT_BEGIN_NAMESPACE
widget can be viewed. The child widget must be specified with
setWidget(). For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp 0
+ \snippet code/src_gui_widgets_qscrollarea.cpp 0
The code above creates a scroll area (shown in the images below)
containing an image label. When scaling the image, the scroll area
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 7dcaead2f4..cb88ca1b79 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -168,9 +168,9 @@ public:
for a custom spin box that allows the user to enter icon sizes
(e.g., "32 x 32"):
- \snippet examples/widgets/icons/iconsizespinbox.cpp 1
+ \snippet widgets/icons/iconsizespinbox.cpp 1
\codeline
- \snippet examples/widgets/icons/iconsizespinbox.cpp 2
+ \snippet widgets/icons/iconsizespinbox.cpp 2
See the \l{widgets/icons}{Icons} example for the full source
code.
@@ -238,7 +238,7 @@ void QSpinBox::setValue(int value)
Typical use is to display a unit of measurement or a currency
symbol. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 0
+ \snippet code/src_gui_widgets_qspinbox.cpp 0
To turn off the prefix display, set this property to an empty
string. The default is no prefix. The prefix is not displayed when
@@ -274,7 +274,7 @@ void QSpinBox::setPrefix(const QString &prefix)
use is to display a unit of measurement or a currency symbol. For
example:
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 1
+ \snippet code/src_gui_widgets_qspinbox.cpp 1
To turn off the suffix display, set this property to an empty
string. The default is no suffix. The suffix is not displayed for
@@ -405,9 +405,9 @@ void QSpinBox::setMaximum(int maximum)
Convenience function to set the \a minimum, and \a maximum values
with a single function call.
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 2
+ \snippet code/src_gui_widgets_qspinbox.cpp 2
is equivalent to:
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 3
+ \snippet code/src_gui_widgets_qspinbox.cpp 3
\sa minimum maximum
*/
@@ -610,7 +610,7 @@ void QDoubleSpinBox::setValue(double value)
Typical use is to display a unit of measurement or a currency
symbol. For example:
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 4
+ \snippet code/src_gui_widgets_qspinbox.cpp 4
To turn off the prefix display, set this property to an empty
string. The default is no prefix. The prefix is not displayed when
@@ -644,7 +644,7 @@ void QDoubleSpinBox::setPrefix(const QString &prefix)
use is to display a unit of measurement or a currency symbol. For
example:
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 5
+ \snippet code/src_gui_widgets_qspinbox.cpp 5
To turn off the suffix display, set this property to an empty
string. The default is no suffix. The suffix is not displayed for
@@ -784,9 +784,9 @@ void QDoubleSpinBox::setMaximum(double maximum)
Note: The maximum and minimum values will be rounded to match the
decimals property.
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 6
+ \snippet code/src_gui_widgets_qspinbox.cpp 6
is equivalent to:
- \snippet doc/src/snippets/code/src_gui_widgets_qspinbox.cpp 7
+ \snippet code/src_gui_widgets_qspinbox.cpp 7
\sa minimum maximum
*/
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 5a7d6376ca..f3a19c88ec 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -94,9 +94,9 @@ public:
some initialization tasks are performed before the application's
main window is shown:
- \snippet doc/src/snippets/qsplashscreen/main.cpp 0
+ \snippet qsplashscreen/main.cpp 0
\dots
- \snippet doc/src/snippets/qsplashscreen/main.cpp 1
+ \snippet qsplashscreen/main.cpp 1
The user can hide the splash screen by clicking on it with the
mouse. Since the splash screen is typically displayed before the
@@ -107,7 +107,7 @@ public:
for example, announcing connections established or modules loaded
as the application starts up:
- \snippet doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp 0
+ \snippet code/src_gui_widgets_qsplashscreen.cpp 0
QSplashScreen supports this with the showMessage() function. If you
wish to do your own drawing you can get a pointer to the pixmap
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 17e1c39cee..126f819541 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -84,12 +84,12 @@ QT_BEGIN_NAMESPACE
reimplement QSplitter::createHandle() to instantiate the custom splitter
handle. For example, a minimum QSplitter subclass might look like this:
- \snippet doc/src/snippets/splitterhandle/splitter.h 0
+ \snippet splitterhandle/splitter.h 0
The \l{QSplitter::}{createHandle()} implementation simply constructs a
custom splitter handle, called \c Splitter in this example:
- \snippet doc/src/snippets/splitterhandle/splitter.cpp 1
+ \snippet splitterhandle/splitter.cpp 1
Information about a given handle can be obtained using functions like
orientation() and opaqueResize(), and is retrieved from its parent splitter.
@@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE
needs to perform. A simple subclass might only provide a paintEvent()
implementation:
- \snippet doc/src/snippets/splitterhandle/splitter.cpp 0
+ \snippet splitterhandle/splitter.cpp 0
In this example, a predefined gradient is set up differently depending on
the orientation of the handle. QSplitterHandle provides a reasonable
@@ -888,7 +888,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
The following example will show a QListView, QTreeView, and
QTextEdit side by side, with two splitter handles:
- \snippet doc/src/snippets/splitter/splitter.cpp 0
+ \snippet splitter/splitter.cpp 0
If a widget is already inside a QSplitter when insertWidget() or
addWidget() is called, it will move to the new position. This can be used
@@ -1569,7 +1569,7 @@ static const qint32 SplitterMagic = 0xff;
for a future session. A version number is stored as part of the data.
Here is an example:
- \snippet doc/src/snippets/splitter/splitter.cpp 1
+ \snippet splitter/splitter.cpp 1
\sa restoreState()
*/
@@ -1604,7 +1604,7 @@ QByteArray QSplitter::saveState() const
Restore the splitters's state:
- \snippet doc/src/snippets/splitter/splitter.cpp 2
+ \snippet splitter/splitter.cpp 2
A failure to restore the splitter's layout may result from either
invalid or out-of-date data in the supplied byte array.
@@ -1657,7 +1657,7 @@ bool QSplitter::restoreState(const QByteArray &state)
This function is provided for convenience. It is equivalent to
- \snippet doc/src/snippets/code/src_gui_widgets_qsplitter.cpp 0
+ \snippet code/src_gui_widgets_qsplitter.cpp 0
\sa setSizes(), widget()
*/
diff --git a/src/widgets/widgets/qstackedwidget.cpp b/src/widgets/widgets/qstackedwidget.cpp
index 5406f5dcf5..e239f86345 100644
--- a/src/widgets/widgets/qstackedwidget.cpp
+++ b/src/widgets/widgets/qstackedwidget.cpp
@@ -74,16 +74,16 @@ public:
Like QStackedLayout, QStackedWidget can be constructed and
populated with a number of child widgets ("pages"):
- \snippet doc/src/snippets/qstackedwidget/main.cpp 0
- \snippet doc/src/snippets/qstackedwidget/main.cpp 2
- \snippet doc/src/snippets/qstackedwidget/main.cpp 3
+ \snippet qstackedwidget/main.cpp 0
+ \snippet qstackedwidget/main.cpp 2
+ \snippet qstackedwidget/main.cpp 3
QStackedWidget provides no intrinsic means for the user to switch
page. This is typically done through a QComboBox or a QListWidget
that stores the titles of the QStackedWidget's pages. For
example:
- \snippet doc/src/snippets/qstackedwidget/main.cpp 1
+ \snippet qstackedwidget/main.cpp 1
When populating a stacked widget, the widgets are added to an
internal list. The indexOf() function returns the index of a
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp
index 4b9242499c..2b17d7fb83 100644
--- a/src/widgets/widgets/qstatusbar.cpp
+++ b/src/widgets/widgets/qstatusbar.cpp
@@ -186,12 +186,12 @@ QRect QStatusBarPrivate::messageRect() const
Use the showMessage() slot to display a \e temporary message:
- \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 8
+ \snippet mainwindows/dockwidgets/mainwindow.cpp 8
To remove a temporary message, use the clearMessage() slot, or set
a time limit when calling showMessage(). For example:
- \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 3
+ \snippet mainwindows/dockwidgets/mainwindow.cpp 3
Use the currentMessage() function to retrieve the temporary
message currently shown. The QStatusBar class also provide the
@@ -205,7 +205,7 @@ QRect QStatusBarPrivate::messageRect() const
addPermanentWidget() function. Use the removeWidget() function to
remove such messages from the status bar.
- \snippet doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp 0
+ \snippet code/src_gui_widgets_qstatusbar.cpp 0
By default QStatusBar provides a QSizeGrip in the lower-right
corner. You can disable it using the setSizeGripEnabled()
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index 261b96f8af..b8ffced6bb 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -1170,7 +1170,7 @@ QUrl QTextBrowser::historyUrl(int i) const
\row \li \a{i} > 0 \li \l forward() history
\endtable
- \snippet doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp 0
+ \snippet code/src_gui_widgets_qtextbrowser.cpp 0
\since 4.4
*/
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 217fda61dc..7a7b977b89 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -472,12 +472,12 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect)
For example, to allow the user to drag and drop an image onto a QTextEdit,
you could the implement these functions in the following way:
- \snippet doc/src/snippets/textdocument-imagedrop/textedit.cpp 0
+ \snippet textdocument-imagedrop/textedit.cpp 0
We add support for image MIME types by returning true. For all other
MIME types, we use the default implementation.
- \snippet doc/src/snippets/textdocument-imagedrop/textedit.cpp 1
+ \snippet textdocument-imagedrop/textedit.cpp 1
We unpack the image from the QVariant held by the MIME source and insert
it into the document as a resource.
@@ -1583,7 +1583,7 @@ bool QTextEdit::focusNextPrevChild(bool next)
Information about the event is passed in the \a event object.
- \snippet doc/src/snippets/code/src_gui_widgets_qtextedit.cpp 0
+ \snippet code/src_gui_widgets_qtextedit.cpp 0
*/
void QTextEdit::contextMenuEvent(QContextMenuEvent *e)
{
@@ -2143,7 +2143,7 @@ void QTextEdit::setAutoFormatting(AutoFormatting features)
It is equivalent to
- \snippet doc/src/snippets/code/src_gui_widgets_qtextedit.cpp 1
+ \snippet code/src_gui_widgets_qtextedit.cpp 1
*/
void QTextEdit::insertPlainText(const QString &text)
{
@@ -2157,7 +2157,7 @@ void QTextEdit::insertPlainText(const QString &text)
It is equivalent to:
- \snippet doc/src/snippets/code/src_gui_widgets_qtextedit.cpp 2
+ \snippet code/src_gui_widgets_qtextedit.cpp 2
\note When using this function with a style sheet, the style sheet will
only apply to the current block in the document. In order to apply a style
@@ -2273,10 +2273,10 @@ void QTextEdit::print(QPagedPaintDevice *printer) const
#endif
/*! \property QTextEdit::tabChangesFocus
- \brief whether \gui Tab changes focus or is accepted as input
+ \brief whether \uicontrol Tab changes focus or is accepted as input
In some occasions text edits should not allow the user to input
- tabulators or change indentation using the \gui Tab key, as this breaks
+ tabulators or change indentation using the \uicontrol Tab key, as this breaks
the focus chain. The default is false.
*/
diff --git a/src/xml/doc/doc.pri b/src/xml/doc/doc.pri
deleted file mode 100644
index d02e45e64e..0000000000
--- a/src/xml/doc/doc.pri
+++ /dev/null
@@ -1,3 +0,0 @@
-qtPrepareTool(QDOC, qdoc)
-docs.commands += $$QDOC $$QT.xml.sources/doc/qtxml.qdocconf
-QMAKE_EXTRA_TARGETS += docs
diff --git a/src/xml/xml.pro b/src/xml/xml.pro
index b8c24496ae..2fff0218e4 100644
--- a/src/xml/xml.pro
+++ b/src/xml/xml.pro
@@ -16,6 +16,9 @@ load(qt_module_config)
HEADERS += $$QT_SOURCE_TREE/src/xml/qtxmlversion.h
+QMAKE_DOCS = $$PWD/doc/qtxml.qdocconf
+QMAKE_DOCS_INDEX = ../../doc
+
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
win32-borland {
@@ -23,6 +26,5 @@ win32-borland {
QMAKE_CXXFLAGS_WARN_ON += -w-use
}
-include(doc/doc.pri)
include(dom/dom.pri)
include(sax/sax.pri)
diff --git a/tests/tests.pro b/tests/tests.pro
index 0c933681ee..0f50930774 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
+CONFIG += no_docs_target
SUBDIRS = auto
# benchmarks in debug mode is rarely sensible