[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] adding in a QTextEdit widget as the central widget makes main window not pop up, and show
From:       Brian Merchant <bhmerchant () gmail ! com>
Date:       2015-12-13 22:40:29
Message-ID: CAMt_P4nOpwNRNSTKCx_H-J6nPDMBnY9dsnyyjhJpomgtKLOm4g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Damon,

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.

On Sat, Dec 12, 2015 at 11:12 PM, Damon Lynch <damonlynch@gmail.com> wrote:

> 
> On Sun, Dec 13, 2015 at 9:16 AM, Brian Merchant <bhmerchant@gmail.com>
> wrote:
> 
> > Hi all,
> > 
> > I have some skeleton code as shown here:
> > https://gist.github.com/bmer/e4760c49d1a9c7396c33
> > 
> > If run this code as is (python qt_problem.py), then everything works
> > okay. However, if I un-comment the lines that add a QTextEdit widget, in
> > initUI, I get the following warnings appearing:
> > 
> > (python:1949): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion \
> > 'GTK_IS_WIDGET (widget)' failedQWidget::setMinimumSize: (/Editor) The largest \
> > allowed size is (16777215,16777215) 
> > The window that would otherwise pop-up doesn't, but I can still close up
> > the application. Instead, if in main I have main.showMaximized() rather
> > than main.show(), I cause my computer to crash. This does not happen if
> > I don't have a QTextEdit widget set as the central widget, since
> > otherwise, a normal, maximized window appears.
> > 
> 
> 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.
> 
> On a different note, you may find the last section here to be of interest:
> http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html
> --
> http://www.damonlynch.net
> 


[Attachment #5 (text/html)]

<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">&lt;<a href="mailto:damonlynch@gmail.com" \
target="_blank">damonlynch@gmail.com</a>&gt;</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">&lt;<a href="mailto:bhmerchant@gmail.com" \
target="_blank">bhmerchant@gmail.com</a>&gt;</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>&#39;GTK_IS_WIDGET (widget)&#39;</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&#39;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&#39;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>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic