[PyKDE] Designer qt4 plugins + PyQt4
Gudjon I. Gudjonsson
gudjon at mc2.chalmers.se
Wed Aug 23 21:44:12 BST 2006
Hi
To close my thread on Qt4-designer. The modules appeared in qt4-designer
when I added the Qwt5 C++ library. I don't fully understand the dependency
but it works.
Although it may seem strange according to my sillyness I managed to upgrade
my program from PyQt3 & Qwt4 to PyQt4 & Qwt5. But It doesn't work without
some changes.
When I do :
pyuic4 file.ui > file.py
I get the following lines that give me error messages
from qwt_plot import QwtPlot
mcaForm.setSizeGripEnabled(True)
mcaForm.setModal(True)
When I change:
from qwt_plot import QwtPlot
to
from PyQt4.Qwt5 import QwtPlot
and remove the other lines, everything works charmingly. I use the following
lines to compile my ui file:
echo "from PyQt4.Qwt5 import QwtPlot" >file.py
pyuic4 mca_windowbase.ui |grep -v "from qwt_plot import QwtPlot" |grep -v
setSizeGripEnabled |grep -v setModal >> file.py
Regards
Gudjon
Þann Fimmtudagur 17 ágúst 2006 08:46 skrifaði Andreas Pakulat:
> On 17.08.06 07:06:43, Gudjon I. Gudjonsson wrote:
> > > The place is right, but here the plugins work perfectly. One thing you
> > > have to make sure is that your qwt5 plugin needs to be built in release
> > > mode, else designer (which is built in release mode in debian) cannot
> > > load it.
> >
> > I did qmake-qt4 in the plugin directory (I took the plugin from the
> > PyQwt5 sources)
>
> Then check the PyQwt5 project file that builds the plugin. It needs to
> have CONFIG += release and probably also CONFIG -= debug, but not so
> sure about the 2nd.
>
> > > If you really can't see the qt3 support widgets and the others when
> > > executing designer-qt4 then please report this as a bug to debian.
> >
> > I did run designer-qt4
> >
> > But since I don't find any of the modules, is it possible that they are
> > hidden somewhere? Should they not be in the tools list?
> > Sorry. The Arthur and qt3support and worldtimeclock plugins are there but
> > I don't find the custom widgets nor the qwt widgets.
>
> Is the analogclock there? It should be grouped together with the
> worldtimeclock. Because analogclock is the widget that comes out of the
> customwidgetplugin.
>
> This now looks even more like the qwt5 plugin is built in debug mode.
> Oh, and you need to make sure that the pyqwt5 libraries are accessible
> for the linker. i.e. a ldd /path/to/qwt-plugin should show no missing
> libraries.
>
> Andreas
More information about the PyQt
mailing list