PDA

View Full Version : Qt Creator Custom Widget not visible in QtCreator 2.0 - only in Qt 4 Designer



divisor
19th August 2010, 12:30
Hi,
i started to create an own widget, which should be add to the "designer - view" of the QtCreator 2.
It doesn't work. :)

So I started with the tutorial for the custom widget from Trolltech/Nokia, http://bit.ly/byri2f .
I downloaded the files, compile and install it.
And it doesn't show up in the QtCreator 2.0, but in den Qt 4 Designer.

The installation path is /usr/lib/qt4/plugins/designer.
Where is my mistake?

I use Qt 4.6.3 with QtCreator 2.0.0 (Revision 1c0f52a091, based on Qt 4.7.0 (32 bit)) on Ubuntu 10.04.
Have anyone tips or a solution?

divisor
20th August 2010, 13:09
I have to install the *.so files manually in the directory /opt/qtsdk-2010.04/bin/designer, than the QtCreator loads the custom widget.

One Question, too:

In the projekt, where I use my custom widget, I have to add

/usr/share/qt4/lib/libQtDesigner.so
/usr/share/qt4/lib/libQtScript.so
/usr/share/qt4/lib/libQtXml.so

to LIBS, or I get the errors:

undefined reference to `QLineEdit::setPlaceholderText(QString const&)'
undefined reference to `QListData::detach(int)'
undefined reference to `QMetaType::registerTypedef(char const*, int)'
undefined reference to `QListData::detach_grow(int*, int)'


Why?

lumiss
25th August 2010, 09:25
http://stackoverflow.com/questions/2487846/qt-plugins-not-working/2491825#2491825

BTW, you can control where Qt Creator searches for plugins using QT_PLUGIN_PATH environment variable. For example, start Qt Creator like this:

QT_PLUGIN_PATH="/usr/lib/qt4/plugins/" /opt/qtsdk-2010.04/bin/qtcreator