summaryrefslogtreecommitdiffstats
path: root/examples/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Address Book example: Replace QPair by structAlexander Volkov2017-10-174-54/+64
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce Contact struct to store contact data and use it instead of QPair<QString, QString>. Proper naming really clarifies the code. Task-number: QTBUG-60635 Change-Id: Ibfb421dfc854accc382212b0da46e7aafc0d528a Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-174-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Doc: minor language editsNico Vertriest2017-09-291-3/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: Ic1aef003be9cd08dc38021e5b4a4add8cabbfa98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Doc: update screenshot stylesheet exampleNico Vertriest2017-09-291-0/+0
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I4485502510aca2797ead28f3b0085d1060ea3d49 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
| * | Doc: minor corrections doc Calendar Widget ExampleNico Vertriest2017-09-291-5/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I41d9af6836dc80b5c5c5303d313d15daff72b37f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * | Doc: update Editable Tree Model ExampleNico Vertriest2017-09-291-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - new screenshot with more up-to-date graphical look - deleted itemviews-editabletreemodel.png from old folder doc/src/images - deleted unnecessary item in qtwidgets.qdocconf Task-number: QTBUG-60635 Change-Id: I9b82fa027347fb0fd7adb86038abd32853e68c3a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-264-11/+67
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | examples: remove wince leftoversGatis Paeglis2017-09-221-1/+0
| | | | | | | | | | | | | | | | | | | | | This patch ammends c8602f45cc13c3c900e6db9f09b38365d00cdccc Change-Id: I6bbc892b514b1768e4cc3a4d52aa420a6e9bb4e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Polish the StorageView exampleFriedemann Kleint2017-09-203-10/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce nullptr and override. Change the ready/valid columns to use check marks. Right-align the numerical columns. Add a shortcut to refresh. Sort by path, making sure the root volume is first. Task-number: QTBUG-60635 Change-Id: I74cda7647f544902aaf4d2a0ab76986f1523aa6f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-1915-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Tablet example: update only the drawn areas of the canvasShawn Rutledge2017-09-152-2/+7
|/ / | | | | | | | | | | | | | | This makes an enormous difference in responsiveness on the iPad Pro: it actually feels like real-time drawing with hardly any lag. Change-Id: I17c3b948e818d4ee46b4d24934c929ab9b386e69 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-7/+94
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Regular Expression Example: Add context menuFriedemann Kleint2017-07-191-7/+94
| | | | | | | | | | | | | | | | | | | | | | Add context menu providing: "Escape Selection" Apply QRegularExpression::escape() to selection "Paste from Code" Paste from C++ "Copy to Code" (for completeness) Task-number: QTBUG-60635 Change-Id: Iee15c2243c7d0435b623dde4a1b26249aecd0553 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-194-13/+3
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Examples: Remove remains of winceFriedemann Kleint2017-07-144-13/+3
| | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60628 Task-number: QTBUG-60633 Task-number: QTBUG-60635 Task-number: QTBUG-60641 Task-number: QTBUG-60659 Change-Id: I9ffc3e25893d2281b19cc12b70e1a92fb2a8b708 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-136-404/+1
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * pathstroke example: Add Q_FALLTHROUGH to unmarked fallthrough seen by GCC 7Friedemann Kleint2017-07-091-0/+1
| | | | | | | | | | | | Task-number: QTBUG-60635 Change-Id: I10695f96122f1b0859bbe7fadb349efb3c7277a6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Remove WinCE-specific sipdialog exampleFriedemann Kleint2017-07-055-404/+0
| | | | | | | | | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60635 Change-Id: Ie6d59d1431645faf93d1538fe9f5bf1bea9f3014 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Exploit QVector3D::length() instead of duplicating its workEdward Welbourne2017-07-071-1/+1
| | | | | | | | | | | | | | | | | | Calling the class-method dotProduct(x, x) in order to then take its square root is a clumsy way to obfuscate x.length() - and lacks its efforts (clumsy though they are) to limit rounding issues. Change-Id: I1dc1f38764651bc70c0620e286cb5625f505ddbf Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0610-0/+10
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Doc: Add list with widgets examples using layoutsNico Vertriest2017-07-0310-0/+10
| | | | | | | | | | Change-Id: I585cd63f68220467de1beed3346cdaa12af2b34b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-055-25/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0410-11/+15
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Convert features.wizard to QT_[REQUIRE_]CONFIGStephan Binner2017-07-021-1/+5
| | | | | | | | | | Change-Id: I43e3d9f55a21ae0f602fc43c570321d0152cd8b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.statustip to QT_CONFIGStephan Binner2017-06-291-2/+2
| | | | | | | | | | Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-288-8/+8
| | | | | | | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Be (somewhat more) consistent about the value of piEdward Welbourne2017-06-209-54/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use M_PI (and friends), where possible, in favor of hand-coded approximations of various (in)accuracies. Where that's not available (e.g. fragment shaders), use the same value that qmath.h uses for M_PI, for consistency. Replaced math.h with qmath.h in places that defined a fall-back in case math.h omits it (it's not in the C++ standard, although M_PI is in POSIX); or removed this entirely where it wasn't used. Reworked some code to reduce the amount of arithmetic needed, in the process; e.g. pulling common factors out of loops. Revised an example's doc to not waste time talking about using a six-sig-fig value for pi (which we no longer do) - it really wasn't relevant, or anything to be proud of; nor did the doc mention its later use. Task-number: QTBUG-58083 Change-Id: I5a31e3a2b6a823b97a43209bed61a37b9aa6c05f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QLocale::formattedDataSize and consolidate use casesShawn Rutledge2017-06-201-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It should be easier to translate sizes in bytes to human-readable strings consistently rather than having to repeat this code (and the string translations) in various places. The FileDialog in QtQuick.Controls has a use for this, too. [ChangeLog][QtCore][QLocale] Added QLocale::formattedDataSize() for formatting quantities of bytes as kB, MB, GB etc. Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I27bca146c3eba90fa7a5d52ef6626ce85723e3f0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-0711-21/+63
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Convert features.printdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-05-3011-21/+63
| | | | | | | | | | Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | tablet example: don't update the cursor image on iOSShawn Rutledge2017-06-021-0/+2
| | | | | | | | | | | | | | | | There is no visible cursor on iOS, so updating the image is a waste of time. Removing this does in fact speed up rendering of the strokes. Change-Id: If958fabeefd4273644707277d4a084855d415bb1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-291-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * Doc: Replace "Macintosh" with something suitable or omit itLeena Miettinen2017-05-231-2/+2
| | | | | | | | | | Change-Id: I3067bd7e6ae2d6d68d5232a56eaf368a0415876c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | tablet example: enable high-DPI renderingShawn Rutledge2017-05-152-16/+25
| | | | | | | | | | | | Change-Id: Ie03867208902fdc9cf794de16d7249c8994351f4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devFrederik Gladhorn2017-05-101-1/+1
|\| | | | | | | Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
| * Remove some more register keywordsMarc Mutz2017-05-061-1/+1
| | | | | | | | | | | | | | They're deprecated since C++11 and removed in C++17. Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tablet example: use stylus rotation property correctlyShawn Rutledge2017-05-081-5/+5
| | | | | | | | | | | | | | | | | | It was backwards from the expected value, consistently on iOS and xcb. It was already that way in 5.6, and we don't document which way is clockwise. So it seems to be just the example which is wrong. Change-Id: Ibbdadc2ae240017abc87439a2694fb5fbd3d07f8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | tablet example: make smoother strokes with the rotation stylusShawn Rutledge2017-05-082-2/+12
| | | | | | | | | | | | | | | | | | | | Each stroke is a polygon (quadrilateral) connecting the previous tablet event point to the current one. Previously we used the same width for both ends of the stroke, so rapid changes in pressure caused steps in the stroke width. Now it is tapered from one end to the other. Change-Id: I909a2e85334a1a6e20fd28ee4babf6825da36612 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-071-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * examples: fix compile without gui modulePeter Seiderer2017-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With disabled gui module qmake in the directory examples/gui and examples/widgets failes with: Project ERROR: Could not find feature opengl. Fix this by protecting 'qtConfig(opengl)' by 'qtHaveModule(gui)' as already done in examples/examples.pro. Task-number: QTBUG-60488 Change-Id: Ia842124e818e8c81d41d2b8e3b8905bf1dee58ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-204-35/+37
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-183-31/+32
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| | * Doc: updated QSyntaxHighlighter documentation and use QRegularExpressionSamuel Gaist2017-04-123-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of QSyntaxHighlighter still uses the deprecated QRegExp class. This patch updates the code samples as well as cleanup some typos. Change-Id: I87b525fddb560b7c5bb38f96d9aaceadb594f76c Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | examples: remove some unneeded QStringRef::toString() callsMarc Mutz2017-04-071-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - when appending to another string - when just comparing - when just calling toInt() Change-Id: I6960784569b83bfd3e3640a8c04f2f909c293449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-271-0/+1
| |\| | | | | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| | * Build examples and tests only if their requirements are metUlf Hermann2017-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the respective modules aren't available we cannot build the tests and examples. We drop the qtConfig(opengl) requirement for the opengl examples as a, we would need to make the QtGui configuration available for that to work, and b, we should not add too much detail to the tests and examples build configurations. Checking each test and example for every feature it uses would be too much. Task-number: QTBUG-57255 Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-201-4/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-4/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e