summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* Extend the image viewer example.Friedemann Kleint2015-08-242-17/+120
| | | | | | | | | | Add: - Save As - Copy - Paste from clipboard into new image Change-Id: Ibbc308e9bbd2ce407119cd9358874f5c22a6bb83 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Polish the imageviewer example.Friedemann Kleint2015-08-212-66/+34
| | | | | | | | | | | | | | | | | - Remove unneeded member variables. - Use member initialization in the constructor. - Use new connection syntax in createActions() to assemble the menu there, removing the createMenus() function. - Fix coding style issue (braces) - Avoid empty label showing up by setting the scroll area invisible until an image is loaded. - Set a new image only if image read succeeds. - Add status bar with information message. Task-number: QTBUG-46848 Change-Id: I32d5af70d8eb71ec16dd58a0b98c32eb2bd988d7 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Tablet example: update the cursor according to the toolShawn Rutledge2015-07-319-11/+62
| | | | | Change-Id: Ibbe530856bb833e465dd9fa1da5425c018fecc21 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Tablet example: smoother, rotation stylus, better airbrushShawn Rutledge2015-07-314-59/+68
| | | | | | | | | | | | The drawing is antialiased and with rounded caps and joins. Rotation stylus acts like a felt marker. Airbrush sprays a radial gradient of color, and its alpha can depend on the tangential pressure if so chosen. Task-number: QTBUG-46694 Change-Id: I4fb16eb621707e3c56a75aa302dd0d3bf418a745 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-171-1/+3
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Use QImageReader::setAutoTransform() in examples.Friedemann Kleint2015-07-131-1/+3
| | | | | | | | | | | | Change-Id: If80616d680f1aa6c9d5cd1a4080710e5ad67d603 Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-013-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * fix usage of wince scopeOswald Buddenhagen2015-06-053-3/+3
| | | | | | | | | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devSimon Hausmann2015-06-041-1/+1
|\|
| * imageviewer example: support loading images on iOSRichard Moe Gustavsen2015-06-021-1/+1
| | | | | | | | | | | | | | | | | | Use the last path from QSP to hint that we want to load photos from the global photo library. This should currently only make a difference on iOS. Change-Id: I7a6217dbbbc2e247b69bf406c02001458c757211 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | use INSTALLS instead of DEPLOYMENTJoerg Bornemann2015-06-032-2/+2
|/ | | | | | | The DEPLOYMENT variable has been deprecated. Change-Id: I1c7c07b36a2e665ae302e4f43f7f2dc752f3c1f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Use C++ <cmath> instead of <math.h>Allan Sandfeld Jensen2015-02-161-3/+3
| | | | | | | | | | | | | | Including math.h can pollute the default namespace, and break some compilers if cmath versions of the method are declared as using. Switching to C++ math functions also greatly simplifies handling of float qreal as C++ automatically chooses the right method. [ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any sources depending on that indirect inclusion may fail to build. Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-15111-333/+333
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-11111-555/+555
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Remove traces of the Maemo platformTor Arne Vestbø2015-02-041-3/+0
| | | | | | | Change-Id: I6b551de331aa0386ea53d8e96f50b669777d2d69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* New Qt logoAlessandro Portale2014-11-053-0/+0
| | | | | | | | | | | | | This patch replaces the old Qt logo with the new, flatter one. The PNGs were optimized via: optipng -o7 -strip "all" Task-number: QTBUG-41685 Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488 Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix includes in mousebuttons exampleAlexander Volkov2014-10-273-3/+6
| | | | | | | Remove QtWidgets from buttontester.h and QtGui from main.cpp. Change-Id: Ie5925a33c58c1abd9747ab0ab7040e7d1b0769a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix executable name of mousebuttons example.Friedemann Kleint2014-10-091-1/+1
| | | | | Change-Id: Icf41ade3a4d2d14535e6fd42212b27ac01c5177f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-1518-55/+55
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-013-25/+58
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Polish the image viewer example.Friedemann Kleint2014-06-123-25/+58
| | | | | | | | | | | | | | | | | | | | | | | | - Open files passed on the command line. - Point the file dialog to the pictures location and use a filter string for the supported types. - Set the window title according to file name. Task-number: QTBUG-37203 Task-number: QTBUG-39287 Change-Id: I4e5e43875c3a7544c862c054181e75942939c1d5 Reviewed-by: David Faure <david.faure@kdab.com>
* | Wiggly example: Modernize/compactify codehjk2014-05-123-24/+13
|/ | | | | | Change-Id: Iacfb308baac8eea60d56bf559113b36acb79d82a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-122-4/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * Fix out-of-tree compilation of widget examplesKai Koehne2014-02-112-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 'styles' are only defined in the qt build internals, when the examples are compiled inside a configured Qt source. That's not the case for the examples e.g. in the Qt SDK. (windows is a default style on all platforms, anyway. So I think the check is superfluous in the first place.) Task-number: QTBUG-36655 Change-Id: I7114619efd479408dad99c8514f8e33ddcab7c7c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-136-46/+46
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | added QAbstractSpinBox::setGroupSeparatorShown function.Oto Magaldadze2013-10-292-0/+28
|/ | | | | | | | | | | [ChangeLog][QtWidgets][QAbstractSpinBox] QTBUG-5142 - This will allow a group (thousand) separator to be shown in QSpinBox and QDoubleSpinBox widgets. Task-number: QTBUG-5142 Change-Id: I2e23f5f83c93bb092a2dbd784e06d17d40d42909 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-0912-24/+0
| | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-2315-542/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Doc: Remove applicationicon and orientation examples from QtWidgetsTopi Reinio2013-05-0815-542/+0
| | | | | | | | | | | | | | | | | | These two widget-based, mobile-targeted examples are obsolete, defunct, and/or serve no purpose in Qt 5. Task-number: QTBUG-31023 Change-Id: Ie5732734bb2547b1ea701d7b3c8dcd806362de09 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Set the base used to display the spin box valueKevin Ottens2013-05-071-0/+10
|/ | | | | | | | | | Provide a new displayIntegerBase property which control the base used by the spin box to display the value in its internal line edit. Change-Id: Ibadc37107db8770d757b64350946bf19142e8f6c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-165-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Compile fix when QT_NO_PRINTDIALOG is definedPaul Olav Tvete2013-02-262-2/+2
| | | | | | | ...but QT_NO_PRINTER isn't. Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Merge branch 'release' into stableSergio Ahumada2013-01-311-1/+1
| |\ | | | | | | | | | Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
| | * Fix some more old references and links to NokiaSergio Ahumada2013-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28156 Change-Id: I9ba0d6f1e92103219bec1e61e716b6b2f269a8ad Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Keep QLineEdit placeholder text visible when focusedAurélien Gâteau2013-02-011-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | This is useful when the widget is focused by default, and also gives another opportunity to the user to read the message before typing, removing the need for workarounds like clicking in another text entry to bring back the placeholder message. Change-Id: I4a2981a6656a87934b5c8ed4a8a2dc13b748c94d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* / Update copyright year in Digia's license headersSergio Ahumada2013-01-18115-115/+115
|/ | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-212-2/+2
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* clean up example project files, mostly wrt QT+=widgetsOswald Buddenhagen2012-12-1722-48/+45
| | | | | | | | | move QT+=widgets (and printsupport) statements before the install statements, and de-duplicate some cases. also move some TARGET assignments to a more conventional place. Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Enhance example qtbase/examples/widgets/widgets/mousebuttonsRick Stockton2012-12-143-6/+55
| | | | | | | | | | | Add Display and QDebug() of Qt::MouseButtons values. (I.e., Buttons believed to be in 'Pressed' State by Qt.) Assists in platform plugin mouse software debug. Task-number: QTBUG-28603 Change-Id: I4a7a3ac44a8cc7eb1eceb9f348493b58b12dbd69 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix compile with -DQT_NO_WHEELEVENTMontel Laurent2012-12-052-0/+4
| | | | | Change-Id: Icc345e2a361fc233d7debfa88bef2a3a8375fa8f Reviewed-by: David Faure <david.faure@kdab.com>
* Fix memory leak. PrinterDialog is not deleted when close itMontel Laurent2012-11-301-2/+2
| | | | | Change-Id: I9f0a300cdaf9803bc2ad723946ac4d0f825cc28b Reviewed-by: David Faure <david.faure@kdab.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-11-2928-86/+31
| | | | | | | | | | | | | it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk <qthjk@ovi.com>
* remove rather useless text fileOswald Buddenhagen2012-11-281-4/+0
| | | | | | | somebody who cares can find the information in the git log Change-Id: I97dff4ab33a773247e1320ba6491e6377a2b94e7 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* delete .desktop files of examplesOswald Buddenhagen2012-11-2826-286/+0
| | | | | | | | | they were added without an explanation, and they can't be particularly useful (because they contain hard-coded paths and refer to non-existing icons). Change-Id: I27e2c35375e28645b0c03449ddc7ac7017da5943 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Examples: inherit NorwegianWoodStyle from QProxyStyleJ-P Nurmi2012-11-262-9/+14
| | | | | | | | | | | | | | The QStyle specializations are being made internal. The recommended way to customize styles is now to use QProxyStyle (& QStyleFactory), or to implement a full custom style one can alternatively subclass QCommonStyle. The proxy style approach was chosen for this case, since the example assumes some drawing functionality provided by the windows style and it is not a "complete" custom style implementation but more like a customization anyway. Change-Id: Ib2477339cfef258cfc944a76a2eea728066e1f45 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-2628-55/+55
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* LocaleSelector: Replace hard-coded impl with an algorithmic oneKonstantin Ritt2012-11-251-253/+23
| | | | | | | | The old implementation is just not acceptable! The new one is able to distinguigh locales by script. Change-Id: Ic772f6da8744825080f739e64af00267e5f82434 Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Fix building of examples.Friedemann Kleint2012-11-2128-57/+57
| | | | | | | | | | | - Correct install path of widget examples to contain widgets directory in target tree. - Add missing resources. Task-number: QTBUG-27977 Change-Id: If4cb117998892b0b165d7678367553d3a7553b91 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Do the actual removal of the Soft Keys API and related codeJan Arve Saether2012-10-296-361/+0
| | | | | | | | | | | | | | | | | | | In addition to the actual removal of the softkeys API in QAction, this commit removes some enums related to the softkeys feature: Qt::WA_MergeSoftkeys Qt::WA_MergeSoftkeysRecursively It also removes some "zombie" enums: Qt::WindowSoftkeysVisibleHint = 0x40000000, Qt::WindowSoftkeysRespondHint = 0x80000000, (The only implementation that used these were removed when qapplication_s60.cpp and qwidget_s60.cpp were removed.) Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>