[PyQt] adding in a QTextEdit widget as the central widget makes main window not pop up, and showMaximize causes computer crash?
Damon Lynch
damonlynch at gmail.com
Sun Dec 13 07:12:52 GMT 2015
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/e82d04c9/attachment.html>
More information about the PyQt
mailing list