c++ - QUiLoader ignores resource file -


If you need to load a .ui file dynamically, you can use the code manager. But if you are using external resources in your .ui file (if there is something like & lt; resource & gt; & lt; where location = "... / filename.qrc" /> gt; & Lt; / resources & gt; .ui file), QT will not load it.

Ie If you open your .ui file in QT Designer, you will see all the bitmaps on buttons and other resources. But if you load the same .ui file through the Cleiler, you will not see the bitmap on the button.

Is this a problem? How to fix it?

It does not matter whether you have created a .ui file while using your .qrc file Already, the file must always be added to the project itself.

There are several Qt devices that are used in the precompilation phase. The following are most commonly used, but others are:

  1. META Object Compiler (MOC) creates moc_xxx.cpp files from the header file, if They include the Q_OBJECT macro (or xxx.moc at a CPP file scan).

  2. Resource Compiler (RC) creates qrc_xxx.cpp files from .crc files

  3. User Interface Compiler (UIC) .ui Creates ui_xxx.h files from files

    Any device that creates a source file (.cpp), then this code must be compiled and linked to the application if it is useful.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -