summaryrefslogtreecommitdiff
path: root/examples/webenginewidgets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Use the \examplecategory macro to tag examplesTopi Reinio2023-04-131-1/+1
| | | | | | | | | | | | | | | | The '\meta category' command was used for tagging examples with a specific category, used in Qt Creators Welcome mode. As we want to also generate lists of examples belonging to a category elsewhere in the documentation, replace the command with a macro that expands to the original \meta command and also adds the example to a group using the \ingroup command. This way, the category names can be used as arguments to the \generatelist or \annotatedlist commands. Pick-to: 6.5 Task-number: QTBUG-112731 Change-Id: If9519fd8994c64cf57dc4c9a9387d7be80493d80 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge recipe browser, stylesheet browser and markdown editor examplesYigit Akcay2023-04-0562-1146/+1276
| | | | | | | | | | This patch merges the qtwebengine examples recipe browser, stylesheet browser and markdown editor into one single example. Pick-to: 6.5 Task-number: QTBUG-108751 Change-Id: I338707d7d3275b03bf2a2d7b65064ac91e562d7f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Simple browser example: Fix up the codeFriedemann Kleint2023-04-053-34/+6
| | | | | | | | | | | | | - Remove duplicated unused helper questionForFeature() - Replace lambdas by slots where possible - Fix clang warning about using multiple arguments to QString::arg() - Remove dead code in WebView::contextMenuEvent() which checks on inspectElement == actions.cend(), but is within an "if" checking the same condition. Pick-to: 6.5 Change-Id: Ie85a3811f4f5a8c3fa9550d4eb2ca5bf79e39084 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add Windows 11 related note for Geolocation settingsYigit Akcay2023-04-031-0/+6
| | | | | | | | | | | There are 3 OS settings under Windows 11 that need to be enabled for the HTML5 Geolocation in QtWebEngine to work properly. This isn't very straightforward to a user, therefore this patch adds a note to the documentation. Pick-to: 6.5 Change-Id: Id36a4726a182178c5a15fce039e464fd6bb7517e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Simple browser example: Add helper function to remove key backspaceFriedemann Kleint2023-03-301-15/+16
| | | | | | | | It otherwise looks like a bit like an oversight or bug. Pick-to: 6.5 Change-Id: If11fe034fa91022eb70c99b8a916fb35ac86f75d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Simple browser example: Fix clazy warningsFriedemann Kleint2023-03-302-17/+13
| | | | | | | | | - else after return - Use multiarg version of QString::arg(QString) Pick-to: 6.5 Change-Id: Iceff3ee8877b866b5b9187cd85da54864ab17834 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Simple browser example: Use member initializationFriedemann Kleint2023-03-289-25/+16
| | | | | | | | As a drive-by, make constructors explicit. Pick-to: 6.5 Change-Id: I5c8e3d8049504afa4aa5a0d7c1a85bb59eb3cd38 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Simple browser example: Use modern string literalsFriedemann Kleint2023-03-286-19/+31
| | | | | | Pick-to: 6.5 Change-Id: I14ed5efed1bf228239f95a8a4addce5d19a9f220 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove webui exampleAllan Sandfeld Jensen2023-03-2411-450/+1
| | | | | | | | | | | | Doesn't demonstrate anything complicated, the code isn't even worth quoting as snippets. We could consider introducing a help browser to replace it with more functionality. Task-number: QTBUG-108751 Change-Id: I3b796388796a78d017836a10bee18032b2cd4905 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit e4051de7db7b7f0905770280f9a06e133d453cf7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move widgets minimal example to manual testsMichal Klocek2023-03-227-129/+0
| | | | | | | | | Task-number: QTBUG-108751 Change-Id: I6e237b04d1f6a19f64516cd45aabe4d28099abd5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 34ebe8be93ab10766d034e5a3943a12c8de3a58e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix example codeAndreas Eliasson2023-02-271-1/+1
| | | | | | | | | | | | Use the .parse() method from the marked.js third party library. https://marked.js.org/ Fixes: QTWEBSITE-1083 Pick-to: 6.5 6.4 6.2 Change-Id: I59bcf14ce7169570a234169c6b48f720271c1e72 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix clang compiler warningsPeter Varga2023-02-141-5/+3
| | | | | Change-Id: I6ebd403a3affae8bfbc5afee9d528664fb08122c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Disable WebEngineContext dump by defaultPeter Varga2023-01-191-0/+2
| | | | | | | | | | | | | Keep it enabled for simplebrowser and quicknanobrowser examples. Also add documentation how to enable it. [ChangeLog][WebEngineCore] Disabled WebEngineContext dump by default. Fixes: QTBUG-109040 Pick-to: 6.5 Change-Id: I4bd3c0e9eb532771f9b455863324e9dacaae884a Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: Fix warning and minor clean-upPeter Varga2023-01-172-2/+2
| | | | | | | | | | - Fix typo in link - Qt Location is no longer linked in Qt WebEngine Features - Replace Qt Location with Qt Positioning module Pick-to: 6.4 6.5 Change-Id: Ia736fee8f0775fd6067c6f1e7a670b3bd7d8acb5 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix qdoc link failuresMichal Klocek2023-01-061-3/+3
| | | | | | Pick-to: 6.5 6.4 Change-Id: I6b18382a376bf3067323e801f6f39bf4ec09e9dc Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Update push example after setPushServiceEndpoint changeMichal Klocek2022-12-227-7/+204
| | | | | | | | | | | | We have now extra call to enable push messaging, therefore drop usage of simple browser in example and use the same code as in Notification Example but add new settings and fix profile to be not off-the-record. Task-number: QTBUG-107442 Pick-to: 6.5 Change-Id: I3069c4cf2b6a6ce864c1e4c578ab03adb67984e4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fix qdoc warningsMichal Klocek2022-12-1616-20/+19
| | | | | | | | | | | | | | | | | | As JavaScript parsing issue got fixed , the limit was not changed, meaning there where 4 "unused" warnings possibilities. In the meantime another change e6a13d97898f3f4b19f61006d0716ca9e1b9f037 was merged which had 3 qdoc issues, which got therefore unnoticed. Fix those issues. Do not use underscore in example name and rename push_notification to push-notifications (like qtbase network-chat). Pick-to: 6.5 Change-Id: I2635424e24d3b9a0a02c2e6fe8ac383eec95c112 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build of clientcertificate exampleSzabolcs David2022-12-031-3/+3
| | | | | | | | | CMake Error at CMakeLists.txt:30 (qt_internal_add_resource): Unknown CMake command "qt_internal_add_resource". Pick-to: 6.4 Change-Id: Ieb85515897f6772e13491106b32da1bb7a5118fe Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add client certificate exampleMichal Klocek2022-11-2918-1/+553
| | | | | | | Task-number: QTBUG-106497 Pick-to: 6.4 Change-Id: I39e39a991362940bb35052d28254b7b12acaa105 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add push notification exampleMichal Klocek2022-11-2915-0/+1249
| | | | | | | | | | | Adds simple push service implementation in NodeJS. Note setup for endpoint for qwebenginepage is not mentioned as it has to be decided what to do with it (see bug report). Task-number: QTBUG-107442 Change-Id: Iacfcb2a9d0c33c514b4046d06f866eb82390a240 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Mention WebSockets in docsSzabolcs David2022-11-031-0/+2
| | | | | | | | | | | | | | | | QtWebChannel has an example for a use case of HTML web sockets and connectivity of the native side of application. We don't need to create a new example of our own by mentioning this. However, the chat client application uses JS libraries served from remote, so we have to enable LocalContentCanAccessRemoteUrls setting to make it work out of the box in WebEngine example browsers. Desktop Chrome works the same way by default. Task-number: QTBUG-106505 Change-Id: I9020d0a09a88de16d32af063aee5d55c9837f484 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Simple Browser example: Fix startup flicker on WindowsFriedemann Kleint2022-10-134-4/+16
| | | | | | | | | Ensure the initial browser tab is added before show(), avoiding the flicker of RHI switching. Pick-to: 6.4 Change-Id: I0aaa5a4128f089bfc9ef68d25cab44da78962eb6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I4b5f85df579532c2af938fe70db945ba273782fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2614-14/+14
| | | | | | Task-number: QTBUG-105718 Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix simplebrowser build with Qt 6.3Peter Varga2022-08-182-0/+10
| | | | | | | Pick-to: 6.4 Task-number: QTBUG-97829 Change-Id: I0034a1350bf1a0bf01914f0216dd37859e3e7163 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-0714-0/+42
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I118bd63694cfe2c9a413af4a38828a31727f8e86 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-2271-3180/+142
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Simplebrowser: Add inspector action to Window menuPeter Varga2022-06-151-1/+9
| | | | | | | This is handy for debugging pages which override context menu. Change-Id: I4eedf0dc8e00e15716b896608db27cdbc6906362 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix simplebrowser build with Qt 6.2Allan Sandfeld Jensen2022-06-112-0/+12
| | | | | | | | This is a partial revert of 83e5b3c3e19deedfcad0dcb8116b3e6c931b8f6c Pick-to: 6.4 6.3 Change-Id: I79e814075415585b4d4a3b04a92b3ad84d2dfa53 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Implement File System Access permission APISzabolcs David2022-05-262-0/+34
| | | | | | | | | | | | Allow web pages to safely access the local file system by exposing a permission API. Permissions are stored in-memory. The built-in access rules are the same as the behavior of Chrome: JS can't request access to system libraries, sensitive directories and the application itself. Task-number: QTBUG-97829 Change-Id: Ic675422cafbad5a90243b4fa8f0749c46afa192c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Spellchecker: Fix and clean up qmake build of the examplePeter Varga2022-03-312-8/+7
| | | | | | Pick-to: 6.2 6.3 Change-Id: Ia41c1e385f1bf527cbe636f150d97790adc8f21c Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* CookieBrowser: Make alternating rows readable in dark modePeter Varga2022-03-231-1/+1
| | | | | | | | Use colors from default QPalette instead of hard-coded values. Pick-to: 6.2 6.3 5.15 Change-Id: Ib7cb8ef4bb5ddabc2233ea6596c0527538275963 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix webui exampleAllan Sandfeld Jensen2022-03-181-2/+1
| | | | | | | | | | | Load the URL after setting the page on the view. This actually works around a real bug we need to look into. Change-Id: I32b2cfd3c940cb48584cc066709327b5dd02c1fb Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 0e06ccdafddabb26012f67631b303fa978e9eeee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve examples CMakeLists.txtKai Köhne2022-02-2513-113/+53
| | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: I09083474432ce171e8ee1e28120b062f2ef3c052 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Simplebrowser: fix compiler warningsBalazs Egedi2022-02-102-3/+3
| | | | | | | | Adapted to the new addAction syntax. Pick-to: 6.3 Change-Id: I260f57e8536312a6b2f53c8b55953813baf22a5c Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Switch examples to build as isolated sub-buildsAlexandru Croitor2021-12-151-13/+13
| | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: I8539fee3ea7311acf9ee4e736fb19e6ff595fcae Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add cmake api for 'bdict' dictionary conversionMichal Klocek2021-11-171-29/+6
| | | | | | | | | Fix spellchecker example and test to use new api. Note we should not use qt6 prefix in cmake api in examples. Change-Id: Ib800bf2b7bd83e10060fa01ccd8d4a262752e09b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Doc: Remove broken homepage link from markdowncss attributionLuca Di Sera2021-11-082-2/+1
| | | | | | | | | | | | | | | | | | | | | | QtWebEngine uses Keving Burke's markdowncss for two of his examples. An attribution file is provided for both uses, pointing to the homepage of markdowncss "https://kevinburke.bitbucket.io/markdowncss/". Nonetheless, the project is currently unmaintained and the homepage doesn't exist anymore, meaning that the link to it is broken. As there is not a reachable homepage anymore, the "Homepage" key for markdowncss attributions was removed from the attribution files. A link to the same page was changed to the link to the bitbucket repository, which is still reachable, in the documentation for the affected examples. Task-number: QTBUG-96127 Pick-to: 6.2 Change-Id: Idd6c163eebeb2a2292ae76a73289fda5faa12b0a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Minor. Cleanup qt6_add_resources usageMichal Klocek2021-10-289-10/+10
| | | | | | | | We should not use qt6 prefixed functions in examples. Pick-to: 6.2 Change-Id: Ibf2618ef4f64b560decb219527d619aad680f216 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix some issues with icu for dict toolMichal Klocek2021-10-281-1/+0
| | | | | | | | | | | | | | | | The dict tool can be run during the build, therefore copy just in case icu data file to tool application path, so it does not require installation and can run no matter if it is a prefix non prefix build. Guard for webengine_system_icu since there is no icu file in that case. Remove awesome looking genex from examples. Pick-to: 6.2 Change-Id: I2fd5ecf6c99ae1d003a1ac1c7bce2bb61a05f73f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix broken attributions to the Public DomainLuca Di Sera2021-09-303-3/+3
| | | | | | | | | | | | | | | | | | | | | The attributions generated trough `qtattributionscanner` support generating links to SPDX licenses. Four such attributions used a `LicenseId` of `DocumentRef-PublicDomain`, which is a non-existent license. Indeed, the SPDX project seems to shy away from making a single license representing all Public Domain attributions, preferring to make a database entry for each Public Domain attribution. To avoid the broken link, such attributions were modified to use a dejacode LicenseId, which has a catch-all Public Domain entry, as suggested by Kai Köhne. Task-number: QTBUG-96127 Pick-to: 6.2 Change-Id: I88e0048c08d6099521e44e74ad7f0e8b3d77b907 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Polish the markdown editor exampleFriedemann Kleint2021-09-203-17/+24
| | | | | | | | | | | | - Implement the exit handling using QWidget::closeEvent() - Mark PreviewPage::acceptNavigationRequest() as override - Use mime types with QFileDialog - Add status bar messages Pick-to: 6.2 Change-Id: I0fcbb1350f736a5ee04f266aac81942b7a269644 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix disconnect on null old page win Simple Browser exampleKirill Burtsev2021-09-101-11/+12
| | | | | | | | Eliminates constant warnings from QObject on every new tab create Pick-to: 6.2 6.2.0 Change-Id: I93b3a2561a8a99932ea2a8c77cc12ded4a6906e7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix wrong save file filter for Markdown Editor exampleKirill Burtsev2021-09-101-1/+1
| | | | | | | | | Comma is treated as a part of suffix, and a separator is just a space. Fixes: QTBUG-95770 Pick-to: 5.15 6.2 Change-Id: I7b27ae98757418c4c09fc92804ecefd6373cbc48 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix crash in PrintMe exampleSzabolcs David2021-08-303-23/+32
| | | | | | | | | | Connecting the same lambda slot multiple times to QWebEngineView::printFinished causes crash. Fix this by a minor refactoration and adjust documentation. Pick-to: 6.2 Task-number: QTBUG-95339 Change-Id: I03b6a1ff6244c80073248182a905d8d664fdd326 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix issue of not working dictionary conversionMichal Klocek2021-08-292-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test and examples are no longer included as external projects, this created and issue that convert_dict tool does not work during build time due to not installed resources. Before we supported converting dictionaries in a prefix build, by supplying the path to the ICU data file located in the Qt build path. The tool had wrapper script generated which set QT_WEBENGINE_ICU_DATA_DIR. This was done using QT_TOOL_ENV: icu_data_dir.name = QT_WEBENGINE_ICU_DATA_DIR icu_data_dir.value = $$OUT_PWD/../../../src/core/$$getConfigDir() QT_TOOL_ENV = icu_data_dir load(qt_tool) Add workaround for that issue with cmake by setting env variable with relative path to resources in build tree. Make example more exciting for new comers and add generator expression which guards the setting based on module build. Note this is temporary solution and webengine cmake api should be introduced to wrap the conversion tasks in some nice look public api based on qt_internal_wrap_tool_command. Disable example on windows, since on one of coin winodws machines we get error "Exit code 0xc0000135". Task-number: QTBUG-95590 Pick-to: 6.2 Change-Id: I44664cbcc85b00ec66657e583929a0fba7bde65b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix documentation warnings for Qt WebEngineTopi Reinio2021-08-231-4/+4
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95860 Change-Id: I5b1fd6a6e5f172724fcfbde1a791b342a7e1ff92 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove duplicated 'downloadProgress' in favor of separate signalsKirill Burtsev2021-07-212-3/+3
| | | | | | Pick-to: 6.2 Change-Id: Ib825d63c89e591e740b206f43c3eadbf32319daa Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for 90-basedAllan Sandfeld Jensen2021-07-081-1/+5
| | | | | | Pick-to: 6.2 Change-Id: I8402b044d8e12d75e144a00984b856f3de10bffd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Remove deprecated useforglobalcertificateverificationPeter Varga2021-07-061-1/+0
| | | | | | | | | | | | It enabled an unrecommended OCSP path on Linux [ChangeLog] (Q)WebEngineSettings::useForGlobalCertificateVerification has been removed. Pick-to: 6.2 Task-number: QTBUG-91467 Change-Id: I9f5d1ad5e4fcb59abd31e6a133ded7bf8319c811 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>