Q:

PyQt4 pass transformation matrix as argument to constructor

I am writing a widget for PyQt4 and the project style guide dictates that I pass static properties of Qt elements through kwargs in the constructor.
Unfortunately, I am having trouble finding the correct kwarg name for the property I want to pass.
My current implementation looks like this:
self.scene = QtGui.QGraphicsScene(self)
self.view = QtGui.QGraphicsView(self.scene, self.mainArea)

# Flip y axis for sane drawing
matrix = QtGui.QMatrix()
matrix.scale(1, -1)
self.view.setMatrix(matrix)

I want to find a way to pass the matrix through the QGraphicsView constructor, if that's even possible.
I have tried the following
self.view = QtGui.QGraphicsView(self.scene, self.mainArea, matrix=matrix)
self.view = QtGui.QGraphicsView(self.scene, self.mainArea, transform=matrix)

but both of these instances tell me that they are unknown keyword arguments. I am not sure if this is even possible through the constructor, but I haven't been able to find a definitive answer anywhere.
I am also fuzzy on what the "static properties" of Qt elements are exactly.

A:

Are you sure you've understood the style guide properly? I doubt that it expects you to set every possible property of every conceivable class using kwargs. The QGraphicsView class has eighty properties. Do you think it's plausible that Qt would define constructors with eighty optional arguments?
I think it's more likely that the guide is simply asking you to use kwargs wherever they are available. Otherwise, you should just use the property setter functions.
PS:
The matrix of a QGraphicsView is not a property anyway, so for your specific example, the point is moot.

