Hello, i have started developing in QT a few months ago since my project is based on it. I have problem regarding QPushButton. I want to set title of my button in vertical manner rather than default horizontally. Please help me.
"First":http://developer.qt.nokia.com/forums/viewthread/9502 link and "second":http://www.qtcentre.org/wiki/index.php?title=OrientationButton link.
As stated above, you have to derive from QPushButton and make your own class with re-implemented paintEvent() fitted to your needs.
The normal QPushButton does not support that. There are ways around that though:
use libQxt. It has a class QxtPushButton that can do what you want
subclass QPushButton and reimplement the paint event so you can render the text yourself
Put the rotated text on an image, and set the image on the push button.
thanks d2uriel and Andre for your suggestions. i think that second option given by both Andre and d2uriel is the answer to my case because i don't want to rely on the third party::"QxtGUI".