Skip to content

Qt WebKit

Questions about Qt WebKit and related topics? Post here!
1.5k Topics 5.9k Posts
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    40 Views
  • 0 Votes
    2 Posts
    571 Views
    JonBJ

    @anshah said in QFileDialog: Filter directory to include only filenames in QStringList:

    I just want to display the filenames in the QStringList

    I don't believe you can do that.

    To stay in one directory and only offer a passed-in list of filenames is not the job for a QFileDialog. You might just as well just present the user with a list of those filenames to pick from, and you don't need to bother showing a directory because you don't want the user to change it or navigate elsewhere.

  • Crash in chromium used by libQt6WebEngineCore 6.3.0

    Unsolved
    1
    0 Votes
    1 Posts
    298 Views
    No one has replied
  • Qt Webkit Dependent Libraries Version for 5.212

    Unsolved
    3
    0 Votes
    3 Posts
    524 Views
    B

    @JonB Thanks Jon for the info

  • Store website data in database

    Unsolved
    2
    0 Votes
    2 Posts
    495 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
    1k Views
    S

    @SGaist Now it worked. Thanks very much.

  • 0 Votes
    6 Posts
    722 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
    548 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
    888 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
    431 Views
    No one has replied
  • 0 Votes
    1 Posts
    612 Views
    No one has replied
  • 0 Votes
    2 Posts
    976 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
    810 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
    1k 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
    462 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)