Custom widget with custom widgets in Qt Creator (Designer)
-
Hello all!
I am trying to use my custom widget containing another custom widget. Creating and using separate custom widgets causes no problem (I create .so lib for plugin, put it to <QtPath>/plugins/designer/, put plugin header to ~/QtPluginHeaders and use this path with INCLUDEPATH in pro files).
So I have created ToggleSwitch widget and respective plugin, added it into QtCreator and everything is ok.
Now I want to create new one widget with my ToggleSwitch widget. After doing the same things (adding to QtCreator) my QtCreator app crashes (while opening *.ui file in QtCreator) with the following error:./qtcreator: symbol lookup error: <QtPath/plugins/designer/libNewPlugin.so: undefined symbol: _ZN12ToggleSwitchC1EP7QWidgetHow could I solve this issue?
My setup: Linux, Qt version 5.13 and QtCreator built with this Qt version.
Thank for an answers in advance! -
Problem has be solved by adding ToggleSwitch source/header files to the new widget .pro file.
So the question now: is there some more common and elegant way to do this?