aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickwidgets
Commit message (Collapse)AuthorAgeFilesLines
* Support non-integer pixel-ratio in QQuickWidgetAllan Sandfeld Jensen2017-06-221-6/+8
| | | | | | | | | | Non-integer pixel-ratios always resulted in blurry rendering when QQuickWidget was used, but not with QQuickWindow. Fixed by reading qreal accessor of devicePixelRatio instead. Change-Id: I49f5efcf2da2efc090c00017e68c99c857cd84ef Task-number: QTBUG-61502 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Forward ShortcutOverride in QQuickWidgetLaszlo Agocs2017-05-291-0/+3
| | | | | | | | | | | This is now essential since otherwise these events are simply lost. Amends 0dbc575c1a8359534761167a5f5f1e29abedd51d Task-number: QTBUG-60988 Change-Id: Ib1d99d8fcd5bb92c9b52977796f2910f0fe71c48 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Software: Fix QQuickWidget rendering in QMdiAreaAndy Nichols2017-05-231-1/+1
| | | | | | | | | | | It is not safe to assume that the paintRegion is always the same as the updateRegion reported by the software renderer, since in some cases more needs to be flushed, such as in the case of the QMdiArea. Now we make sure to unite both of these regions and flush everything needed. Task-number: QTBUG-60985 Change-Id: I0408c21e42dd4107b0974877144e8e93f2c30fae Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-111-4/+0
|\ | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| * Fix hidpi support for opengl window grabbingFilipe Azevedo2017-04-091-4/+0
| | | | | | | | | | | | | | | | | | | | Now set the QImage devicePixelRatio so the content is correct on all screens. Task-number: QTBUG-53795 Change-Id: If94edf901da1285afe9bb847b8973d568a2b7082 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Make QQuickWidget cleanup work with engines that alter the contextLaszlo Agocs2017-04-041-0/+10
| | | | | | | | | | | | | | | | | | To make Scene3D in a QQuickWidget work. Task-number: QTBUG-52132 Change-Id: I686ff36d82a1c7bdfdcd7080a314bb9afdb7be88 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Make keyboard events work in QQuickWidgetLaszlo Agocs2017-03-292-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now many cases outside of text input fields are simply broken, e.g. one cannot use a TableView or other controls with the keyboard. Removing the seemingly unnecessary focusObject() solves all problems since this way key events get delivered to the QQuickWidget which in turn forwards to the QQuickWindow. Directly routing into the QQuickWindow's focusObject(), which can be any item in the scene is wrong since it skips a big part of QQuickWindow's event handling logic. Task-number: QTBUG-45757 Change-Id: Ie53b9003d156ab019fa4b9cf461e209990e738f7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Doc: Remove mentioning of non-existing setContents methodKai Koehne2017-03-071-1/+1
|/ | | | | Change-Id: I6c8c27390b6309e0d2bd0c758d04f864fce51069 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.8.0' into 5.8Lars Knoll2016-12-071-3/+2
|\ | | | | | | Change-Id: I19804e880005c66880eeabfaebf0b1093de80e6b
| * qquickwidget.cpp: move QT_END_NAMESPACE to bottomFriedemann Kleint2016-11-301-3/+2
| | | | | | | | | | | | | | Amends change 62198ab4485e15f350122770d5dfd8de7e59b8f9. Change-Id: I14a18c938126d475f9cec0f940596558b01c33de Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Get rid of most QT_NO_FOO usagesLars Knoll2016-11-293-25/+25
|/ | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Quick: Do not calculate the difference in a geometryChangeErik Verbruggen2016-11-102-3/+3
| | | | | | | | | | | This difference is only used by the ListView, so calculating it and storing it (on the stack) introduces a penalty for all items. As the new geometry is already applied, the old geometry is passed along. This has the added advantage that the ListView does not have to re-calculate that either. This fixes a performance regression. Change-Id: Id5e67bb663a5b11a55ec15ff24ca5b213d1fcef5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickWidget: Don't render into a null imageUlf Hermann2016-09-021-1/+1
| | | | | Change-Id: I3f70a16e3e48128b2eff906105b033af5a86079a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QQuickWidget: fix incorrect usage of 'range for' with Qt containersAnton Kudryavtsev2016-08-201-1/+2
| | | | | Change-Id: Ifd95a2076c6f5330820dc0eb4890636f83b93794 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QuickWidgets: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-122-7/+7
| | | | | | | | And add QT_NO_FOREACH define to .pro file. Now QuickWidgets is 'foreach' free. Change-Id: Iff711ab3a8bb78188aac48371f6e45eb4b174699 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add QT_NO_QML_DEBUGGER to MODULE_DEFINES on -no-qml-debugUlf Hermann2016-08-031-1/+0
| | | | | | | | | | | If -no-qml-debug is set when building QtQml, we have to add QT_NO_QML_DEBUGGER when building application code, because this build option modifies the headers and linking an application built with QML debugging against a Qt built without is crashy. Change-Id: Ib150810f40deb98dcf398e3998401358a25155d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Replace debugger and profiler with stubs on -no-qml-debugUlf Hermann2016-07-281-0/+1
| | | | | Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix up QQuickWidget and QQuickRenderControl docsLaszlo Agocs2016-07-151-0/+7
| | | | | Change-Id: I4df82c62afc12dace513ccbf6475d980c041867e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix rendercontrol grabs with the software backendLaszlo Agocs2016-07-151-5/+6
| | | | | | | | | | | | Calling grabWindow recurses (since that is implemented via QQuickRenderControl::grab...) so it's not an option. Instead, call directly in the software renderer implementation. Fix also the size of the offscreen QQuickWindow when using QQuickWidget in combination with the software backend. Change-Id: I857a2cc0aebbbaa5d52d809aeaec37c15b0787b9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Set width and height simultaneously on SizeRootObjectToViewAlexandr Akulich2016-07-121-2/+7
| | | | | | | | | | | | | On QQuickView/QQuickWidget size update we used set width (with the notify signal emission) and then height (with signal emission again). This way code, relying on width and height would be triggered twice and at the first time with there would be outdated height value. The new code takes care on proper value for both width and height. Change-Id: I6525911c40af0ca6a26ab3e7dac16d32a96d9a27 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWidget: Fix build with QT_NO_OPENGLAndy Nichols2016-07-111-0/+2
| | | | | Change-Id: I68109e19c90e951af5ca1757514effe3bb44a447 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QML: Pass the kind of geometry change aroundErik Verbruggen2016-07-112-3/+4
| | | | | | | | | | | | | This prevents re-calculation of what actually changed, and removes the now unused parameter newGeometry. Other than this change calculation, the only place where oldGeometry was used is QQuickListViewPrivate::itemGeometryChanged. To get rid of oldGeometry too, QQuickListViewPrivate now stores the current (i.e. last known) geometry, and updates it in itemGeometryChanged. Change-Id: I8a5286d08a04132c9a4c81de7ce221f5676946e6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-302-21/+45
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quickwidgets/qquickwidget.cpp tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp Change-Id: Idf279cb88e0df2a383489af5b6afdf04d04ae611
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-291-4/+23
| |\ | | | | | | | | | Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
| | * Fix missing QQuickWidget updatesLaszlo Agocs2016-06-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having an animated QQuickFramebufferObject inside a QQuickWidget is currently broken due to losing update requests. The problems are introduced in 4b4cf31c7a4bcb89cabca09102c4e0a22ab0c6b1 where we may erroneously reset the updatePending false even though there may be an active triggerUpdate ticking via the 5 ms update timer. Task-number: QTBUG-54239 Change-Id: If84af8ec9c992761cfef9049de642a943f91cfe6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * QQuickWidget: Fix crash when there's an offscreen window, but no real window ↵Kai Koehne2016-06-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | context Fix crash when creating a QQuickWidget where the offscreenWindow context is valid, but the window shareContext is not. This happens e.g. when QWebEngineWidgets is loaded, that creates a globally shared context. Task-number: QTBUG-54020 Change-Id: Ieeba0c20d12cce220b22cdd76adaf87d1ab2649e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QQuickWidget: Propagate screen changes.Morten Johan Sørvig2016-06-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required to make Qt Quick pick up changes to the devicePixelRatio. Failure to do so prevents a proper update of text nodes, as seen in the Qt Creator welcome screen. Propagate the new screen to the offscreenWindow, offscreenSurface and context. [ChangeLog][QtQuick] QQuickWidget now properly repaints text on high-DPI screen changes. Change-Id: I8f0b9f2f8768f99e293de018ae56d50ddf20b43a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | Lazy create QmlEngine on accessing rootContextAllan Sandfeld Jensen2016-06-272-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | A common usecase appears to be to set variables in the rootContext before loading a url in a QQuickWidget. We there need to ensure there is a QmlEngine to set variables on when this is attempted. Change-Id: I07aff2104313eeb3fab902ea3c6043c3c82c50f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | Create QmlEngine lazy in case one is not neededAllan Sandfeld Jensen2016-06-242-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWidget may be used with just a root item, and won't need a QmlEngine in that case. So if one isn't given to the constructor, only create one when one is needed for evaluating source. Change-Id: I96cfe5e2473d5d53fc2d52d4646d36c43f4ccb8a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Handle AA_ShareOpenGLContexts consistently in QQuickWidgetLaszlo Agocs2016-06-291-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget has offered a lot more fine-grained control over the lifetime of the OpenGL context it uses for rendering. In practice QQuickWidget also requires at least a part of this. To unify the behavior when it comes to reparenting to a different top-level window, add the bail out condition for AA_ShareOpenGLContexts to QQuickWidget as well. [ChangeLog][QtQuick][Important Behavior Changes] QQuickWidget now behaves identically to QOpenGLWidget when it comes to handling window changes when reparenting the widget into a hierarchy belonging to another top-level widget. Previously the OpenGL context always got destroyed and recreated in order to ensure texture resource sharing with the new top-level widget. From now on this is only true when when AA_ShareOpenGLContexts it not set. Task-number: QTBUG-54133 Change-Id: Ifda0db76fdf71dae1b9606fb5d59cee6edc2f5a4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Make QQuickWidget honor QQuickWindow::isPersistentSceneGraphLaszlo Agocs2016-06-281-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the behavior compatible with QQuickWindow. [ChangeLog][QtQuick][Important Behavior Changes] QQuickWidget now follows the same behavior as QQuickWindow when it comes to the persistent scenegraph setting controlled by QQuickWindow::setPersistentSceneGraph(). In earlier releases the setting was ignored and the scenegraph was torn down on every hide event. This is not the case anymore. Task-number: QTBUG-54133 Change-Id: I2a68948c92b7b4e6dabf2c9323955f1b47563d65 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Enable QQuickWidget for no-OpenGL buildsAllan Sandfeld Jensen2016-06-242-3/+40
| | | | | | | | | | | | | | | | | | | | | Enables and fixes QQuickWidget so it compiles in no-opengl builds. Change-Id: Ib50dec1d1429ec1140257dd6dcd9784126e61852 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Change graphicsAPI to graphicsApiLaszlo Agocs2016-06-011-1/+1
| | | | | | | | | | | | | | | Change-Id: I065f17abd1cb71cd8d6ead76abf7a544eb7a99c0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into HEADLaszlo Agocs2016-05-241-4/+7
|\ \ \ | | | | | | | | | | | | Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-241-3/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-3/+7
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| | | * QQuickWidget: update() when resetting updatePending in showEvent()Ulf Hermann2016-05-171-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If updatePending is set, that means we want to call update() eventually. If we just reset updatePending without calling update(), we produce UI glitches. Change-Id: Ie7353b2f5da567e196dbee8c113920e0e4702304 Task-number: QTCREATORBUG-16022 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-05-071-4/+1
|\| | | | | | | | | | | | | | | Change-Id: Ifb69f73ac805afe5e3c8708fa975b7d3c13a4e48
| * | | Introduce delegating constructors.Friedemann Kleint2016-05-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce code duplication by chaining constructors. Change-Id: I8a0afd20ed13d4eb938536dcb05787ba2565a4cc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | | QQuickWidget: Partial update support with software renderingAndy Nichols2016-04-203-7/+22
| | | | | | | | | | | | | | | | | | | | Change-Id: I886287812c1c3cd56739e24470492adc90cfafbb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | QQuickWidget: Enable use with software renderer backendAndy Nichols2016-04-203-88/+176
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic7a550e55cc4ece4c3a5547dae5bf0dbb3f5b0ac Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-04-062-3/+5
|\| | | | | | | | | | | | | | | Change-Id: Id98d3514e602a3c8c159a27be7b2fd24d7d290ae
| * | | Merge remote-tracking branch 'origin/5.7' into devAndy Nichols2016-04-052-3/+5
| |\| | | | | | | | | | | | | | Change-Id: I57b06e2e98beb010a56dd0593d93e078ecf76eea
| | * | Add a note saying that QQuickWidget::rootObject can return nullAlbert Astals Cid2016-04-041-1/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia5db63c39287d23c3ed279aa5671a9e7bc7b26c0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-2/+2
| | |\| | | | | | | | | | | | | Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
| | | * Make more ctors explicitMarc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Change-Id: Ic198750717799126b4e37817845a8ee4684d631f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | | * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Task-number: QTBUG-45291 Change-Id: Ied526fb2d7adc3a68946d6843a6bd6f475ebf864 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | | Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-0/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the Qt Quick module depends on either the OpenGL or OpenGLES headers being available at build time. Since we are adding support for adaptations that do not depend on OpenGL, it should be possible to build Qt Quick in environments that do not have OpenGL development headers. This does present many challenges though because in some cases GL types, and classes that require OpenGL are part of the public APIs. However since these classes were never available when QT_NO_OPENGL was defined, it should be possible to redefine the function signatures under this scenario, since it's not possible to break binary compatibility if there never were any binaries to break compatibility with. One of the bigger changes that was necessary to facilitate this change is creating interfaces out of QSGContext and QSGRenderContext. Here the default behavior was usage of OpenGL directly, even though subclasses could override all OpenGL usage. Making them interfaces should bring QSGContext and QSGRenderContext more in line with the other classes present in the adaptation layer. Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* / / Remove Windows CE.Friedemann Kleint2016-03-101-2/+2
|/ / | | | | | | | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses. Task-number: QTBUG-51673 Change-Id: I33ab74f0c2ce9086c3610c5fa727f281197b6b55 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>