[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] =?utf-8?q?pyqt_4=2E11_compile_error_=28vs_4=2E10=2E4=29_se?=
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2014-06-18 6:08:01
Message-ID: 2569440e79789420488d3ea39547a7b0 () www ! riverbankcomputing ! com
[Download RAW message or body]
On 18/06/2014 4:21 am, Scott Kitterman wrote:
> On Tuesday, June 17, 2014 13:01:09 Phil Thompson wrote:
>> On 17/06/2014 11:28 am, Richard Duivenvoorde wrote:
>> > Hi,
>> >
>> > QGIS is a qt application, using pyqt for addition functionality (see
>> > qgis.org).
>> >
>> > Since two days (I think update in Debian (I'm on testing)) I have Pyqt
>> > 4.11. Before it was 4.10.4
>> >
>> > If I compile the console_settings.ui file attached to this bug report:
>> > http://hub.qgis.org/issues/10610
>> >
>> > to me it looks like the generated python is wrong.
>> >
>> > for given tableWidget 4.10.4 generated:
>> > ...
>> >
>> > self.tableWidget.setGridStyle(QtCore.Qt.SolidLine)
>> > self.tableWidget.setRowCount(0)
>> > self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
>> > self.tableWidget.setColumnCount(2)
>> >
>> > ...
>> > Which is ok: two columns.
>> >
>> > But 4.11 generates:
>> > ...
>> >
>> > self.tableWidget.setGridStyle(QtCore.Qt.SolidLine)
>> > self.tableWidget.setRowCount(0)
>> > self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
>> > self.tableWidget.setRowCount(0)
>> >
>> > ...
>> > Which (I think) is wrong.
>> > No columncount anymore, and two(!) times the same line
>> > self.tableWidget.setRowCount(0)
>> >
>> > Can this be a bug? Or is it a problem in the ui file (as said, attached
>> > on the qgis issue)
>> >
>> > Thanks for any information you can give us.
>>
>> It will be fixed in tonight's PyQt4 and PyQt5 snapshots.
>
> Would you mind posting the patches for this to the list? I didn't get
> home in
> time to get yesterday's snapshot to diff against and I'd like to
> cherrypick
> these fixes into Debian.
Attached. It should apply to both PyQt4 and PyQt5.
Phil
["pyuic.diff" (text/x-diff)]
diff -r 1b6513d3741f pyuic/uic/uiparser.py
--- a/pyuic/uic/uiparser.py Mon Jun 16 13:00:33 2014 +0100
+++ b/pyuic/uic/uiparser.py Wed Jun 18 07:06:49 2014 +0100
@@ -244,10 +244,10 @@
self.stack.push(self.setupObject(widget_class, parent, elem))
if isinstance(self.stack.topwidget, QtGui.QTableWidget):
- if self.getProperty(elem, 'columnCount') is not None:
+ if self.getProperty(elem, 'columnCount') is None:
self.stack.topwidget.setColumnCount(len(elem.findall("column")))
- if self.getProperty(elem, 'rowCount') is not None:
+ if self.getProperty(elem, 'rowCount') is None:
self.stack.topwidget.setRowCount(len(elem.findall("row")))
self.traverseWidgetTree(elem)
[Attachment #4 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic