PDA

View Full Version : Using *.rcc files as Themes



momesana
20th January 2008, 04:19
Are there any reasons against using external QResource files for theming an application?
I have written a small test application and it seems to work fine. The resource binaries also seem to be platform-independent, as I can load resources built under linux on my windows partition without any problems. So are there any reasons why one should not use compiled QResources as a theme bundle (containing css files and icons)?

Thanx in advance

ashukla
20th January 2008, 06:06
Are there any reasons against using external QResource files for theming an application?
I have written a small test application and it seems to work fine. The resource binaries also seem to be platform-independent, as I can load resources built under linux on my windows partition without any problems. So are there any reasons why one should not use compiled QResources as a theme bundle (containing css files and icons)?

Thanx in advance
Probably different processors encodes binaries in different format. So, It can't be used. You are using the .rcc in a same device, so that there is no problem of decoding or extracting the data.

momesana
20th January 2008, 12:33
Probably different processors encodes binaries in different format. So, It can't be used. You are using the .rcc in a same device, so that there is no problem of decoding or extracting the data.
too bad :(. It would have been a really simple and effective way to distribute themes without the hassle of tinkering around with zip files etc.

ashukla
21st January 2008, 10:10
too bad :(. It would have been a really simple and effective way to distribute themes without the hassle of tinkering around with zip files etc.
My means is here the representation of Integers & Characters are differ in different processors. Have you checked with different processors?

momesana
29th January 2008, 03:03
No, unfortunately I haven't checked it with different processors yet. Actually I have only my laptop here at my disposal and my desktop-pc is about 5000 km away from here and this will stay this way for a few further weeks. It would be nice if someone could test this or tell me/us if the incompatibility is indeed the case amongs different architectures.

bender86
29th January 2008, 14:28
I tried just now on my machines: An intel core 2 duo equipped with win vista x64, using Qt-4.3.3 compiled with MSVC 2008 express (x86), and an UltraSparc5, using linux (but userland 32bit), using Qt-4.3.3 compiled with gcc-4.1.2.
A .rcc file created on linux that contains a txt file and a png image works flawlessy on windows. I managed to load .rcc, and display text and image.
A .rcc file created on windows that contains an utf8 txt file works on linux. I guess should work also with not unicode txt files, but I didn't get to display non ascii characters that way.
I can't show images on sparc, because I got no X server on it.

It looks like that .rcc files are platform independent (at least when contains unicode text).

momesana
30th January 2008, 04:02
Sounds great! I will write some simple theme-manager based on .rcc files for testing purposes then to see if any other issues show up.
Thank you very much.

Brandybuck
30th January 2008, 18:56
rcc embeds files into the code. As long as the files are portable, then there should be no problem.

ashukla
31st January 2008, 06:53
Yes! The problem which I am discussed earlier. You must create a unicode mechanism for representation of character as well as for image to store as binaries. Thanks Qt! which has consider the problem & given its solution. But we have to make a bit more attention when saving a file or opening a file on different platform.