Skip to content

Qt WebKit

Questions about Qt WebKit and related topics? Post here!
1.5k Topics 5.8k Posts
  • Qt Webkit Dependent Libraries Version for 5.212

    Unsolved
    3
    0 Votes
    3 Posts
    419 Views
    B

    @JonB Thanks Jon for the info

  • Store website data in database

    Unsolved
    2
    0 Votes
    2 Posts
    416 Views
    SGaistS

    Hi,

    You have to do that in the slot where you receive the message.

  • Data via Qt Creator Console from WebSocket

    Unsolved
    7
    0 Votes
    7 Posts
    784 Views
    S

    @SGaist Now it worked. Thanks very much.

  • 0 Votes
    6 Posts
    546 Views
    JonBJ

    @zeroDawn
    That may actually be an OK combination then. You might Google for qt 5.11 qtwebkit.

    Your errors actually seem to come from the /usr/lib/libQt5Sensors.so.5.11.1 when linking, rather than from the QtWebKit stuff?

    The other Qt libraries being linked with are in /usr/lib64/ but libQt5Sensors.so.5.11.1 is in /usr/lib, I don't know whether that indicates a 32-/64-bit or other non-compatible mismatch?

    Do you know when it last compiled/linked successfully on such a system?

    I think I'll leave it at that, others may know better than I. I think it is possible your actual issue is with libQt5Sensors rather than the QtWebKit stuff.

  • Cannot compile nixnote2

    Unsolved
    1
    0 Votes
    1 Posts
    479 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    2 Posts
    6k Views
    JKSHJ

    Hi, and welcome!

    @Peter-Goteh said in will javascript const keyword be available for PyQt4 QtWebkit ?:

    i do want to know if the javascript implementation used in PyQt4 QtWebkit will allow for the use of const keyword for ES6.

    Qt 4 reached end-of-life in 2011. ES6 was released in 2015.

    So, the answer is no.

  • QWebEngineView. Can't replace html code and print new pdf

    Solved
    3
    0 Votes
    3 Posts
    688 Views
    0

    @JonB Yep, I've just found that I need to wait for loading page before printing and the solution is connect loadFinished signal to method I need, that do printToPdf() in it. I thought that WebEngineView does not need to wait for the local html file to load, but it was mistaken.

    UPD: Also, I've found a way to print multiple pdfs. You need to make a QEventLoop obj, connect loadFinished signal to QEventLoop::quit and after setHtml just call loop.exec() and you can guarantee that file you need will load and prints correctly only after loading of the previous page code.

    Example:

    // Header class MyClass : public QObject { Q_OBJECT private: QEventLoop loop; QWebEngineView *webView; public: void saveCardPdf(); // Cpp MyClass::MyClass(QObject *parent ): QObject(parent) { webView = new QWebEngineView(); connect(webView, &QWebEngineView::loadFinished, &loop, &QEventLoop::quit); } ... void MyClass::saveCardPdf() { ... // Load your html code.. webView->setHtml(html); // html - string of one page loop.exec(); webView->page()->printToPdf(path); // Modify name for another file path.replace(".pdf", "_1.pdf"); webView->setHtml(html1); // html1 - string of another page loop.exec(); webView->page()->printToPdf(path); }

    It's not perfect solution, but I think you understand the idea

  • WebKit X64 freeze with specific urls

    Unsolved
    1
    0 Votes
    1 Posts
    377 Views
    No one has replied
  • 0 Votes
    1 Posts
    528 Views
    No one has replied
  • 0 Votes
    2 Posts
    880 Views
    H

    Many converters show this glitch while converting. I tried using another online HTML to PDF converter and my problem was solved. You should try it too.

  • Rest API in Qt?

    Unsolved
    4
    0 Votes
    4 Posts
    679 Views
    SGaistS

    You seem to describe a client only application which connects to an existing REST service. If so, then QNetworkAccessManager is the class to build your client upon.

  • QT Virtual Keyboard for WebBrowser

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    kkoehneK

    I am using QT5.8. & c++.

    Qt VirtualKeyboard is available in Qt 5.8.

    For C++: If you mean that you're using Qt Widgets, there's an integration with Qt VirtualKeyboard, too: https://doc.qt.io/qt-5/qtvirtualkeyboard-deployment-guide.html#integration-method

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Unable to run Qt WebView sample code

    Unsolved
    2
    1 Votes
    2 Posts
    948 Views
    D

    Getting the same error ("No WebView plug-in found!) when trying to run the minibrowser sample with

    Qt 6.3.1
    macOS 11.6.7
    XCode 13.2.1

    It really would be useful to have a minimal Qt WebView example actually working!

    UPDATE: I found a workaround on macOS - set the following environment variable in the Run environment:
    QT_WEBVIEW_PLUGIN=native

    However this hasn't worked on Linux, where the setting (I think) would be:
    QT_WEBVIEW_PLUGIN=webengine

    None of this is mentioned anywhere in Qt6 docs for WebView as far as I know. I had to read the source at
    https://code.qt.io/cgit/qt/qtwebview.git/tree/src/webview/qwebviewfactory.cpp?h=6.3.1
    to find that out. And the source code itself is not clear - the comments there suggest that the native web runtime is not used on macOS.
    Which is the opposite of what the docs suggest: https://doc.qt.io/qt-6/qtwebview-index.html - "On macOS, the system web view is used in the same manner as iOS."

    Does anybody at Qt care to comment on this? The lack of working examples and clear documentation on this make it seem like the whole WebView is deprecated or unmaintained.

  • Qt c++ OrangePi (Linux) QWebView VideoCapture

    Unsolved
    1
    0 Votes
    1 Posts
    417 Views
    No one has replied
  • Qt 6 No WebView plug-in found!

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    JKSHJ

    @Augustas said in Qt 6 No WebView plug-in found!:

    edit: Just to add to your answer: it seems that you also need to install Qt WebChannel packet for WebView to work. So in total you need to install:

    Qt WebEngine Qt Positioning Qt WebChannel Qt WebView

    Good catch. Thanks for letting us know!

    (I didn't notice it before because I usually install everything, for convenience)

  • Map QWidget center position to QGraphicsScene coordinates?

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    JonBJ

    @Tacc said in Map QWidget center position to QGraphicsScene coordinates?:

    I'm getting all those positions in the constructos of each item/widget.

    That's why it's a shame that you did not show the code where you were printing the values. I did not know you were doing that.

    Can you help me with that?

    In what sense? If you move things and want to output their position, add a function you can call (e.g. from a menu item) while you develop/debug, or use something like QGraphicsItem::itemChange() or QGraphicsScene::changed() to recognise it has moved.

  • 0 Votes
    4 Posts
    497 Views
    SGaistS

    Since Qt 6.3 has been released, can you check if you still have that issue ?

  • QWebView: problem with events

    Unsolved
    1
    0 Votes
    1 Posts
    388 Views
    No one has replied