View PDF in QML WebView

Refresh

6 days ago

Views

3 time

0

I would like to view a PDF file in a WebView created in my QML code. I am importing QtWebView 1.1 and setting the url property to the path of the PDF file but I am getting this error:

[13044:12820:0314/144814.854:ERROR:in_progress_cache_impl.cc(192)] Cache is not initialized, cannot RetrieveEntry. [13044:12820:0314/144814.854:ERROR:in_progress_cache_impl.cc(176)] Cache is not initialized, cannot AddOrReplaceEntry. [13044:12820:0314/144814.854:ERROR:in_progress_cache_impl.cc(192)] Cache is not initialized, cannot RetrieveEntry.

When I use the same code to view an image it works. This question: Display PDF file with QWebView is close to what I want but QML does not seem to give me access to the settings method the way that C++ does (WebView docs). Is there some other way to do this?

0 answers