Why there is no QtWebEngine in the Qt6? Is it depricated? Should I use a new widget?
Asked
Active
Viewed 3,500 times
1 Answers
4
Qt6 is a big change so for compatibility reasons Qt does not provide this module, it will be provided in Qt 6.2 as this post: Add-on support in Qt 6.0 and beyond points out.
For Qt 6.2 we are planning to provide the following additional libraries:
- Qt Bluetooth
- Qt Data Visualization
- Qt Lottie Animation
- Qt Multimedia
- Qt NFC
- Qt Positioning
- Qt Quick Dialogs: Folder, Message Box
- Qt Remote Objects
- Qt Sensors
- Qt SerialBus
- Qt SerialPort
- Qt WebChannel
- Qt WebEngine
- Qt WebSockets
- Qt WebView
(emphasis mine)
So you will have to wait for that release that according to what was announced will be available for September 2021

eyllanesc
- 235,170
- 19
- 170
- 241
-
QtWebEngine is now available. – Chris P Nov 20 '21 at 16:26
-
How can I import it on qt 6? – Evandro Coan Nov 23 '21 at 00:55
-
@user See the docs: https://doc.qt.io/qt-6/qtwebengine-index.html – eyllanesc Nov 23 '21 at 01:01
-
That page does not say how to import anything. Luckly I am using Python and I figured it out by inspecting the code with `pdb` and `dir(PyQt6)`. By guessing I figure out the path `PyQt6.QtWebEngineCore.QWebEngineSettings.PlaybackRequiresUserGesture`, and once I run the code, qt tells me `'QWebEngineSettings.PlaybackRequiresUserGesture' will stop working. Please use 'QWebEngineSettings.WebAttribute.PlaybackRequiresUserGesture' instead`. QT documentation is the worse, most of their examples do not show how to import anything (if they have an example code). – Evandro Coan Nov 23 '21 at 01:22
-
@user I do not understand you, the problem that is discussed in the post is about the Qt WebEngine module in Qt6, instead it seems that you have a different problem: 1. the problem is with PyQt6 and 2. It is with pdb. So in that case I recommend you create a new post explaining your problem in detail, the comments section does not serve to solve other problems. – eyllanesc Nov 23 '21 at 01:32
-
@user From what I see the problem is not from QtWebEngine but from a change introduced in PyQt6 (in some of my posts explain it). In your case, change `QWebEngineSettings.PlaybackRequiresUserGesture` to `QWebEngineSettings.WebAttribute.PlaybackRequiresUserGesture`. See for more details: https://stackoverflow.com/questions/66235661/how-to-check-mousebuttonpress-event-in-pyqt6/66235879#66235879 – eyllanesc Nov 23 '21 at 01:33
-
@user Also read https://www.riverbankcomputing.com/pipermail/pyqt/2020-April/042836.html – eyllanesc Nov 23 '21 at 01:36