Greetings,
There is a small bug in the supplied examples/dialogs/standarddialogs.py
file:
> $ python a/examples/dialogs/standarddialogs.py
> Traceback (most recent call last):
> File "a/examples/dialogs/standarddialogs.py", line 192, in setInteger
> self.integerLabel.setText("%d%" % i)
> ValueError: incomplete format
To reproduce:
1) Run standarddialogs.py
2) Click on the QInputDialog.getInteger button
3) Enter any valid integer value (the default is fine) and press Ok
The problem is caused by a broken format string. I am attaching a patch
to fix the problem, made against the PyQt-x11-gpl-4.8.2.tar.gz release.
Regards,
Israel G. Lugo
diff -durp a/examples/dialogs/standarddialogs.py b/examples/dialogs/standarddialogs.py
--- a/examples/dialogs/standarddialogs.py 2010-12-23 11:25:29.000000000 +0100
+++ b/examples/dialogs/standarddialogs.py 2010-12-26 19:21:44.982849002 +0100
@@ -189,7 +189,7 @@ class Dialog(QtGui.QDialog):
i, ok = QtGui.QInputDialog.getInteger(self,
"QInputDialog.getInteger()", "Percentage:", 25, 0, 100, 1)
if ok:
- self.integerLabel.setText("%d%" % i)
+ self.integerLabel.setText("%d" % i)
def setDouble(self):
d, ok = QtGui.QInputDialog.getDouble(self, "QInputDialog.getDouble()",
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt