I think there is a bug related to the error in the title. I found there is still unanswered post here
It happens when I compile my extension in Linux (windows users don’t have this problem). I found out that in the source file that caused this error there is this line:
#include <qmrmlnodecomboBox.h>
and replacing it with this line solved the problem:
#include <qMRMLNodeComboBox.h>
It would be nice to fix this error in slicer source as I don’t know how.
I couldn’t find this lower case include in the current Slicer code. If you’re using an old Slicer, please update to the latest (or at least 4.8.1 if you don’t want the nightly for some reason).
This is the only place I found it and it is correct. I think is related to the use of qt wrapping and cmake in slicer as the file ui_qSlicerBrhoomModuleWidget.h is generated after the build in the build folder and generates the mentioned error in my case.
Have you added the combobox using Qt designer or by manually editing the file in a text editor? If you use custom widgets then you have to add special declarations for them in the .ui file (Qt designer adds those automatically).
It was added manually.
What are these declaration?
I tried to use the designer but I am not sure how to add the ctk and mrml libs to qt designer. I tried this
In order to have the CTK and MRML widgets in Qt Designer, Qt Designer offers 2 options:
the first (not detailed here) is to copy (or symlink) the CTK and MRML plugin libraries into %QT_DIR%/plugins/designer,
the second is to set the environment variable QT_PLUGIN_PATH to the directory Slicer-build/bin containing the subdirectory designer with the plugin libraries. Note: Qt requires that the directory containing the designer plugins is named “designer”.
Which files I need to copy? I run
export QT_PLUGIN_PATH=~/SlicerDev-4.8.1/build/Slicer-build/bin/designer
~/SlicerDev-4.8.1/build/Slicer -- designer
but still I can't see the ctk or mrml widgets
I don’t think you need to export any environment variables. Just running ./Slicer --designer (note there is no space before --) should work. What operating system do you use?
I’m not sure why --designer is not available on Ubuntu, but it is just a convenience function and it is equivalent to ./Slicer --launch full/path/to/designer