<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: Candara;color: #000000"><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px"><p style="color: #AAAAAA; margin-top: 10px;">On 5/6/2019 2:00:15 AM, Florian Bruhin <me@the-compiler.org> wrote:</p><div style="font-family:Arial,Helvetica,sans-serif">Hey,
<br>
<br>On Sun, May 05, 2019 at 08:52:13PM -0500, John F Sturtz wrote:
<br>> I suspect the reason that the version I posted crashed was because I tried to
<br>> instantiate the dialog widget (Dlg) from the tester function. The tester
<br>> function doesn't create a QApplication, so it was foolish of me to think it
<br>> could create a widget there.
<br>
<br>That should actually work, since pytest-qt creates a QApplication internally.
</div></blockquote><div><span style="font-size: 12pt;color: rgb(0, 0, 0)"><span style="color: rgb(59, 89, 152);">Oh. Interesting. All the same, adding in creation of a <span style="font-family: Courier New">QApplication</span> explicitly seemed to make a difference, in that the test finished with it, and didn't finish without it ...</span><br></span></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px"><div style="font-family:Arial,Helvetica,sans-serif">> So, there doesn't seem to be anything obvious wrong with the model, at least
<br>> not as far as the pytest-qt item model tester is concerned. Which means I'm
<br>> not much closer to knowing why the original code I posted crashes than I was
<br>> before. :-/
<br>
<br>Note the model tester continues to observe your model while you interact with
<br>it.
<br>
<br>You might want to either find an automated way to reproduce the bug you've
<br>seen, or add a qtbot argument, add "qtbot.add_widget(dlg)" at the beginning,
<br>and "qtbot.stop()" after setting up the model tester.
<br>
<br>That should allow you to interact with the widget manually while the model
<br>checker continues to run.
</div></blockquote><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><b><span style="color: #3B5998"></span></b><span style="color: #3B5998">Good idea. I'll give that a try ...</span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998"><br></span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998">Thanks again!</span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998"><br></span></span></div><div><span style="font-size: 12pt;font-family: Candara;color: #000000"><span style="color: #3B5998">/John</span></span></div></div>