[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Segfault when setting QDialogButtonBox buttons from focus-lost signal
From: Valentin Valls <valentin.valls () esrf ! fr>
Date: 2019-02-22 9:48:31
Message-ID: 395d1801-bcb4-d643-dba2-80e4dec3b3c0 () esrf ! fr
[Download RAW message or body]
Hi,
I fall down into a segfault caused by the use of QDialogButtonBox.
Clicking on a button from the box that is at the same time removed by a
focus signal created a segfault.
I used PyQt 5.11.3 and Python 3.5.
That's maybe a Qt issue, and maybe nothing can be done in PyQt. But i
case it can help, here is the sample to reproduce the issue.
- Set the focus to the line edit
- Click on the Abort button
Regards,
===========================
from PyQt5 import Qt
app = Qt.QApplication([])
dialog = Qt.QDialog()
layout = Qt.QVBoxLayout(dialog)
line = Qt.QLineEdit(dialog)
box = Qt.QDialogButtonBox(dialog)
box.setStandardButtons(Qt.QDialogButtonBox.Abort)
layout.addWidget(line)
layout.addWidget(box)
def update_box():
box.setStandardButtons(Qt.QDialogButtonBox.Ok)
line.editingFinished.connect(update_box)
dialog.exec_()
["valentin_valls.vcf" (text/x-vcard)]
[Attachment #4 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic