Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
1481e8d87fe89d9e27d9de593767b55a0e84a31f
Description
WebEngineView::WebAction contains a lot of actions that might not be available at all times. Anyhow, there's no generic way to get this information (to e.g. disable buttons).
For QWidget's you can call QWebEnginePage::action(X).isEnabled(). This is currently not available for Qt Quick. For the most common actions (GoBack/GoForward) there are dedicated canGoBack, canGoForward properties. However, it seems excessive to create single properties for all actions.
An alternative syntax might be to create a QObject with a enabled property on the fly. From customer code this could look like
Button { enabled: view.action(GoBack).enabled; }
where view.action(GoBack) would return a WebAction object, similar to the QAction object we have.
Regardless of the syntax, it remains to be seen whether the state of all WebActions can be reliably tracked from the Chromium side.
Attachments
For Gerrit Dashboard: QTBUG-56117 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
230893,11 | Introduce WebEngineAction in Quick API | dev | qt/qtwebengine | Status: MERGED | -2 | 0 |
234552,3 | Fix build with '-no-feature-action' configuration | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |