Fixed error with QSizePolicy

Changed QtGui.QSizePolicy to QtWidgets.SizePolicy as the namepace has changed from Qt4 to Qt5
Merge pull request #3322 from MrLeeh/patch-1

Fixed error with QSizePolicy