If I execute the following code, I get the message:
QTextCursor::setPosition: Position '5' out of range
This is just a small example to reproduce the error message. Does any one now how to avoid this or why it happen?
from PyQt5 import QtWidgets
import sys
class programm(QtWidgets.QMainWindow):
def __init__(self):
QtWidgets.QMainWindow.__init__(self)
def message(self):
dialog = QtWidgets.QMessageBox(self)
dialog.setText('Test')
dialog.setDetailedText('Test')
dialog.setVisible(True)
app = QtWidgets.QApplication(sys.argv)
prog = programm()
prog.show()
prog.message()
sys.exit(app.exec_())