freeman_w
3rd September 2009, 12:15
Hallo!
I would like to store 2 pdf-files in a qrc-file... In the Assistant you get to read:
"The Qt resource system is a platform-independent mechanism for storing binary files in the application's executable.". And there is nothing else said about supported binary formats!
So i guess that you can store ANYTHING in a qrc-file
But when i try to do that, it seems that it doesn't work for the pdf-files!
My goal is to launch the pdf from a html-link, within a TextBrowser (TB)!
When i try to show an image within the TB that is also stored in the same resource file, it works fine!
I use the following code to show the image (which works fine) within the TB:
"...<img src=\":/images/logos/sc_mat_logo_155x40.png\" alt=\"SC-Logo\">..."
But when i try to do a similar thing with the pdf-file:
...<a href=\":/disclaimer/disclaimer2_wo.pdf\">...
i get an error message like:
File or Dir file:///disclaimer/disclaimer2_wo.pdf does not exist.
If i put the pdf-files in another dir and try to load them out of the resource-file, it also works fine!
So why the hell does it not work from within the qrc-file???
Why does it work for all images but not for the pdfs??? Are only images supported???
I use QT 4.4.3 under OpenSUSE 10.2 and i don't need an answer saying "try to upgrade your QT" or stuff like that...
I HAVE TO work with that system. I just want to understand why it is not working the way is SHOULD WORK...
Thankfull for any other sort of help/hint....
My resource file looks like:
<RCC>
<qresource prefix="/" >
...
<file>images/logos/sc_mat_logo_155x40.png</file>
<file>disclaimer/disclaimer1_wo.pdf</file>
<file>disclaimer/disclaimer2_wo.pdf</file>
</qresource>
</RCC>
I would like to store 2 pdf-files in a qrc-file... In the Assistant you get to read:
"The Qt resource system is a platform-independent mechanism for storing binary files in the application's executable.". And there is nothing else said about supported binary formats!
So i guess that you can store ANYTHING in a qrc-file
But when i try to do that, it seems that it doesn't work for the pdf-files!
My goal is to launch the pdf from a html-link, within a TextBrowser (TB)!
When i try to show an image within the TB that is also stored in the same resource file, it works fine!
I use the following code to show the image (which works fine) within the TB:
"...<img src=\":/images/logos/sc_mat_logo_155x40.png\" alt=\"SC-Logo\">..."
But when i try to do a similar thing with the pdf-file:
...<a href=\":/disclaimer/disclaimer2_wo.pdf\">...
i get an error message like:
File or Dir file:///disclaimer/disclaimer2_wo.pdf does not exist.
If i put the pdf-files in another dir and try to load them out of the resource-file, it also works fine!
So why the hell does it not work from within the qrc-file???
Why does it work for all images but not for the pdfs??? Are only images supported???
I use QT 4.4.3 under OpenSUSE 10.2 and i don't need an answer saying "try to upgrade your QT" or stuff like that...
I HAVE TO work with that system. I just want to understand why it is not working the way is SHOULD WORK...
Thankfull for any other sort of help/hint....
My resource file looks like:
<RCC>
<qresource prefix="/" >
...
<file>images/logos/sc_mat_logo_155x40.png</file>
<file>disclaimer/disclaimer1_wo.pdf</file>
<file>disclaimer/disclaimer2_wo.pdf</file>
</qresource>
</RCC>