PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1077 - Application exit crash when call QSyntaxHighlighter.document()
: Application exit crash when call QSyntaxHighlighter.document()
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: 1.0.7
: PC All
: P2 normal
Assigned To: Paulo Alcantara
:
:
:
  Show dependency treegraph
 
Reported: 2011-12-02 10:55 EET by kuai.xiaopeng
Modified: 2012-01-02 21:44 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kuai.xiaopeng 2011-12-02 10:55:23 EET
example code:
# -*- coding: utf-8 -*-
import sys
from PySide import QtCore, QtGui
import time

class Highlighter(QtGui.QSyntaxHighlighter):

    def __init__(self, parent, mode):
        QtGui.QSyntaxHighlighter.__init__(self, parent)
        self.tstamp=time.time()

    def highlightBlock(self, text):
        text=self.document()


if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    python = QtGui.QTextEdit()
    python.setWindowTitle('python')
    hl=Highlighter(python.document(),"python")
    python.show()
    app.exec_()

when add 'text=self.document()' ,the application exit crash,if use other code
instead of them ,exit the application Ok.
Comment 1 Paulo Alcantara 2011-12-06 16:22:59 EET
Thanks for the report!

Fixed on PySide commit e1a897dc0fe9c67e6932cbddb178990190ce848b.