On 22.12.06 12:33:30, Marcos Dione wrote:
> On Fri, Dec 22, 2006 at 03:30:22PM +0100, Andreas Pakulat wrote:
> > Without some code we can't know. The .ui files are fine as far as I can
> > see.
> 
> [EMAIL PROTECTED]:~/src/projects/kress/src/trunk/src$ python
> Python 2.4.3 (#2, Oct  6 2006, 07:52:30)
> [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import kdedesigner
> >>> from kress.kressmainwindow import MainWindow
> >>> import sys
> >>> import kdecore
> >>> app= kdecore.KApplication (sys.argv, "")
> >>> w= MainWindow ()
> ScimInputContextPlugin()
> QLayout "unnamed" added to KMainWindow "MainWindow", which already has a 
> layout
> >>> w.show ()
> MainWindow.showTab(QWidget*): Not implemented yet
> >>> app.exec_loop ()
> 
>     and the window shows wrong.

The problem is very simple: pyuic doesn't recognize KMainWindow and thus
doesn't generate the same code as for the QMainWindow:
        self.setCentralWidget(QWidget(self,"qt_central_widget"))
        MainWindowLayout = 
QVBoxLayout(self.centralWidget(),11,6,"MainWindowLayout")

and the KMainWindow create the vbox layout with "self" as parent widget.

Not sure if this will be fixed in pyuic or not, as Phil doesn't know
wether he'll release another version of PyQt3.

A simple replace in the generated file with the above code doesn't work
either as then there's another problem with the tabwidget. I suggest to
build the KMainWindow ui completely by handcrafted code.

Andreas

> -- 
> (Not so) Random fortune:
> 00;05 < perrito666> la cerveza es un touch and go, la miopĂ­a ya es amor.
> 
> _______________________________________________
> PyKDE mailing list    [email protected]
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
> 

-- 
You will forget that you ever knew me.

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to