[PyQt] QTreeView + sort + delete = crash

John F Sturtz john at sturtz.org
Sun May 5 04:08:33 BST 2019


On 5/3/2019 1:36:04 AM, Florian Bruhin <me at the-compiler.org> wrote:
You might want to try running pytest-qt's item model tester over your model:
https://pytest-qt.readthedocs.io/en/latest/modeltester.html

So, I think I wrapped my mind around pytest and pytest-qt enough to use the model tester coherently.

If I mock up a file with the simple model shown on the Model Tester documentation site (https://pytest-qt.readthedocs.io/en/latest/modeltester.html) and run pytest on it, I get the output I expect -- it indicates that the test has run and passed (attached file img1.png).

But the model tester seems to crash on the model I posted previously.  The test starts to run but never finishes, and doesn't generate any messages (attached file img2.png).

I must have really done something egregiously wrong.  :-/

The modified cat.py is attached (I cleaned it up a bit to make it a little easier to add the tester function).

/John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190504/e5eaf65d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: img1.png
Type: image/png
Size: 21618 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190504/e5eaf65d/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: img2.png
Type: image/png
Size: 20533 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190504/e5eaf65d/attachment-0003.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cat.py
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190504/e5eaf65d/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlg.ui
Type: text/xml
Size: 4323 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190504/e5eaf65d/attachment-0001.xml>


More information about the PyQt mailing list