[PyQt] Bug in custom widget using QStringList when using pyuic

2010-03-12 Thread Vincent van Beveren
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


qpyledarray.py
Description: qpyledarray.py


qledarrayfails.ui
Description: qledarrayfails.ui


qledarrayfails.py
Description: qledarrayfails.py
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] uic compiler goes wrong

2010-01-26 Thread Vincent van Beveren
Hi,

I'm using a rather old (4.4.3) version of PyQT, but I was wondering if the 
following issue was solved:

I've created a custom component with one property being a QStringList. When I 
compile this with pyuic4 it generates the following code in one of the python 
modules:

self.gasFlowTestResult.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(8)
self.gasFlowTestResult.setFont(font)

self.gasFlowTestResult.setNames([PyQt4.uic.Compiler.qtproxies.i18n_string 
object at 0x00D9CD10, PyQt4.uic.Compiler.qtproxies.i18n_string object at 
0x00D9CD30, PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00D9CD70, 
PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00D9CDB0, 
PyQt4.uic.Compiler.qtproxies.i18n_string object at 0x00D9CE10])

Needless to say Python doesn't like this very much. Is this solved in a later 
version?

Regards,
Vincent

___
Ing. V. van Beveren
Software Engineer, FOM Rijnhuizen
T: +31 (0) 30-6096769
E: v.vanbeve...@rijnhuizen.nlmailto:v.vanbeve...@rijnhuizen.nl

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt