qt-interest@trolltech.com
[Top] [All Lists]

Re: Custom Widget Plugin

Subject: Re: Custom Widget Plugin
From: Josinei Silva
Date: Fri, 9 Jun 2006 11:10:21 -0300
David,

Em Sexta 09 Junho 2006 10:31, David Boddie escreveu:
> That's surprising. Aren't any of the Qt example plugins installed?

Examples plugins? I don't think so. At "WidgetBox" in Designer, i see only 
"default" widgets ( Vertical Layout, Horizontal Spacer, Push Button, List 
View, List Widget and ohters ).

I tried again with this "plugins.pro":

And these are the messeges during compilation:

josinei@linuxdev:/home/Desenvolvimento/Lib/Plugins> qmake
josinei@linuxdev:/home/Desenvolvimento/Lib/Plugins> make
make -f Makefile.Debug all
make[1]: Entering directory `/home/Desenvolvimento/Lib/Plugins'
g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC  -DQT_PLUGIN -DQT_XML_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Idebug -I. -o debug/analogclock.o 
analogclock.cpp
g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC  -DQT_PLUGIN -DQT_XML_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Idebug -I. -o 
debug/customwidgetplugin.o customwidgetplugin.cpp
/usr/local/Trolltech/Qt-4.1.2/bin/moc -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB 
-DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Idebug -I. ../Include/analogclock.h 
-o debug/moc_analogclock.cpp
g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC  -DQT_PLUGIN -DQT_XML_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Idebug -I. -o 
debug/moc_analogclock.o debug/moc_analogclock.cpp
/usr/local/Trolltech/Qt-4.1.2/bin/moc -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB 
-DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Idebug 
-I. ../Include/customwidgetplugin.h -o debug/moc_customwidgetplugin.cpp
g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC  -DQT_PLUGIN -DQT_XML_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Idebug -I. -o 
debug/moc_customwidgetplugin.o debug/moc_customwidgetplugin.cpp
rm -f libMyPlugin.so
g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.1.2/lib -shared -o libMyPlugin.so 
debug/analogclock.o debug/customwidgetplugin.o debug/moc_analogclock.o 
debug/moc_customwidgetplugin.o   -L/usr/local/Trolltech/Qt-4.1.2/lib 
-L/Install/Qt-4.1.2/qt-x11-opensource-src-4.1.2/lib -L/usr/X11R6/lib 
-lQtDesigner_debug -lQtXml_debug -lQtGui_debug -lpng -lSM -lICE -lXi 
-lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 
-lQtCore_debug -lz -lm -ldl -lpthread
make[1]: Leaving directory `/home/Desenvolvimento/Lib/Plugins'
make -f Makefile.Release all
make[1]: Entering directory `/home/Desenvolvimento/Lib/Plugins'
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC  -DQT_NO_DEBUG -DQT_PLUGIN 
-DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Irelease -I. -o 
release/analogclock.o analogclock.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC  -DQT_NO_DEBUG -DQT_PLUGIN 
-DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Irelease -I. -o 
release/customwidgetplugin.o customwidgetplugin.cpp
/usr/local/Trolltech/Qt-4.1.2/bin/moc -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Irelease 
-I. ../Include/analogclock.h -o release/moc_analogclock.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC  -DQT_NO_DEBUG -DQT_PLUGIN 
-DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Irelease -I. -o 
release/moc_analogclock.o release/moc_analogclock.cpp
/usr/local/Trolltech/Qt-4.1.2/bin/moc -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB 
-DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Irelease 
-I. ../Include/customwidgetplugin.h -o release/moc_customwidgetplugin.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC  -DQT_NO_DEBUG -DQT_PLUGIN 
-DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS 
-I/usr/local/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtDesigner 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtCore 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtGui 
-I/usr/local/Trolltech/Qt-4.1.2/include/QtXml 
-I/usr/local/Trolltech/Qt-4.1.2/include -I../Include 
-I/home/Desenvolvimento/Lib/Include/tmp -Irelease -I. -o 
release/moc_customwidgetplugin.o release/moc_customwidgetplugin.cpp
rm -f libMyPlugin.so
g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.1.2/lib -shared -o libMyPlugin.so 
release/analogclock.o release/customwidgetplugin.o release/moc_analogclock.o 
release/moc_customwidgetplugin.o   -L/usr/local/Trolltech/Qt-4.1.2/lib 
-L/Install/Qt-4.1.2/qt-x11-opensource-src-4.1.2/lib -L/usr/X11R6/lib 
-lQtDesigner -lQtXml -lQtGui -lpng -lSM -lICE -lXi -lXrender -lXrandr 
-lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm 
-ldl -lpthread
make[1]: Leaving directory `/home/Desenvolvimento/Lib/Plugins'

After this, i do:

josinei@linuxdev:/home/Desenvolvimento/Lib/Plugins>  su root
Senha:
linuxdev:/home/Desenvolvimento/Lib/Plugins # make install
make -f Makefile.Debug install
make[1]: Entering directory `/home/Desenvolvimento/Lib/Plugins'
cp -f "libMyPlugin.so" 
"/usr/local/Trolltech/Qt-4.1.2/plugins/designer/libMyPlugin.so"
make[1]: Leaving directory `/home/Desenvolvimento/Lib/Plugins'
make -f Makefile.Release install
make[1]: Entering directory `/home/Desenvolvimento/Lib/Plugins'
cp -f "libMyPlugin.so" 
"/usr/local/Trolltech/Qt-4.1.2/plugins/designer/libMyPlugin.so"
strip --strip-unneeded 
"/usr/local/Trolltech/Qt-4.1.2/plugins/designer/libMyPlugin.so"
make[1]: Leaving directory `/home/Desenvolvimento/Lib/Plugins'

And:

linuxdev:/home/Desenvolvimento/Lib/Plugins # designer

I can't see my plugin inside "WidgetBox" :(

Iá moving from Qt3 to Qt4. I used Desginer as code editor with Qt3 and i 
create many plugins to implement "VALID" and "WHEN" for lineedit, dateedit 
and other widgets. But if i can't do it with Qt4, i'll use only KDevelop as 
code editor and will create dialog's layout  by my self, without a GUI 
Designer.

Josinei

David, can i ask you some questions about changes in Qt4?

There's many changes that i liked. But i didn't understand/agree/like why so 
many "name" changes. There's a lot of properties and functions that are the 
same but only with another name. Construtors that don't have object name 
anymore . I still beginning with Qt4, so, i know only a few changes, but i 
think It's a lot of work just to change "names". I think about who has 
thousands and thousands of line to change. ItÅ not my case, but i think if 
i'll have this work again when Qt5 ou Qt6 comes..... It don't look like 
"rapid developement" :(

Thanks

Josinei


_______________________________________________________
Abra sua conta no Yahoo! Mail: 1GB de espaïo, alertas de e-mail no celular e 
anti-spam realmente eficaz.
http://mail.yahoo.com.br/

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>