Hi everyone,

I have created a custom component which uses a QStringList as property value. 
This goes fine in designer, however, when using pyuic4 to compile the component 
it messes things up. This is the python code produced:

# === header removed
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(161, 161)
        self.QPyLedArray = QPyLedArray(Form)
        self.QPyLedArray.setGeometry(QtCore.QRect(12, 12, 68, 134))
        self.QPyLedArray.setNames([<PyQt4.uic.Compiler.qtproxies.i18n_string 
object at 0x00C0C590>, <PyQt4.uic.Compiler.qtproxies.i18n_string object at 
0x00C0C5D0>, <PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00C0C5F0>, 
<PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00C0C630>, 
<PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00C0C690>, 
<PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00C0C6F0>, 
<PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00C0C750>, 
<PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00C0C790>])
        self.QPyLedArray.setVerticalMode(True)
        self.QPyLedArray.setObjectName("QPyLedArray")

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "QStringList", 
None, QtGui.QApplication.UnicodeUTF8))

from rijnh.qt.widgets.qpyledarray import QPyLedArray
# ===

As you can see the setNames is messed up. I've useds pyQt 4.4.3 and pyQt 4.6. 
Both have the same issue. I have attached the qpyledarray.py so you can try to 
compile it. You will need to edit the qledarrayfails.ui with a text-editor and 
set the correct package.

Regards,
Vincent

Attachment: qpyledarray.py
Description: qpyledarray.py

Attachment: qledarrayfails.ui
Description: qledarrayfails.ui

Attachment: qledarrayfails.py
Description: qledarrayfails.py

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

Reply via email to