Re: QTreeView + sort + delete = crash

Florian Bruhin <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
Hey,

On Sun, May 05, 2019 at 08:52:13PM -0500, John F Sturtz wrote:
> I suspect the reason that the version I posted crashed was because I tried to
> instantiate the dialog widget (Dlg) from the tester function.  The tester
> function doesn't create a QApplication, so it was foolish of me to think it
> could create a widget there.

That should actually work, since pytest-qt creates a QApplication internally.

> So, there doesn't seem to be anything obvious wrong with the model, at least
> not as far as the pytest-qt item model tester is concerned.  Which means I'm
> not much closer to knowing why the original code I posted crashes than I was
> before.  :-/

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.

Florian

-- 
https://www.qutebrowser.org | [email protected] (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE4E5WAAJAG47w528KkW6wyP1VoHIFAlzP23MACgkQkW6wyP1V
oHLgCxAAmEVga6g4fn3RVDNZv2veSCPykaKezmvzZT7deF2R/bdFXHWorm+x2hZk
WiAnUKBFJpAMGD8ep0ZLQUW3eFeKHP4ADoWZsPfUPA1xQtel1RqzoEsndr03tDju
5YvhQll1bAbh7KAHN77E9yV0PIka08xJ2bLu3NluookVH6a4rAXNKDSOZj5hCa5l
AcpLD7lFjRlBzAIyMLFUSDsnnhhpPL9HY65QvKZt8NgbSgUxq2vAKa/nFY/Ll0OR
ylDJQNYUgkUcD4Oe7Ol4pxEzReYxUW18jwta4w1BB+WiQkmj+mD4J/98f9K6ZQ0K
4kVFCtrbPoQXus9ArQXY6NwP/+OfbolH2UCdzWClihlm7YIYuKaX0PA9RIEm58ct
SuqofSp2/ej+xxt97nyHPrvvbOav7y65h4VXXwbUuUgyeT+sXQznNC7TCcVb0mSZ
HQeUfjhO7W6PTy5L81eyMhyOiRu3IWtoo3pLWDoXJM/CWuNsB35fxNV6heN3knY8
Kg900E/Nybt2yqAfiJlVa9OembBO3xiNzxzWrmMxB0h/tD5w2BD43KFTjdRGCgIy
k3PSRIoWnJ3xMRmxy27jNiDuyEntbO68yN/K74N2nOyJOe6MbARi4+RyGug5e9Dz
tkDfEfxXKogetKccHvlL/TtuOHh+AxgUr2L5I1v68/Zt9+fyJ+I=
=NU7a
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.