[PyQt] adding in a QTextEdit widget as the central widget makes main window not pop up, and showMaximize causes computer crash?

Brian Merchant bhmerchant at gmail.com
Sun Dec 13 22:40:29 GMT 2015


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 at gmail.com> wrote:

>
> On Sun, Dec 13, 2015 at 9:16 AM, Brian Merchant <bhmerchant at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20151213/b88cbb6e/attachment.html>


More information about the PyQt mailing list