Re: QTreeView + sort + delete = crash
"John F Sturtz" <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <[email protected]> |
On 5/6/2019 2:00:15 AM, Florian Bruhin <[email protected]> wrote: Note the model tester continues to observe your model while you interact with it. You might want to either find an automated way to reproduce the bug you've seen, or add a qtbot argument, add "qtbot.add_widget(dlg)" at the beginning, and "qtbot.stop()" after setting up the model tester. That should allow you to interact with the widget manually while the model checker continues to run. I wasn't exactly sure what order things should go in. In particular, should I show the dialog before qtbot.add_widget() and qtmodeltester.check(), or after? I tried both of these: def test_model(qtbot, qtmodeltester): app = QtWidgets.QApplication(sys.argv) app.setStyle('Fusion') dlg = Dlg() qtbot.add_widget(dlg) qtmodeltester.check(dlg.model) dlg.show() qtbot.stopForInteraction() ---- def test_model(qtbot, qtmodeltester): app = QtWidgets.QApplication(sys.argv) app.setStyle('Fusion') dlg = Dlg() dlg.show() qtbot.add_widget(dlg) qtmodeltester.check(dlg.model) qtbot.stopForInteraction() In neither case, in the course of interacting with the widget or the listview, did the model checker report anything, right up to and including the point at which the interaction makes the app crash. Perhaps now I can conclude the problem (probably) isn't in the model design? /John _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt