PDA

View Full Version : Linking in a custom library with custom stylesheets and graphics



Claymore
5th March 2007, 19:42
Ok, let's see if I can describe my issue properly :)...

I have two Qt projects that I'm working on. The first project builds a library that defines how an application should look and provides a widget for the main window. In this project, I also have a QRC file compiled to include graphics and stylesheet information to be used in displaying different GUI elements. The second project then uses this library and creates custom widgets to plug into it and define implementation. The purpose of this is to create a common library for different applications to use so users see a common theme, and if the theme needs to be updated all I have to do is modify the source for the library project and rebuild it (along with any applications that need to be rebuilt with the newer library).

Everything works properly except for the graphics not showing up in the second project that includes the library. The main window shows up just fine, but nothing from the stylesheet is displayed. I tried copying the image and qss files being used over to the second project, but it still won't display any of the styles.

Is there something else I'm forgetting to do? Can custom style sheets be bundled into a library file, or do they have to be re-implemented in each project that wants to use them?

Let me know if I need to elaborate on anything to make this issue clearer :).

Claymore
5th March 2007, 20:50
Hmm, it looks like that if I link the file generated by my QRC file in the library project into my second project, all the stylesheet and graphics information is displayed correctly.

Maybe I'm a little new to the building-a-library scene, but shouldn't the library include the generated QRC content if it's included in the library project?