Why did you remove line 26, 30 and 32, and add this import. The pattern is to explicitly import the components you need from QtGui. When a file has a specific code style, you should continue with it and not follow your own.