[PyKDE] Progress of QTextEdit in PyQt4

Andreas Pakulat apaku at gmx.de
Sun Dec 25 18:39:03 GMT 2005


Hi,

what's the current status of the QTextEdit support in PyQt4?

I found that copying and pasting in a Plain text QTextEdit changes from
bold-italic Font to italic Font for the inserted text. The same for cut
and drag and drop.

The second more serious thing is, that it seems QTextEdit's support for
Rich Text is not done? I get a segfault when trying to use a
QTextTableFormat with it:

textedit = QtGui.QTextEdit()
cursor = self.textedit.textCursor()
tableFormat = QtGui.QTextTableFormat()
tableFormat.setBorder(1)
tableFormat.setCellPadding(16)
tableFormat.setAlignment(QtCore.Qt.AlignRight)
cursor.insertTable(1, 1, tableFormat)

This is from the dockwidgets example. The backtrace from gdb is at the
end of this mail. Sorry for the lengthy output.

This is with PyQt4 snapshot 20051222, I'm building PyQt4 snapshot
20051224 right now (though from the Changelog I doubt it will change
anything).

Andreas

#0  0xb6f468ae in QTextFrame::firstPosition ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#1  0xb6f6a3c9 in QTextDocumentLayout::positionInlineObject ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#2  0xb6f6a549 in QTextDocumentLayout::positionInlineObject ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#3  0xb6f6a5d9 in QTextDocumentLayout::doLayout ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#4  0xb6f6a6f4 in QTextDocumentLayout::doLayout ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#5  0xb6f6a917 in QTextDocumentLayout::blockBoundingRect ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#6  0xb6f6b56b in QTextDocumentLayout::documentChanged ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#7  0xb6f4ab0b in QTextDocument::setPageSize ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#8  0xb7071c0b in QTextEdit::setTextColor ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#9  0xb70720d9 in QTextEdit::resizeEvent ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#10 0xb73456ea in initQtGui ()
   from /home/andreas/pyqt/lib/python2.3/site-packages/PyQt4/QtGui.so
#11 0xb6e22806 in QWidget::event () from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#12 0xb70180b0 in QFrame::event () from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#13 0xb708dd3a in QAbstractScrollArea::viewportEvent ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#14 0xb734643a in initQtGui ()
   from /home/andreas/pyqt/lib/python2.3/site-packages/PyQt4/QtGui.so
#15 0xb708ca68 in QAbstractScrollArea::horizontalScrollBar ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#16 0xb6de050e in QApplicationPrivate::notify_helper ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#17 0xb6de14fa in QApplication::notify ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#18 0xb75194cc in initQtGui ()
   from /home/andreas/pyqt/lib/python2.3/site-packages/PyQt4/QtGui.so
#19 0xb6e205f0 in QWidgetPrivate::show_helper ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#20 0xb6e211dc in QWidget::setVisible () from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#21 0xb6e209c1 in QWidgetPrivate::showChildren ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#22 0xb6e20621 in QWidgetPrivate::show_helper ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#23 0xb6e211dc in QWidget::setVisible () from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#24 0xb7346561 in initQtGui ()
   from /home/andreas/pyqt/lib/python2.3/site-packages/PyQt4/QtGui.so
#25 0xb6e209c1 in QWidgetPrivate::showChildren ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#26 0xb6e20621 in QWidgetPrivate::show_helper ()
   from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#27 0xb6e211dc in QWidget::setVisible () from /home/andreas/qt4.1.0/lib/libQtGui.so.4
#28 0xb7436581 in initQtGui ()
   from /home/andreas/pyqt/lib/python2.3/site-packages/PyQt4/QtGui.so
#29 0xb7561962 in initQtGui ()
   from /home/andreas/pyqt/lib/python2.3/site-packages/PyQt4/QtGui.so
#30 0x08118677 in PyCFunction_Call (func=0xb7b09344, arg=0xb7db5034, kw=0x0)
    at Objects/methodobject.c:73
#31 0x080cb5ad in call_function (pp_stack=0xbf89d7d8, oparg=0) at Python/ceval.c:3445
#32 0x080c742e in eval_frame (f=0x816dd9c) at Python/ceval.c:2122
#33 0x080c97bd in PyEval_EvalCodeEx (co=0xb7d94ce0, globals=0xb7dd4df4,
    locals=0xb7dd4df4, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
    defcount=0, closure=0x0) at Python/ceval.c:2669
#34 0x080c0150 in PyEval_EvalCode (co=0xb7d94ce0, globals=0xb7dd4df4,
    locals=0xb7dd4df4) at Python/ceval.c:537
#35 0x080f1014 in run_node (n=0xb7dcb348, filename=0xbf89f6f3 "dockwidgets.py",
    globals=0xb7dd4df4, locals=0xb7dd4df4, flags=0xbf89db20)
    at Python/pythonrun.c:1267
#36 0x080f0fbe in run_err_node (n=0xb7dcb348, filename=0xbf89f6f3 "dockwidgets.py",
    globals=0xb7dd4df4, locals=0xb7dd4df4, flags=0xbf89db20)

-- 
Be different: conform.




More information about the PyQt mailing list