summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
| * Quick fix for not working history in demobrowserMichal Klocek2016-05-044-50/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of history manager seems to be not straight forward. To display history we use QList to keep history items plus model adapter in form of HistoryModel (QAbstractTableModel) plus HistoryFilterModel to avoid duplication, plus HistoryTreeModel to make a tree view with split for dates, plus TreeProxyModel on top to enable sorting. This approach unfortunately falls apart when items should be deleted from the model by treeView. This ends badly with corrupted cached values. This fix removes history items using history manager. It also abandons HistoryTreeModel since frequent sourceReset calls make it unusable. If split for dates it desired the better approach would be to implement history tree model already at HistoryManager level to avoid unmaintainable code. Task-number: QTBUG-49913 Task-number: QTBUG-50255 Change-Id: Ic9cebb52b623bd453119e11b5e907eaa90609e34 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * [Demobrowser] Fix command line option parsing.Alexandru Croitor2016-05-042-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing just command line options to Chromium prevents loading of the initial startup url. This happens because the startup url is overridden by the last command line argument, which happens to be a Chromium option, thus an invalid URL. Fix consists in iterating through the command line arguments, until a non-option argument is found (doesn't start with a dash), and use that as the startup URL. Change-Id: Ibe2946b25b2e023c094a85e50d2ccbd5bfce2977 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Replace print dialog with a custom one for printing to pdf.Michael Bruning2016-05-025-13/+349
| | | | | | | | | | | | | | | | The standard pdf print dialog does not work on OS X and Windows. Task-number: QTBUG-53016 Change-Id: Ic9dd1a1603e1cdbd82fef095cc660814bcd8c98e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-255-20/+7
|\| | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Fix contextMenu handling in examplesMichal Klocek2016-04-212-5/+8
| | | | | | | | | | | | | | | | Adds missing deleteLater on close Change-Id: Id337856f138e0d38f0c72d3962ccac309d36c73e Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * demobrowser: Remove unused loadingUrlJoerg Bornemann2016-04-212-18/+0
| | | | | | | | | | | | | | | | | | Remove the unused m_loadingUrl member. Remove the loadingUrl signal that was forwarded to urlChanged. QWebEngineView already emits urlChanged. There's no need to do this twice. Change-Id: Ib9734c5b1571745f7b82b4e5f2bc92c7f1d8f51c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * demobrowser: Fix HistoryManager::clearJoerg Bornemann2016-04-211-1/+1
| | | | | | | | | | | | | | | | Clear the model before saving. Otherwise the cleared history will appear again after restarting the demobrowser. Change-Id: I79f939c1f1e8ee993127d139cefe7f5818ce593c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * demobrowser: Fix precision of progress bar renderingJoerg Bornemann2016-04-201-1/+1
| | | | | | | | | | | | | | The progress bar never reached the 100% mark. Change-Id: Id87bdb27f882d0d77ed0ad590e2c2278ce6fba92 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | SimpleBrowser: Use new QWebEnginePage::icon APIKai Koehne2016-04-207-82/+19
| | | | | | | | | | | | | | Change-Id: I38d16a57116517aee21f6f84c5fca82192cb1572 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Add QQuickWebEngineFaviconProviderPeter Varga2016-04-201-0/+1
| | | | | | | | | | | | | | | | | | The new QQuickImageProvider subclass is used to access downloaded icons from the FaviconManager via the Quick API. Change-Id: I6a52d3c737b2260cf480167764a931915cd99cab Task-number: QTBUG-51179 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-182-4/+7
|\| | | | | | | Change-Id: I490e0ee46d3ff040ca26426feb7e4d6ef7098f94
| * SimpleBrowser: Fix loading iconKai Koehne2016-04-151-1/+1
| | | | | | | | | | Change-Id: I008b649b43069978b6ce19b2faf5a557dd67c756 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
| * Demobrowser: Fix black screen after exiting fullscreen mode on OS X.Alexandru Croitor2016-04-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exiting fullscreen while viewing a full screen video, the video is replaced with a black screen, and does not switch back to the initial page. This happens when hide() is called on a native window while being in fullscreen, which hides the window, but does not exit full screen mode, thus showing a black screen. The workaround fix consists of two parts: 1) Make sure to delete the fullscreen window object, to release the OS virtual screen it occupies (visible in mission control as a black rectangle). 2) Hide and show the main page window, to force exit fullscreen mode. Change-Id: I364d4427e84957ed97f57a14e2cfc2c95aed6f48 Task-number: QTBUG-52058 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Remove "Save Page" web action from the standard context menuJoerg Bornemann2016-04-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The SavePage web action is only useful if the user code reacts on the downloadRequested signal. Also, having SavePage available is not useful for e.g. hybrid applications. Extend the demobrowser example to show how to add the SavePage web action to the context menu. Change-Id: I979bcd9f5a25d2cae07ef819663afde17784440b Task-number: QTBUG-52370 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Remove default values for printToPdf callbacks and unify API.Michael Bruning2016-04-131-1/+1
| | | | | | | | | | | | | | Adds default QPageLayout values. Change-Id: Ibf2964ecd86350a51d682e385973f830ac4347a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Fix recentlyAudible Widgets and Quick API.Alexandru Croitor2016-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rename all uses of wasRecentlyAudible to recentlyAudible. Add missing recentlyAudible properties. Change QtQuick slots to simple functions. Change affected demobrowser example. Adjust documentation for the API. Change-Id: I5a6f7b8384c0b7e34afaa5c412a5543c210d3ef9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | SimpleBrowser: Handle WebBrowserBackgroundTabKai Koehne2016-04-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | Fix compilation warning: qtwebengine/examples/webenginewidgets/simplebrowser/webview.cpp:131: warning: enumeration value 'WebBrowserBackgroundTab' not handled in switch [-Wswitch] switch (type) { ^ Change-Id: I590207c56525db740e62403b6cb949c6281d765c Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Add icon property and iconChanged signal to QWebEnginePagePeter Varga2016-03-318-138/+20
| | | | | | | | | | | | | | | | | | | | | | | | The new API makes possible to access downloaded icons via QWebEnginePage. Thus the QNAM usage for downloading favicons and the corresponding workaround due to authentication are removed from the demobrowser. Change-Id: I9fdcc7ee7673f7caa239d932f20a51c74b24763f Task-number: QTBUG-51179 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Add API for context menu dataAllan Sandfeld Jensen2016-03-301-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QWebEnginePage users to be able to make custom context menu or extend the default context menu, they need information about the context. This patch adds a QWebEngineContextMenuData class that contains contextual information when a context menu is being requested. This is also means we can finally generate a custom context-menu in the demobrowser the same way we did in QtWebKit. Task-number: QTBUG-51079 Change-Id: I695b8cbf648bdc7f119b0ed51ab685cf2f8de8e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add settings for FaviconManager's icon download modesPeter Varga2016-03-254-49/+122
| | | | | | | | | | | | Change-Id: I8e4b11089de29623ed39ec6b13fe30be734baa3e Task-number: QTBUG-51179 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-2135-11/+3460
|\| | | | | | | | | | | | | | | Conflicts: src/3rdparty src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc Change-Id: I90728e965399e51b626d538924de955f9abab5fe
| * Make MarkDownEditor example more usableKai Koehne2016-03-183-10/+20
| | | | | | | | | | | | | | | | - Use a fixed width font for the editor. - Accept .md file as command line argument. Change-Id: I97e3bb930569240e195ecc21ed4ce3d9acd3ff66 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
| * Strip down demobrowser to become simplebrowserMichal Klocek2016-03-1632-1/+3440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Demobrowser changes: * remove QLocalServer/Socket * remove AutoSaver * remove restoreLastSession * remove general QSettings * remove downloadManager * remove bookmarkManager * remove historyManager * remove searchBar * favor setStyleSheet over overriding paint methods * use lambdas where suitable * use QProgressBar instead of own painted widget * use QToolButton instead of own painted buttons * remove QStackWidget, use single UrlLineEdit per window instead of per tab * split files to keep own classes: webpage and webview * remove tracking windows by QPoiner * remove WebPageActionMapper, TabBar classes * remove QDrag dead code * remove special OS X close app handling * fix encapsulation, clean up application logic Change-Id: I4849b6a2de739dea4f01229abdb90418601a2397 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
* | Add callback to printing APIMichael Bruning2016-03-162-2/+22
| | | | | | | | | | | | | | Also corrects and updates the printToPDF docs to reflect recent changes. Change-Id: Iffe276a1046d6d55923939f9d72b97cd533017ff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-03-0810-1/+338
|\| | | | | | | Change-Id: Ieab3c4a6d16b1d7b7c0243ff8898f81807e7b1fc
| * Doc: fix links in the minimal example docsLeena Miettinen2016-03-072-4/+4
| | | | | | | | | | | | | | | | ...to use the external link specified in qtbase\doc\global\externalsites\qt-webpages.qdoc Change-Id: Ieeade45440a5454ec7856230510f3914b1a56800 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Add minimal examplesKai Koehne2016-03-0110-1/+338
| | | | | | | | | | | | | | | | Task-number: QTBUG-51383 Change-Id: I872bdae7267e7dbf2a93a831d435517bcd4bad64 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Move printToPDF to pageAllan Sandfeld Jensen2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | The API needs nothing from view and view just forwards it to the page anyway. This is an page level API, this also makes it work without being shown. Change-Id: I3b8555ab472ec2c7632db3655bcc31925fcfa001 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-02-201-6/+5
|\| | | | | | | Change-Id: If884b8b8bc087a6a726476b49cdb48a0efaa173e
| * Fix removal of left-over local socket in demobrowserJoerg Bornemann2016-02-161-6/+5
| | | | | | | | | | | | | | | | Use QLocalServer::removeServer instead of QFile::remove. The socket is usually not in the current directory. Change-Id: Ie5b20b8b02ec7f3065596ebd945a6639bb65a2c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add rudimentary printing API and add it to example.Michael Bruning2016-02-162-1/+21
| | | | | | | | | | Change-Id: I48141d07e9744bb21d64a5c8724579cb469ba35c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Added background tab support to WidgetsAdam Kallai2016-02-101-0/+3
| | | | | | | | | | | | | | | | | | - Added middle click navigation support to DemoBrowser. - Extended WebAction with new case (open a new tab in background). - Updated WebEngineWidgets documentation. Change-Id: I4ff91806c274a74f4d94b3f5d43fdd99ab900d46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-102-2/+2
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp tests/auto/widgets/widgets.pro Change-Id: Id9444359ed2e35d469331db96a355c9ea2d095d5
| * Prefix Markdown Editor example with "WebEngine"Kai Koehne2016-02-042-2/+2
| | | | | | | | | | | | | | | | | | | | Follow the example of the other examples, and always start with WebEngine. This makes also sure that Qt Creator attaches the 'webengine' tag to the example. Task-number: QTBUG-50582 Change-Id: If99ba9a23560abae61e4e2ef5a5b091b3c5473c2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-02-0416-90/+978
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
| * Doc: update Contentmanipulation example docsLeena Miettinen2016-01-284-90/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update screenshot - Remove second \brief command - Fix grammar issues - Use standard phrasing for examples - Replace \snippet commands with \quotefromfile commands. This enables documenting each line of code separately - Replace occurrences of QWebView with QWebEngineView - Replace reference to the obsolete QWebEnginePage::evaluateJavaScript method with reference to QWebEnginePage::runJavaScript() that is used in the example code - Remove snippet markers from mainwindow.h and mainwindow.cpp - Move code comment from mainwindow.cpp to the documentation to make the code leaner Change-Id: If3346810c8aef67c15c9ec7ad4469a222e636cf2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Add cookiebrowser exampleMichal Klocek2016-01-2612-0/+887
| | | | | | | | | | | | | | | | | | A cookiebrowser shows collected cookies during browsing, users can view cookie content, delete and add new cookies. Change-Id: Ib9cdc29e7ca34c488dd249b44f9e32491517bd60 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Make all examples BSD licensedKai Koehne2016-01-2253-1529/+1477
| | | | | | | | | | Change-Id: I98924e5f8754b7b2ed095abf00eb73fa26399b2d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Unify license header usageJani Heikkinen2016-02-014-20/+20
| | | | | | | | | | | | | | | | Update old header.FDL to new header.FDL Change-Id: Iee63498bee1b150b5d079b9a1e82c40bacd4b494 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-02-0162-1256/+1829
| | | | | | | | | | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header Change-Id: I12d6dd8ebeddf1c39e8aed5095fd224f5e0a455f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-184-408/+24
|\| | | | | | | Change-Id: I038f3544785862f3a2e2f35b8fab0b163e75d542
| * Update logo of demobrowserKai Koehne2016-01-143-408/+22
| | | | | | | | | | | | Change-Id: I26b907d943ebd424087c54465608598aaf0d0013 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Fix namespaced build of markdowneditor exampleJoerg Bornemann2016-01-141-0/+2
| | | | | | | | | | Change-Id: Iff50511b06962d02e2a69ee47f1f0df82425dc2d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-1210-56/+187
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * QuickNanoBrowser: Enable pepper plugins by defaultKai Koehne2016-01-071-1/+1
| | | | | | | | | | | | | | | | As a generic browser example it should pick up plugins automatically. This is the same behavior as the DemoBrowser. Change-Id: I45ea8f7cd8e92a291137fd488d7a6f29931a15b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Do not use deprecated QStyleOptionFrameV2Joerg Bornemann2016-01-043-9/+9
| | | | | | | | | | | | | | | | | | This fixes some warnings when building demobrowser. Change-Id: If895d794e216d9a5bab8d74b3bee370763ff1294 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
| * Demobrowser: Add handling of middle click and double click on tab bar.Alexandru Croitor2015-12-222-0/+18
| | | | | | | | | | | | | | | | | | Implement chromium-ish handling of tab bar handling. Middle clicking on a tab closes the tab. Double clicking on the tab bar opens a new tab. Change-Id: I75d559f09b94c4af2bc4fc8c32339d5c25b357e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Doc: Add docs for WebEngine Quick Nano Browser exampleLeena Miettinen2015-12-181-4/+102
| | | | | | | | | | | | Task-number: QTBUG-48640 Change-Id: Ie4fc076fb6e3a63ee1a7722cca5b28f240288bf0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * rename fancybrowser to contentmanipulationJoerg Bornemann2015-12-179-17/+17
| | | | | | | | | | | | | | | | | | | | | | The name "fancybrowser" tricks people into thinking that this is the reference browser example. But this example is a very simple browser with an additional fancy content manipulation feature. Rename this example to contentmanipulation to reflect reality. Change-Id: I200b701acdc4de1210b550b9f054753e5f1d1ea4 (cherry-pick from eb8eb72ec7e589eedd79143dc7c3fb241706f405) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix fullscreen mode in qml apiMichal Klocek2015-12-171-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | Current implementation was not working correctly for quicknanobrowser when entering and leaving fullscreen video, in cases where the browser itself was already fullscreen. Use ExitFullScreen to leave fullscreen in demo code. Use onFullScreenRequested handler to track if fullscreen mode is on. Change-Id: I022d5e830b189897d34a9a8747381d041101c692 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>