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:
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.
Oh.  Interesting.  All the same, adding in creation of a QApplication explicitly seemed to make a difference, in that the test finished with it, and didn't finish without it ...

> 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.
Good idea.  I'll give that a try ...

Thanks again!

/John

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
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.