Q:

PyQt QtDesigner lost of the windows minimize buttons

My problem is only in Qtdesigner. 
I am using QtDesigner v4.8.4 to define my HMI for a pyqt project.  In this editor the window I have drown, has got a reduce and a close button in right up corner.  I am sorry I wanted to show it to you with screenshots but I don't have enough reputation. 
When I use it or previsualize it (with Ctrl + R), I lose the "minimize button" of the window and its functionnality. 
Do you have the same behavior? 
I have a useless ?  button instead and the close button.  How could I keep it to minimize my window ?  
Thanks a lot for any advice! 

A:

When I use it or previsualize it (with Ctrl + R), I lose the "minimize button" of the window and its functionnality.  

Answer : This is not bug, I just preview your widget only.  If your implement in pyqt can see all button for windows. 
 
Picture: Show previsualize of Qt4 Designer doesn't have "minimize button"

Picture: Show running of PyQt4 (It default have "minimize button")"

Can you please show an example of implementation of the minimize button of the up right corner because for my script

OK, Keyword is implement event in widget by this method QWidget.changeEvent (self, QEvent)
, Please see my example code, Hope is helps;
import sys
from PyQt4 import QtCore, QtGui, uic

(loadUserInterface, loadQWidget) = uic.loadUiType('QWelcomeWidget.ui')

class QWelcomeWidget (loadQWidget):
    def __init__ (self, parent = None):
        loadQWidget.__init__(self, parent)
        self.ui = loadUserInterface()
        self.ui.setupUi(self)

    def changeEvent (self, eventQEvent):
        if eventQEvent.type() == QtCore. QEvent. WindowStateChange:
            if self.windowState() & QtCore. Qt. WindowMinimized:
                print 'Window Minimized'
        QtGui. QWidget.changeEvent(self, eventQEvent)

if __name__ == '__main__':
    appQApplication = QtGui. QApplication(sys.argv)
    mainQWidget = QWelcomeWidget()
    mainQWidget.show()
    # Start Application
    sys.exit(appQApplication.exec_())

References : http://pyqt.sourceforge.net/Docs/PyQt4/qwidget.html#changeEvent

Regards,

