qtwebengine | Qt WebEngine -
kandi X-RAY | qtwebengine Summary
kandi X-RAY | qtwebengine Summary
Qt WebEngine
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of qtwebengine
qtwebengine Key Features
qtwebengine Examples and Code Snippets
Community Discussions
Trending Discussions on qtwebengine
QUESTION
I am fairly very new to Ubuntu/Linux and am currently running into an issue with getting an ERROR: Unknown command not found. I am trying configure Qt for cross compilation for a raspberry pi. I have looked up for similar issues but to no avail unfortunately.
The code I am running is as follows
...ANSWER
Answered 2021-Jun-09 at 07:15Configure
is not recognizing the skip
option, because you are running it from qtbase
folder. Try to tun configure from the top qt folder.
QUESTION
I'm creating a browser using the PyQt5 Web Engine, however when I try to sign in via google, I'm getting the following message:
I've tried many of the solutions on StackOverflow, including This one however they aren't making a difference.
The code I'm currently running (excluding functions and classes):
...ANSWER
Answered 2021-Jun-01 at 10:40Just managed to find a solution, under where I had browser = QWebEngineView()
, I put in an User agent:
QUESTION
ANSWER
Answered 2021-May-22 at 06:19Qt6 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
QUESTION
I'd like to label the extremes of a range input for ordinal data (0-10) to unambiguate the UI. Mozilla documentation suggests that I should be able to use a datalist
within my form like this:
ANSWER
Answered 2021-Apr-06 at 22:09You can add separate elements, probably elements, on either side of your input, then use CSS to position them appropriately.
As far as tick-marks are concerned, there isn't a standard way to add those. However, with the concept of progressive enhancement in mind, feel free to add the without the
label
attributes (since you'll have those set using the above-referenced elements) so that users who access your site on browsers that do support the tick marks can see them.
QUESTION
I have a very simple browser app based on WebEngineView and virtual keyboard made in Qt Quick.
Everything works fine - the keyboard is shown perfectly each time I click on an input in the webview, but what bothers me is that if I click on an input that is at the bottom, the keyboard covers it after opening and I cannot see what I'm typing.
I tried solving it by resizing the WebEngineView element to accomodate for the keyboard height, like most mobile apps work. It works, I can scroll the page under the keyboard but the keyboard still covers the input and I need to scroll manually.
Is there any way I could adjust the web view scroll position so the keyboard doesn't cover the focused input from QML? I cannot do it at a single website because I allow navigation to any website user wants, so I need some universal method.
Here is my qml code:
...ANSWER
Answered 2021-Mar-10 at 17:53The problem with resizing the WebEngineView
is that HTML will see that your device screen suddenly shrunk and may decide to present a vastly different layout, for example move menu from top to side of the screen.
Even if this has not happened, layout has changed. The position on the new "screen" does not correspond to the position on the old one, there is no 1:1 relation, which is why it scrolls to a seemingly random spot in the first place.
We can tell webpage to scroll a focused element into view of new viewport:
- If it was already onscreen than nothing happens.
- If not, webpage scrolls so that the element fits on the screen if possible.
scrollIntoView
has parameters to scroll to the top/bottom of the screen as desired
So when onscreen keyboard is opened:
- Save original
scrollPosition
- Resize
WebEngineView
- Optionally assign
scrollPosition
to saved value - although it probably won't do you any good - Use
runJavaScript
to determineactiveElement
and make itscrollIntoView
Repeat same steps when onscreen keyboard is dismissed.
Do not resize, scroll manuallyAnother approach would be to not resize the "screen" and just scroll the element into view if it got covered.
This would require Qt to change VisualViewport
while leaving LayoutViewport
intact (see this and this for more information) but it seems that Qt cannot do that, at least not through QML alone.
That leaves us with having to do it manually: determine position with getBoundingClientRect
, calculate how much space does keyboard cover, and if it is not inside our calculated uncovered view area - scrollTo it.
(you will still need runJavaScript
to get inside the webpage)
Perhaps this and this SO questions can help
Other options@Hazelnutek reported some success with document.activeElement.scrollIntoViewIfNeeded()
Please see discussion in comments to this answer below:
QUESTION
I want to build Qt 6
with prebuilt MySQL/OpenSSL
libs to try out new features, but I have some issues with configure parameters.
For example, I have such configure parameters:
configure.bat -debug -static -static-runtime -confirm-license -opensource -nomake examples -no-ltcg -sql-mysql -openssl-linked -prefix "C:\Test\6.0.0\msvc2019_64"
When I add the -sql-mysql
or -openssl-linked
parameters I got the following issue:
ANSWER
Answered 2021-Feb-23 at 16:50Thanks to lixinwei (https://bugreports.qt.io/browse/QTBUG-89993) the issue is resolved. Now, it successfully finds the OpenSSL
and MySQL libs
.
Cmake paramaters:
QUESTION
QPdfDocument
(5.15.2), in the QtPDF module (part of QtWebEngine), seems to not be fully documented yet (presumably because it's fairly new, first appearing in 5.14).
What are the units of the size returned by QPdfDocument::pageSize()
(don't bother checking those docs, it's not there)?
It appears to be some reasonable (albeit seemingly low-res) pixel-like units except I'm not sure how it is deducing the document's DPI. Also I've only tested on a limited set of PDF's all generated from the same source, so I'm not sure how normal my observations are, especially given it's a QSizeF
rather than a QSize
(which raises the possibility of e.g. other non-pixel units in other as-of-yet unencountered contexts).
Ultimately what I'd like to do is get the page size of a loaded document's page in physical units (e.g. inches) then determine a rendered output size in pixels given a user-specified DPI.
An example of the values I've observed:
...ANSWER
Answered 2021-Feb-08 at 19:38Looks like the implementation is done with PDFium. Qt calls FPDF_GetPageSizeByIndex and the docs state the height/width is in points.
QUESTION
How can I render a markdown file in my PyQt5 application?
Here I read that I should use a QWebEngineView instead of a QTextEdit because the QTextEdit can't render external images.
In a comment someone references this example. It is however a complete markdown texteditor and additionally written in c++. I tried to translate the needed parts into Python but I don't quite get how what works. I just need a minimal example.
What I have right now is the following:
...ANSWER
Answered 2021-Feb-05 at 17:03QTextEdit since Qt 5.14 can render markdown but as the OP points out it has a limitation: it cannot render remote images. So an alternative is to use QWebEngineView + js libraries like markdown.js and marked.js as the official example shows. You can also use QNetworkAccessManager to download remote .md files.
QUESTION
I have a few JavaScript and HTML files inside the QT Quick Project that I want to exclude from the compilation process, but I want to have these files in the final executable.
When I build the project in release mode, for a few of the minified JavaScript files, QT is giving me errors, so I want to exclude these files from the build. These JS files are used from a web component running inside the QtWebEngine so it is ok if these are not compiled.
...ANSWER
Answered 2021-Jan-05 at 12:36Obviously, you are utilizing Qt Quick Compiler
with release build which compiles all .qml and .js in your resources. I assume you are using qmake
build system because Qt Creator enables quick compiler for qmake based release builds by default but for CMake
you need to manually enable it in CMakeLists.txt (at least for now).
For qmake based build you find the answer from the Qt Quick Compiler doc:
If you have .qml or .js files which should not be compiled but just bundled by the resource system, then you can omit them from the compilation by specifying the resources files that contain them in the QTQUICK_COMPILER_SKIPPED_RESOURCES variable in your project file, like below:
QUESTION
I'm trying to debug my QML application which is experiencing freezes at load. I'm not getting Component.onCompleted signals from any of my components, so I'm trying to check the Component.status changes, however QML is throwing a Cannot assign to non-existent property "onStatusChanged"
warning when I try with the following example. How can I get notified of status or progress changes on components?
ANSWER
Answered 2020-Nov-11 at 16:22You can't access Component
properties, like status
from there. You can only access the onCompleted signal because it's an "attached signal". I would use a Loader
to track progress. Try it like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install qtwebengine
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page