summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-141-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module_headers.prf tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qwidget/BLACKLIST Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
| * QLineEdit example: fix link to QLineEdit::setInputMaskChristian Ehrlicher2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | Fix a typo to properly link to setInputMask instead setMask. Task-number: QTBUG-61775 Change-Id: I0cb00de8dcaece613467e25b41e93661d6e98308 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Rename the tablet example to avoid triggering a bug in tablet driversAndre de la Rocha2018-05-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems there is a subtle bug in the Wacom tablet drivers for Windows that is triggered in the very particular case where the running executable is named "tablet.exe", regardless of its installation path. It causes WM_POINTER* messages not to be delivered to the application, initially, but only after the application's window is reselected, after another application's window had been selected. It happens at least on Windows 10 systems with Wacom Bamboo tablets and drivers, and was reproduced with non-Qt-based applications also. It looks like a bad compatibility setting that makes "tablet" a cursed target name for applications using tablet functionality. It seems older versions of the drivers used to contain an executable with this name, although it seems to be absent in newer versions. Unfortunately, the Qt tablet example uses this name, which breaks it when used with upcoming WM_POINTER* messages support. Change-Id: I931cc725b9117b4604267f7b0172110ae61700de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Examples: fix network-chat in the presence of an IPv6 stackThiago Macieira2018-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | Since we bind to QHostAddress::Any, the incoming packets are actually IPv4-mapped IPv6 addresses and the operator== strict comparison was failing. Instead, use isEqual(), which defaults to TolerantComparison. Change-Id: Ic38ec929fc3f4bb795dafffd150ac6b3a0a7e3b2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-036-7/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * Examples: Fix unused variable warnings by ClangFriedemann Kleint2018-05-023-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | mainwindow.cpp(59,11): warning: unused variable 'ROWS' [-Wunused-const-variable] const int ROWS = 2; mainwindow.cpp(60,11): warning: unused variable 'COLUMNS' [-Wunused-const-variable] const int COLUMNS = 3; mainwindow.cpp(76,19): warning: unused variable 'message' [-Wunused-const-variable] Task-number: QTBUG-60635 Change-Id: I97c31462ffa826da9baa32c33c0ff0140bf46dfc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Examples: Fix Clang warning about hiding QGraphicsItem:::advance()Friedemann Kleint2018-05-023-3/+3
| | | | | | | | | | | | | | | | | | In file included from edge.cpp:52: ./node.h(76,10): warning: 'Node::advance' hides overloaded virtual function [-Woverloaded-virtual] bool advance(); Change-Id: I9d437059362c367e452b1b4f16077d4e0abd18de Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-024-4/+4
|\| | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * Vulkan Examples: Fix Clang warnings about initialization of VkClearColorValueFriedemann Kleint2018-04-304-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | hellovulkanwindow.cpp(97,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0.0f, m_green, 0.0f, 1.0f }; hellovulkantexture.cpp(771,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0, 0, 0, 1 }; ..\shared\trianglerenderer.cpp(455,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0, 0, 0, 1 }; renderer.cpp(896,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0.67f, 0.84f, 0.9f, 1.0f }; Change-Id: I3c2403699059dac2f88541f2a2102b774db0c887 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-262-41/+58
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| * Doc: Update doc for Dir View ExampleNico Vertriest2018-04-251-11/+10
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I4a23f4866c76b9f5c29653ca30e44c3b844a9aa8 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Gradients ExampleNico Vertriest2018-04-251-30/+48
| | | | | | | | | | | | | | | | | | modify to latest syntax for connect statements Task-number: QTBUG-60635 Change-Id: Ie0f8f6bdbd5aec7379f7572e978adf65b9a96bdc Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Examples: fix wrong QRegExp in Custom Sort/Filter Model ExampleChristian Ehrlicher2018-04-222-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | Fix wrong QRegExp in Custom Sort/Filter Model Example and replace it with QRegularExpression. Task-number: QTBUG-61129 Change-Id: I515474ee6985d36195d90dcd93876ba28a83bccc Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLars Knoll2018-04-121-1/+1
|\| | | | | | | Change-Id: I9f802cb9b4d9ccba77ca39428a5cb1afd2d01642
| * Fix documentation of the Event Transitions ExampleFriedemann Kleint2018-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix warning: eventtransitions.qdoc:50: (qdoc) warning: Unknown command '\s1' Amends 3b2d2ada5b1b66ad65eda10d70b5b48d32ef9c5. Task-number: QTBUG-60635 Change-Id: I4002c9769d30d9b8cb2a7255aa2258f6251ea39f Reviewed-by: Martin Smith <martin.smith@qt.io>
* | textedit example: Fix disabled Cut/Copy menu itemsGabriel de Dietrich2018-04-101-0/+2
| | | | | | | | | | | | | | This amends commit fe1ea010b946518803ca1cec1332945c26be83af. Change-Id: Ia1f9fa4a6dd4481b5295df986f882f1120c3d8b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-105-52/+101
|\| | | | | | | Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
| * Doc: Update connect syntax in I18n Widgets ExampleNico Vertriest2018-04-092-4/+7
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Icfa0d09ac6c9ad4396fbe1138277bb1dd866a803 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Add brief statements to Address Book Example chaptersNico Vertriest2018-04-091-2/+8
| | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Ice6d2b6a475ba4352a87bb46366826334aed2af2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Find Files exampleNico Vertriest2018-04-091-39/+66
| | | | | | | | | | | | | | | | | | | | - review text - update screenshot Task-number: QTBUG-60635 Change-Id: I596ce0e08be9ed9aea7834eeda1c3c2c19c28d7a Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Update Event Transitions ExampleNico Vertriest2018-04-091-7/+20
| | | | | | | | | | | | | | | | | | | | - added screenshot - some modifications to the text Task-number QTBUG-60635 Change-Id: I57b269f93cdba696b424b5ba008d0f46ac612cda Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-311-3/+6
|\| | | | | | | Change-Id: I33b47095efdfe0ba698c6a88ca41ec911f432208
| * Improve the Frozen Column exampleSamuel Gaist2018-03-291-3/+6
| | | | | | | | | | | | | | | | | | This patch updates the frozen column example to use QTextStream which offers a more convenient way to read text files and also takes care of converting the 8-bit data stored on disk into a 16-bit Unicode QString. Change-Id: Ifd03903ac14b48b026d8770cda726f8ed2756ab4 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-282-0/+5
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * Add Qt::SvgMiterJoin option to pathstroke exampleKai Pastor2018-03-212-0/+5
| | | | | | | | | | | | | | | | | | | | Qt::SvgMiterJoin is more important than the name suggests: It is used not only by SVG but also by PDF. It differs from Qt::MiterJoin in the miter limit behavior. Task-number: QTBUG-52640 Change-Id: I8ad04b1231958628caab18a233d54d42ea6449e7 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | Examples: replace QDesktopWidget::availableGeometry()/screenGeometry()Christian Ehrlicher2018-03-272-5/+5
| | | | | | | | | | | | | | | | | | QDesktopWidget::availableGeometry()/screenGeometry() was deprecated in 5.11 and replaced with QScreen::availableGeometry()/screenGeometry() Change-Id: I912a133971c41196f8f49754c28ce92711ff42bb Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Examples: replace QDate::longMonthName()/longDayName()Christian Ehrlicher2018-03-271-3/+3
| | | | | | | | | | | | | | | | QDate::longMonthName()/longDayName was deprecated in 5.10 and replaced by QLocale::system().monthName()/dayName() in this case Change-Id: I666cccfa1b8a437cc830804bbe3504511265ea9b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Examples: replace deprecated QQuaternion::conjugate()Christian Ehrlicher2018-03-271-8/+8
| | | | | | | | | | | | | | | | QQuaternion::conjugate() was deprecated with 5.5 and replaced by QQuaternion::conjugated(). Change-Id: I0176e3db82e9ad793f60e1034a22b11832c8c44d Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | Update rasterwindow example to not render in resizeEventTor Arne Vestbø2018-03-202-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resize event should not be used to draw, as there will be a follow-up exposeEvent delivered just after, and we don't want to draw twice. This is how QRasterWindow operates too, except it defers the backingstore resize to beginPaint() instead of resizing in the reizeEvent. It's also how QOpenGLWindow operates, which also has a note for the virtual resizeGL method saying: "Scheduling updates from here is not necessary. The windowing systems will send expose events that trigger an update automatically." Change-Id: I2a9740018508c2eb129149f53237ee8e378c03b1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-182-24/+35
|\| | | | | | | Change-Id: Icf3b9346117ce7149d8687e4cfa182e7586713f3
| * regularexpression example: Add raw string literal displayFriedemann Kleint2018-03-172-24/+35
| | | | | | | | | | | | | | | | | | | | Factor out the line edit displaying the code to a class and add another instance for displaying raw string literals. Task-number: QTBUG-60635 Change-Id: I4614e4a56e355bad5158523c58edf784868dbf4d Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-158-37/+165
|\| | | | | | | Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
| * sub-attaq example: Fix crash with software Open GLFriedemann Kleint2018-03-141-2/+7
| | | | | | | | | | | | | | | | | | Check whether an Open GL context could be created, else fall back to raster. Task-number: QTBUG-64797 Change-Id: I91bba41b0efca85293a1a4af054842b9f309b126 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Doc: Complete Dynamic Layouts ExampleNico Vertriest2018-03-143-29/+108
| | | | | | | | | | | | | | | | | | | | | | - add doc to code - replace old signal/slot syntax - more up-to-date screenshot Task-number: QTBUG-60635 Change-Id: Iec3d2c3d0d8b9c07ccd4446d74d5eca2d88e7e08 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: complete Dir View ExampleNico Vertriest2018-03-131-3/+33
| | | | | | | | | | | | | | | | - add updated screenshot - add basic doc to example code Change-Id: Iad616b285ee1470571adc38b868fcf8a0ed64840 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Add doc to Graphics View Flow Layout exampleNico Vertriest2018-03-133-3/+17
| | | | | | | | | | Change-Id: Id3965d099222607cee4252bbb33c6a1e9c17765a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Examples: fix superfluous ';' in undo exampleChristian Ehrlicher2018-03-121-1/+1
| | | | | | | | | | | | | | | | | | There was a superfluous ';' at the end of main. No compiler will complain I guess but the examples should be syntactically correct. Task-number: QTBUG-55128 Change-Id: I2ddc3041ed05106d04fb4f4ad74735c72c9ddb26 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-071-8/+8
|\| | | | | | | Change-Id: I110feec4750bd304975bab4f3f33d3a61a4e08bd
| * Doc: Update example Embedded DialogsNico Vertriest2018-03-051-8/+8
| | | | | | | | | | | | | | | | Changed old signal/slot syntax to new version Task-number: QTBUG-60635 Change-Id: I7cbe8851d321b7632a08c098b69a96cc346d5f83 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | preserve HTML heading level in QTextBlockFormat; demonstrate in exampleShawn Rutledge2018-03-022-49/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading an HTML file with <H1> for example, we still set the font size as before (that's how it always was done), but now it remembers that it came from an H1 tag, so it writes <h1 ...><span font-size:xx-large ...> ... rather than <p ...><span ...> ... This will help with the upcoming Markdown format, where heading level is saved but the font is not. Now the style combobox in examples/widgets/richtext/textedit can set list item type, heading type or "standard" formatting, and also shows the current formatting of the line that has the cursor. It was always a shortcoming in this example that it only allowed setting the current line's block format but had no feedback to show the current format. Change-Id: I0a7849b74f23fea84d3375c487c3a6b9f43240c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-221-15/+15
|\| | | | | | | Change-Id: Iec636692e8b7d1fe1bc0476e49c5054a5892d639
| * Fix some qdoc-warnings for 5.11Friedemann Kleint2018-02-211-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename example savegame and its snippets following a6b697ca13945a174cff9f3e9b1af1cf61c0bea5. Fix: /qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:28: warning: Cannot find file 'json/savegame/savegame.pro' or 'json/savegame/savegame.qmlproject' qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:98: (qdoc) warning: Cannot find file to quote from: 'json/savegame/level.cpp' json qtbase/src/network/ssl/qsslconfiguration.cpp:889: warning: Undocumented parameter 'name' in QSslConfiguration::setBackendConfigOption() qtbase/src/corelib/tools/qbitarray.cpp:314: warning: No such parameter 'len' in QBitArray::fromBits() Change-Id: If59512873ca2116b89490927fdbf9ea1d8b237a8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-212-15/+43
|\| | | | | | | Change-Id: I9c90d71fde002544fd97df7e8a2690953cf9f817
| * Doc: review language and spelling in Editable Tree Model ExampleNico Vertriest2018-02-191-15/+15
| | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: If82e3e36e5f6d1044028dc4454f2db13f84754d8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Doc: complete Border Layout ExampleNico Vertriest2018-02-191-0/+28
| | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Icc605e5bad96aaad0233d4b05ab1ed46972bd725 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-166-5/+20
|\| | | | | | | | | | | | | Conflicts: src/corelib/tools/tools.pri Change-Id: I705630f9cecbf0ce51a22fc6116b8c49611259e9
| * Merge "Merge remote-tracking branch 'origin/5.10' into 5.11" into ↵Liang Qi2018-02-153-1/+13
| |\ | | | | | | | | | refs/staging/5.11
| | * Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-153-1/+13
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| | | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-292-3/+7
| | | |\ | | | | | | | | | | | | | | | Change-Id: I6b40ecee4db13e6329e7a0433b57c5bca473c63f
| | | * | rasterwindow: End painting on device before ending on backingstoreTor Arne Vestbø2018-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib42de1d7ad0d14e2e2d2ff75606e6cfd7e584c2a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>