[PyQt] Newbie Use of QString.rightJustify(6, '0')

rich1939 r.richardparker at comcast.net
Mon Dec 7 21:38:26 GMT 2009

I'm getting text from a QLineEdit control and trying to right-justify it with
zero (0) fill. When I try to say the following:

text = self.ui.txtNumber.text().rightJustify(6, '0')

I get an error message saying the argument 2 of the rightJustify call is an
invalid type. I have looked at the examples in Riverbank's PyQt Classes
writeup for that call and it appears that I should be able to call the
method in the way I am doing.

Apparently the rightJustify() method needs some other type of fill character
than what I'm trying to provide.

Please help with this (very small) problem.

View this message in context: http://old.nabble.com/Newbie-Use-of-QString.rightJustify%286%2C-%270%27%29-tp26635750p26635750.html
Sent from the PyQt mailing list archive at Nabble.com.

More information about the PyQt mailing list