[PyQt] [patch] Fix broken format string in standarddialogs.py example

Hans-Peter Jansen hpj at urpla.net
Sun Dec 26 22:23:28 GMT 2010


On Sunday 26 December 2010, 19:29:22 Israel G. Lugo wrote:
> 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)

Guess,

+            self.integerLabel.setText("%d%%" % i)

is what it is meant to be..

>  
>      def setDouble(self):    
>          d, ok = QtGui.QInputDialog.getDouble(self,
> "QInputDialog.getDouble()",

Pete


More information about the PyQt mailing list