<div dir="ltr"><div>Hi Damon,<br><br></div>Thanks for your reply -- I was having some sort of a gtk problem, because I had PyQt4, and PyQt5 installed side by side in my Anaconda Python distribution. Not a good idea! My lesson is that I should stick with PyQt4 if I am using Anaconda.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 12, 2015 at 11:12 PM, Damon Lynch <span dir="ltr"><<a href="mailto:damonlynch@gmail.com" target="_blank">damonlynch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 13, 2015 at 9:16 AM, Brian Merchant <span dir="ltr"><<a href="mailto:bhmerchant@gmail.com" target="_blank">bhmerchant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,<br><br></div>I have some skeleton code as shown here: <a href="https://gist.github.com/bmer/e4760c49d1a9c7396c33" target="_blank">https://gist.github.com/bmer/e4760c49d1a9c7396c33</a><br><br>If run this code as is (<code>python qt_problem.py</code>), then everything works okay. However, if I un-comment the lines that add a <code>QTextEdit</code> widget, in <code>initUI</code>, I get the following warnings appearing:<br><br><pre><code><span>(</span><span>python</span><span>:</span><span>1949</span><span>):</span><span> </span><span>Gtk</span><span>-</span><span>CRITICAL </span><span>**:</span><span> IA__gtk_widget_style_get</span><span>:</span><span> assertion </span><span>'GTK_IS_WIDGET (widget)'</span><span> failed
</span><span>QWidget</span><span>::</span><span>setMinimumSize</span><span>:</span><span> </span><span>(/</span><span>Editor</span><span>)</span><span> </span><span>The</span><span> largest allowed size </span><span>is</span><span> </span><span>(</span><span>16777215</span><span>,</span><span>16777215</span><span>)<br><br></span></code></pre><p>The window that would otherwise pop-up doesn't, but I can still close up the application. Instead, if in <code>main</code> I have <code>main.showMaximized()</code> rather than <code>main.show()</code>, I cause my computer to crash. This does not happen if I don't have a <code>QTextEdit</code> widget set as the central widget, since otherwise, a normal, maximized window appears.<br></p></div></blockquote></div><br clear="all"></div></span><div class="gmail_extra">It works for me using Python 3.4.3+ and PyQt 5.4.2.  There might be a problem in your broader environment, as evinced by the Gtk warning. <br><br></div><div class="gmail_extra">On a different note, you may find the last section here to be of interest: <a href="http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html" target="_blank">http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html</a><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">-- <br><div><a href="http://www.damonlynch.net" target="_blank">http://www.damonlynch.net</a><div></div><div></div><div></div></div>
</div></font></span></div>
</blockquote></div><br></div>