Now I'm port a WPF(Windows Presentation Foundation) program to Qt because the WPF program's performance is bad. during the port process, I find WPF support many feature directly(in a simple mode), but Qt haven't, So I have some questions. they are as follow:

1) How to rotate the control(derived from QWidget)? and How to rotate it by the specified point(such as its center)? WPF is very easy to do it. I know QPainter has a rotate() function, using the method, I need subclass the rotate target from the corresponding control class(such as QPushButton). Can you tell me if there are a better method to implement the feature?

2) WPF alignment have four flags: Left, Center, Right and Stretch. I want to know how to implement the the stretch alignment in the Qt?

3) WPF stretch flags have: None, Uniform, UniformToFill, Fill. such as stretch a image in a control as follow:
The Stretch property controls how an image is stretched to fill its container. The Stretch property accepts the following values, defined by the Stretch enumeration:

None: The image is not stretched to fill the output area. If the image is larger than the output area, the image is drawn to the output area, clipping what does not fit.

Fill: The image is scaled to fit the output area. Because the image height and width are scaled independently, the original aspect ratio of the image might not be preserved. That is, the image might be warped in order to completely fill the output container.

Uniform: The image is scaled so that it fits completely within the output area. The image's aspect ratio is preserved.

UniformToFill: The image is scaled so that it completely fills the output area while preserving the image's original aspect ratio.
You can view the effect in the http://msdn.microsoft.com/en-us/library/ms748873.aspx.
Can you tell me how to implement the stretch feature in Qt?

4) WPF support some Layout, such as Grid, it is also a control. so it can set the its width and height. I know Qt also have the layout QGridLayout, but I find it isn't derived from QWidget. Can you tell me if I can set the QGridLayout's width or height? If can, which function can set it? thanks.