[Development] RCC XML and options

André Pönitz apoenitz at t-online.de
Thu Sep 4 22:11:31 CEST 2014


On Thu, Sep 04, 2014 at 06:46:04PM +0000, John M. Dlugosz wrote:
> 
> On 9/4/2014 1:03 PM, André Pönitz apoenitz-at-t-online.de |Qt Dev mailing list/Qt| wrote:
> > [Out of curiosity, what are the "standard platform tools" in this case?] 
> MSBuild.  Runs from automated build server, testing server, as well as in the desktop IDE.
> >> Let me make sure I understand what that’s used for: The named function
> >> needs to be called at some point to make the resources available, but is
> >> otherwise not used, right? Different *.qrc files prepared by different
> >> developers in different parts of the code base (in the same resulting
> >> executable file) are distinguished by the ‘prefix’, right?
> >>
> >> If that’s right, couldn’t the generated code contain a dummy object using
> >> the “static constructor” technique to cause the registration function to
> >> be called sometime before main(), and not need an exposed name at all?
> > That's already happening. Of course, the "static constructor" must be
> > triggered _somehow_, e.g. from the dynamic loader.
> >
> >> (Update:  it looks like a macro is generating a static object with a
> >> ctor, but it is still necessary to explicitly call the init function for
> >> it to work.
> > Did you try and it didn't work without explicitly calling the setup
> > function? How did you build that application?

> Yes.  I took out the Q_INIT_RESOURCE line, and the icons were missing in
> the Qt-drawn window.

There might be other reasons for missing images, like not suppported image
formats (missing/not deployed plugins, ...)

I would start with something harmless like a plain text file to make sure
the resource setup works, and then go for images.

Andre'



More information about the Development mailing list