PDA

View Full Version : How to open a Pdf file from Qt



vishal.chauhan
28th March 2007, 06:55
Hi All,

I m using Qt 4.2.2 on my Intel Mac.

I have a PDF file in the Resource File and I have a Button on ToolBar say Open.
What I want is that when I click the Open button the PDF file Should be open in its default application Preview in case of Mac.

If anybody knows then plz help me.

Thanks.

wysota
28th March 2007, 09:10
I don't think you can open a file from a resource using the default system handler. You'd have to extract the file to a real file first and then use QDesktopServices::openUrl.

vishal.chauhan
28th March 2007, 09:24
Thnaks.

Yes Now I m able to do that.