Results 1 to 9 of 9

Thread: Using *.rcc files as Themes

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Using *.rcc files as Themes

    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

  2. #2
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Using *.rcc files as Themes

    Quote Originally Posted by momesana View Post
    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.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Unhappy Re: Using *.rcc files as Themes

    Quote Originally Posted by ashukla View Post
    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.

  4. #4
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Using *.rcc files as Themes

    Quote Originally Posted by momesana View Post
    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?
    Last edited by ashukla; 21st January 2008 at 10:12. Reason: mispelling
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  5. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Using *.rcc files as Themes

    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.

  6. #6
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using *.rcc files as Themes

    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).

  7. #7
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Using *.rcc files as Themes

    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.

  8. #8
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using *.rcc files as Themes

    rcc embeds files into the code. As long as the files are portable, then there should be no problem.

  9. The following user says thank you to Brandybuck for this useful post:

    momesana (31st January 2008)

  10. #9
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Using *.rcc files as Themes

    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.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

Similar Threads

  1. Replies: 5
    Last Post: 22nd September 2006, 09:04
  2. qt3 themes example: missing header files?
    By nikita in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2006, 13:12
  3. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 11:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.