Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.3
-
None
-
-
0e62c4db50 (pyside/pyside-setup/dev) 963121d36c (pyside/pyside-setup/6.3) 963121d36c (pyside/tqtc-pyside-setup/6.3) 0e62c4db50 (pyside/tqtc-pyside-setup/dev) e794e7c35e (pyside/tqtc-pyside-setup/5.15) d263e1833e (pyside/tqtc-pyside-setup/6.2)
Description
I cannot read QTextLayout from a QTextEdit. The following code return:
"RuntimeError: Internal C++ object (PySide6.QtGui.QTextLayout) already deleted.
[Finished in 151ms with exit code 1]"
import sys from PySide6.QtWidgets import * from PySide6.QtCore import * from PySide6.QtGui import * app = QApplication(sys.argv) edit = QTextEdit() edit.setText("sacha") edit.show() layout = edit.document().find(QRegularExpression("sacha")).block().layout() print(layout.boundingRect()) app.exec()
Attachments
For Gerrit Dashboard: PYSIDE-1939 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
412524,2 | shiboken6: Indicate ownership transferences by return value heuristics | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412525,2 | Fix a crash in QTextBlock.layout() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412596,2 | Fix a crash in QTextBlock.layout() | 6.3 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412597,2 | shiboken6: Indicate ownership transferences by return value heuristics | 6.3 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412598,2 | Fix a crash in QTextBlock.layout() | tqtc/lts-6.2 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
412599,3 | Fix a crash in QTextBlock.layout() | tqtc/lts-5.15 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
412600,2 | shiboken6: Indicate ownership transferences by return value heuristics | tqtc/lts-6.2 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
412635,4 | shiboken6: Indicate ownership transferences by constructor heuristics | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412717,12 | shiboken6: Introduce an attribute for parent ownership heuristics | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412881,2 | shiboken6: Indicate ownership transferences by constructor heuristics | 6.3 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
412884,1 | shiboken6: Indicate ownership transferences by constructor heuristics | tqtc/lts-6.2 | pyside/tqtc-pyside-setup | Status: ABANDONED | 0 | 0 |