Hello.

In http://bugs.debian.org/475403 a user reported that KDE classes are
not imported correctly in pykde4 output:

| Using pykdeuic4 to convert UI files generated by Qt Designer to Python
| classes results in wrong mappings for many KDE4 widgets.

| While standard classes are imported correctly...
| > from PyKDE4 import kdecore
| > from PyKDE4 import kdeui
| > from PyQt4 import QtCore, QtGui
| ....special widgets are imported at the end of the document giving a non-
| existent package:
| > from kcombobox import KComboBox

See the two attached files for an example.

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Excuse me for thinking a banana-eating contest was about eating a banana!
                -- Paris Geller
<ui version="4.0" >
 <class>Dialog</class>
 <widget class="QDialog" name="Dialog" >
  <property name="geometry" >
   <rect>
    <x>0</x>
    <y>0</y>
    <width>400</width>
    <height>300</height>
   </rect>
  </property>
  <property name="windowTitle" >
   <string>Dialog</string>
  </property>
  <layout class="QVBoxLayout" >
   <item>
    <widget class="KComboBox" name="kcombobox" />
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>KComboBox</class>
   <extends>QComboBox</extends>
   <header>kcombobox.h</header>
  </customwidget>
 </customwidgets>
 <resources/>
 <connections/>
</ui>
#!/usr/bin/env python
# Generated by pykdeuic4 from kcombobox.ui on Thu Apr 10 22:44:40 2008
#
# WARNING! All changes to this file will be lost.
from PyKDE4 import kdecore
from PyKDE4 import kdeui
from PyQt4 import QtCore, QtGui

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(QtCore.QSize(QtCore.QRect(0,0,400,300).size()).expandedTo(Dialog.minimumSizeHint()))

        self.vboxlayout = QtGui.QVBoxLayout(Dialog)
        self.vboxlayout.setObjectName("vboxlayout")

        self.kcombobox = KComboBox(Dialog)
        self.kcombobox.setObjectName("kcombobox")
        self.vboxlayout.addWidget(self.kcombobox)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(kdecore.i18n("Dialog"))

from kcombobox import KComboBox
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to