summaryrefslogtreecommitdiffstats
path: root/examples/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate one overload of QInputDialog::getDouble() for 5.15Jan Arve Sæther2020-02-121-1/+2
| | | | | | | ...and merge the two overloads of getDouble() in Qt6 Change-Id: I55faa2ff222b41e48889a0ef14dd00a6da691c36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-041-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/widgets/widgets/imageviewer/imageviewer.cpp src/corelib/text/qchar.cpp src/corelib/time/qdatetime.cpp Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
| * Examples: fix compile without printsupportChristian Ehrlicher2020-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | Checking for QT_CONFIG(printdialog) is not enough when printsupport is completely disabled since then the macro will throw an error. Therefore add an additional check 'defined(QT_PRINTSUPPORT_LIB)' before using the QT_CONFIG macro. Fixes: QTBUG-81626 Change-Id: Ie9898f057cdd6bf9daf4ba9135987cb6e901e7bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
|/ | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prepare for deprecating the QDesktopWidgetSona Kurazyan2019-10-151-2/+2
| | | | | | | | | | | | | | QDesktopWidget is marked as obsolete in docs, but it is not yet completely deprecated, some of its methods are still in use. Replace uses of the following methods marked as obsolete: - QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry() - QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cleanup QtWidgets examplesChristian Ehrlicher2019-10-117-21/+21
| | | | | | | | | | | Cleanup QtWidgets examples: - use nullptr (clang-tidy) - use member-initialization - adjust the style - fix includes Change-Id: Ic5448606aacc525ea60b615a69227017aa2b821a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-304-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| * I18N: Load qtbase_ translation catalogs in examplesLeena Miettinen2019-09-274-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...instead of the qt_ meta catalogs. The qt_ catalogs are needed for backwards compatibility and depend on translations for now deprecated modules, such as qtscript, that might not be installed in the system. This causes loading the translation to fail. Instead of the qt_ catalogs, the examples should use the translation files for the Qt modules used, here qtbase_. Task-number: QTBUG-69203 Change-Id: I13f5a3d6653cef8379a712fbc02ec320eea4e51a Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Remove usages of deprecated APIs of qtbase/widgetsSona Kurazyan2019-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Build docs for deprecated APIs conditionally, based on deprecation version. Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. - Modify the tests to make them build when deprecated APIs disabled: * Make the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, add tests for the replacement Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QFileDialog: mark obsolete enum DontUseSheet as deprecatedChristian Ehrlicher2019-05-171-1/+0
|/ | | | | | | | | | QFileDialog::DontUseSheet is obsolete since 4.5 and not used anywhere inside the Qt code base. Mark it as deprecated and remove the last usage in the examples. Change-Id: If3d23fd5906314e6ebc7080efa79da14a2aa2720 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-204-0/+7
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| * Use High DPI pixmaps in prominent examples and testsFriedemann Kleint2019-03-154-0/+7
| | | | | | | | | | | | | | | | | | Set AA_UseHighDpiPixmaps. Task-number: QTBUG-52622 Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QtBase: compile examples with QT_DISABLE_DEPRECATED_BEFORE=0x050d00Christian Ehrlicher2019-02-131-1/+1
| | | | | | | | | | | | | | | | Replace deprecated functions to be able to compile examples with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: If6b8de31f526320d6a0e2a20bb5f8e26c77f2353 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Cleanup Widgets examples - foreachChristian Ehrlicher2019-01-231-1/+2
| | | | | | | | | | | | | | | | | | Cleanup the Widgets examples - replace foreach with range-based for loop in the remaining directories Change-Id: I321e6c0f414401a1ae4fb65762b97d894b725afa Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | Cleanup Widgets examples - nullptrChristian Ehrlicher2019-01-233-6/+6
|/ | | | | | | | | Cleanup the widgets examples - replace 0 with nullptr Change-Id: Id4bf119b9a41f6d10117f3a613a6e604128fa196 Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qtlite: Skip building examples when configured with no-feature-itemviewsRainer Keller2018-01-123-0/+3
| | | | | | | | | Compiling the default examples should be possible without compile errors. Task-number: QTBUG-53141 Change-Id: I73d8787241291ae6230861a89b38e91d900fede0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: remove Config Dialog ExampleNico Vertriest2017-12-2711-521/+0
| | | | | | | Task-number: QTBUG-60635 Change-Id: I089f14a92f1b9c53b26200c93cac7ee3c9f26d65 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Improve the findfiles example: use QDirIterator, etcShawn Rutledge2017-12-272-35/+24
| | | | | | | | | | | | | | It hasn't been necessary for a long time now to write the recursive file-find function manually. It has just been an obscurely documented feature of QDirIterator for far too long. Demonstrate the new QLocale::formattedDataSize() function. Also sync up the qdoc description of this example with the recent changes. Change-Id: I9c2bb15bb5ec353d38181b160f0be198774cbea2 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* examples: remove wince leftoversGatis Paeglis2017-09-221-1/+0
| | | | | | | This patch ammends c8602f45cc13c3c900e6db9f09b38365d00cdccc Change-Id: I6bbc892b514b1768e4cc3a4d52aa420a6e9bb4e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* 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>
* Remove WinCE-specific sipdialog exampleFriedemann Kleint2017-07-054-277/+0
| | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60635 Change-Id: Ie6d59d1431645faf93d1538fe9f5bf1bea9f3014 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* 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.printdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-05-301-1/+6
| | | | | Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Example: migrate the classwizard example to use QRegularExpressionSamuel Gaist2017-01-241-1/+2
| | | | | | | | Update the classwizard example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I125664549e249c4156f8c664fac7648f1c41f9d5 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Example: migrate licensewizard example to use QRegularExpressionSamuel Gaist2017-01-241-2/+4
| | | | | | | | Update the licensewizard example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ib6e0ee9ec802e83540b1c37846b99378395fe0ec Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-3/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5971b88e is not needed in new configure. This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with apple SDK", 2c9d15d7, because it breaks iOS build with new configure system. Conflicts: mkspecs/features/default_pre.prf mkspecs/features/mac/toolchain.prf mkspecs/features/toolchain.prf src/dbus/qdbusconnection.cpp src/plugins/sqldrivers/mysql/qsql_mysql.cpp src/sql/drivers/mysql/qsql_mysql.cpp src/widgets/widgets/qmenubar.cpp src/widgets/widgets/qmenubar_p.h tools/configure/configureapp.cpp tools/configure/environment.cpp tools/configure/environment.h Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-3/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
| | * Fix compilation of findfiles examples with QT_NO_CLIPBOARDFriedemann Kleint2016-09-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Amends change d1a30be5abcc2d5e5340866434b2691275a135a6. Task-number: QTBUG-55661 Change-Id: Ib7b1b4afd71b3c35493c15c8bf3e2570e321c986 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-092-39/+106
|\| | | | | | | | | | | Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-052-39/+106
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
| | * Polish the findfiles example to be actually usefulFriedemann Kleint2016-08-032-39/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Simplify the code, remove unused members - Fix the translations of plurals to use %n - Add tooltip displaying full paths in list - Add context menu allowing to copy the name and open - Display the correct slashes on Windows - Connect the returnPressed() signals of the line edits - Make the search recursive - Do not search binary files by checking the mime type Change-Id: I3663799c88931db1f58c03ea35211e7ab03737ec Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | Examples: Replace 'Q_DECL_OVERRIDE' by 'override'hjk2016-06-152-11/+11
|/ / | | | | | | | | | | | | | | Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* / Unify license header usage.Jani Heikkinen2016-03-2927-81/+351
|/ | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Standarddialogs example: Remove horizontal spacer from fullscreen layout.Friedemann Kleint2016-02-091-1/+0
| | | | | | | | It does not work as expected since the QLineEdits do not expand. Amends b880b7e1ac15f3458c009d63002c872e7521eeab. Change-Id: I0b3b3822cca7fc6442a7155eecd46bd3d134d069 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Standarddialogs example: Adapt layout for fullscreen platforms.Friedemann Kleint2015-12-092-7/+21
| | | | | | | | Insert a group box depending on style hints. Change-Id: I1b49dc31d5bd32c92d88f95be0683d5223329c11 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Examples/Doc snippets: Fix single-character string literals.Friedemann Kleint2015-10-131-19/+19
| | | | | | | Use character literals where applicable. Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Polish widgets/dialogs/standarddialogs example.Friedemann Kleint2015-08-182-0/+10
| | | | | | | | | Add missing options for QFileDialog, QFontDialog. Resize and position depending on screen size in order to look correct on high resolution screens. Change-Id: I1d9af481270d6a3e49878aaf32b59aea8fa543b4 Reviewed-by: hjk <hjk@theqtcompany.com>
* Port examples/widgets/dialogs to new connection syntax.Friedemann Kleint2015-07-229-61/+50
| | | | | | Change-Id: Ife8a24b43db400909099765b43f016b4be4bd6ef Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* fix usage of wince scopeOswald Buddenhagen2015-06-051-4/+7
| | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-1527-81/+81
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1127-135/+135
| | | | | | | | | | | | | | | | | | 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>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-152-11/+11
| | | | | | | | | | | | | | | | | | 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>
* Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-096-12/+0
| | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-131-0/+4
|\ | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| * standarddialogs example: add detailed textShawn Rutledge2013-09-121-0/+4
| | | | | | | | | | | | | | | | | | Demonstrates that you can have mnemonic buttons which don't conflict with the Ctrl-A and Ctrl-C shortcuts. Task-number: QTBUG-6731 Change-Id: I41ce64e6f3bd0cf387af13c5c37894b721b5a3bb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-06-282-2/+0
|\| | | | | | | refs/staging/dev
| * Dialogs examples: remove QLayout::SetNoConstraintJ-P Nurmi2013-06-212-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These constraints were adjusted in qt4 commit 3abaecc in order to make the dialogs fit Symbian/Maemo screens. These are not mobile oriented examples and it breaks resizing behavior on desktop so badly, that we will simply revert the constraint changes to make the dialogs respect their minimum sizes. Task-number: QTBUG-31351 Change-Id: Ibf358ddedadf05614ef7a66b6a98fe5d7073996f Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Add getMultiLineText static method to QInputDialogDavid Gil2013-06-272-1/+21
|/ | | | | | Change-Id: I6d43772f6ee66c6c43d64fb3d18f2a5f0c894a00 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-163-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-261-1/+1
| | | | | | | ...but QT_NO_PRINTER isn't. Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>