Hi,
is there a way to open PDF files in a Qt application?
Bye
Hi,
is there a way to open PDF files in a Qt application?
Bye
If you want to display it, you can use activeX on Windows or XEmbed on Unix. You can also use some tool to convert pdf to some other format (like html) which Qt can handle.
ActiveQt is in Open Source edition?
No, it's not, but you don't have to use ActiveQt to use ActiveX, so the way is still open.
That's how I've done it on Windows:
Qt Code:
To copy to clipboard, switch view to plain text mode
You can even use QDesktopServices to do that, but you won't display a pdf file inside your application this way, just run an external pdf browser.
Sorry but that's not exactly how I did it. Here is the correct code:
Qt Code:
if ((long)ShellExecuteW(0, 0, reinterpret_cast<const WCHAR *>(pathDocPDF.utf16()), 0, 0, SW_SHOWNORMAL) <= 32)To copy to clipboard, switch view to plain text mode
it only opens the PDF doc with the default application installed on your system
Bookmarks