Is there any way to open a .pdf file from QML or I have to do it in C++ via QDesktopServices , and if I used QDesktopServices would it work without any problem in Android.
Thanks.
Is there any way to open a .pdf file from QML or I have to do it in C++ via QDesktopServices
The only thing I am aware of is the following:
Qt.openUrlExternally("http://stackoverflow.com/questions/23001582/how-to-open-a-pdf-file-from-qml/23002658");
Based on the comments, it seems to work on Android
In your particular case, it would become:
Qt.openUrlExternally("path/to/my/foo.pdf");
and if I used QDesktopServices would it work without any problem in Android
The question lacks a question mark, but nitpicking aside, this oughta work. This bug was also fixed in Qt 5.2.0. That is why I asked about the version, but other than this, I am not aware of any other critical issues:
QDesktopServices::openUrl crashes Application
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With