[Qt-creator] Custom widget not showing in Qt Designer on Linux
Robert Wood
robert.wood at apostrophe.co.uk
Tue Feb 23 13:36:37 CET 2010
I'm trying to get a very simple custom widget to show in Qt designer,
but just can't get it to work, wondering whether anyone can help.
In Qt Creator, I did File | New and chose Qt4 Designer Customer Widget.
I gave it a name rwLineEdit then in the next box typed in rwLineEdit as
the name of my Widget Classes. (Not really clear why this has to be
done twice.)
This then gives me all names of all the files such as rwlineedit.pri, .h
etc and the plugin names the same but with plugin inserted. I chose my
Widget Base Class as QLineEdit, fileld into some descriptions,
includingstating a (non existent group - I'm assuming At designer
handles that and makes a new one?).
Next window only allows me to edit PlginName which I leave as
rwlineeditplugin and the resource file as icons.qrc (again I left this).
It adds a load of files and all seems well. I can add a routine to the
class and compile it.
The problem is, that when I launch Qt Designer it simply refuses to show
up!
From what I can see of the tutorials on how to do custom widgets the
information seems to be in the source files. For example:
Q_EXPORT_PLUGIN2(rwlineeditplugin, rwLineEditPlugin)
Is at the bottom of rwlineeditplugin.cpp
I have put all this in ~/Software/Qt4/customWidgets/rwLineEdit/ and I
end up with a librwlineeditplugin.so file in there, but am thinking that
should be somewhere Qt Designer looks at, which I thought was specified in:
target.path = $$[QT_INSTALL_PLUGINS]/designer
Would be really grateful if someone can point me in the right direction
on this.
Many thanks,
Rob
More information about the Qt-creator-old
mailing list