<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 13/12/2015 08:12, Damon Lynch a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAFdFio8PvvT6gLJy5FJhM_mRNTfcWrkOJqXwjEO-Jg5rLnj0Gg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Sun, Dec 13, 2015 at 9:16 AM,
            Brian Merchant <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:bhmerchant@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bhmerchant@gmail.com">bhmerchant@gmail.com</a></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
                  moz-do-not-send="true"
                  href="https://gist.github.com/bmer/e4760c49d1a9c7396c33"
                  target="_blank"><a class="moz-txt-link-freetext" href="https://gist.github.com/bmer/e4760c49d1a9c7396c33">https://gist.github.com/bmer/e4760c49d1a9c7396c33</a></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>)

</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>
        <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
            moz-do-not-send="true"
            href="http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html"><a class="moz-txt-link-freetext" href="http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html">http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html</a></a><br>
        </div>
        <div class="gmail_extra">-- <br>
          <div class="gmail_signature"><a moz-do-not-send="true"
              href="http://www.damonlynch.net" target="_blank">http://www.damonlynch.net</a></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
PyQt mailing list    <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
    </blockquote>
    <br>
    This is an old bug, I think.<br>
    <br>
    With Qt vers. 5.0.2  and PyQt5 vers. 5.0 (default on Ubuntu 12.04)
    you have to fix the size of the main window in your code before
    show() it.<br>
    <br>
    Vincent<br>
  </body>
</html>