I am writing a .EXE to load a .DLL file which someone provided before, There is a PushButton in the .DLL,
i want to rotate the PushButton to 90 degree.How to do it?
By the way, i do not have original source code of the DLL
Thanks buddy.
I am writing a .EXE to load a .DLL file which someone provided before, There is a PushButton in the .DLL,
i want to rotate the PushButton to 90 degree.How to do it?
By the way, i do not have original source code of the DLL
Thanks buddy.
change the pushbutton coordinate as per your rotation.
Heavy Metal Rules. For those about to rock, we salute you.
HIT THANKS IF I HELPED.
I assume that somehow you can get a pointer to the QPushButton instance that you want to rotate, is that right? You either need to get that directly, or somehow search for it in the list of children of some widget that contains it.By the way, i do not have original source code of the DLL
More to the point - I don't know of any way that you can rotate a standard QPushButton. If you make a custom pushbutton class derived from QPushButton, you can set a QPainter transform in the paint event, but you have no way to do that on an already-created QPushButton in a DLL. Not only that, but if the button is embedded in a form or other composite widget controlled by a layout, the layout might prevent the resizing needed to show the button correctly after it has been rotated.
Changing the position or geometry will simply move the button around (if allowed by the layout); it won't rotate it.
Edit: There is one possible way that might work but you will have to test it: If you can embed the QWidget pointer to the button into a QGraphicsProxyWidget, you can use it in the Graphics/View environment and rotate it that way. But that's a hack.
Last edited by d_stranz; 13th July 2012 at 20:11.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks