Custom Widget and #include error in the ap
Unsolved
General and Desktop
-
Hi all.
I build my custom widget XLabel, derived from a QLabel.
I create libxlabelplugin.so and I use it in Designer.When I compile the project the linker cannot find XLabel::XLabel because it is implemented in libxlabelplugin.so.
How can I tell to the linker to link libxlabelplugin?
This is the tree of the project
-
Hi,
You followed the "simple way" of creating a Designer plugin.
For a "real world" approach take a look at this.
Short version: you split your plugin code in two:
- a library which will include your widget(s)
- the plugin itself
That way you have the plugin for designer and you can link your application to the library which will not have any dependency on designer related code.
Hope it helps