Qt World Summit: Submit your Presentation

cross plugin linking

  • I have the case that I want to use widgets from one designer plugin within another plugin.
    As long as I do not use resources this works fine by linking the basic plugin to the other plugin.
    However, if the basic plugin contains resources and is linked to the other plugin qt designer does not find these resources anymore. Probably because the same resources are present in multiple plugins (because of the linking).
    => Cannot open file ':/Attitude/Default/foreground.svg', because: Unknown error

    If I do not link the basic plugin to the others the designer does not resolve the cross library dependencies at runtime and does not start.
    => symbol lookup error: /home/sbuhmann/src/hrov/newreptest/install/lib/qt/designer/libhrov_widget_collection.so: undefined symbol: _ZN11DoubleGaugeC1EP7QWidget

    How can I solve this?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are these dependent plugins all yours ?

  • Yes, they are

  • Lifetime Qt Champion

    Then you should rather put all the common code in a library and link your plugins against it.

  • Yes, it works if I build a normal shared library an a designer plugin containing the widgets used by other plugins.
    The normal shared library is used to be linked to the other ones and the plugin is loaded into the designer to have the widgets available there.