[PyQt] Translating a line from a C++ source

David Boddie dboddie at trolltech.com
Tue Oct 30 13:25:31 GMT 2007


On Tue Oct 30 09:51:19 GMT 2007, kib2 wrote:

> Sorry, but I can't find an easy way to translate this line of Qt4/C++
> code to PyQt4 :
>
> qDebug()<<"void MyTextEdit::paintEvent(QPaintEvent* event) from position: "
>         << startPosition.block().position() << " to "
>         << endPosition.block().position() + endPosition.block().length();

Over multiple lines:

  print "void MyTextEdit::paintEvent(QPaintEvent* event) from position:",
  print startPosition.block().position(), "to",
  print endPosition.block().position() + endPosition.block().length()

Hope this helps,

David
-- 
David Boddie
Lead Technical Writer, Trolltech ASA


More information about the PyQt mailing list