Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've upgraded to Ubuntu 11.10 and I have a strange problem.

PyQt apps, like ReText and the one below, cause window manager to go crazy.

Metacity crashes, Compiz hangs, GNOME Shell / Mutter displays a window with parts of my wallpaper inside.

Example script that causes the problem (which draws a window with QTextEdit and QToolBar):

import sys
from PyQt4.QtCore import Qt
from PyQt4.QtGui import *

app = QApplication(sys.argv)
window = QMainWindow()
editBox = QTextEdit(window)
toolBar = QToolBar(window)
window.addToolBar(Qt.TopToolBarArea, toolBar)

I get these warnings in the output:

(python:3489): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion `GTK_IS_WIDGET (widget)' failed


QWidget::setMinimumSize: (/QMainWindow) The largest allowed size is (16777215,16777215)

What can cause this problem?

share|improve this question
Ubuntu 11.10 is a beta release so this is most likely a bug. Please run ubuntu-bug python-qt4 to report this. – dv3500ea Sep 11 '11 at 15:16
up vote 1 down vote accepted

See this bug report:

to run in the mean time install qt4-qtconfig and change away from the default of gtk+ gui styles.

share|improve this answer
Thank you a lot! – Dmitry Shachnev Sep 14 '11 at 5:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.