Regarding QPushButton
-
wrote on 23 Feb 2012, 06:32 last edited by
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.
-
wrote on 23 Feb 2012, 06:54 last edited by
"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.
-
wrote on 23 Feb 2012, 06:57 last edited by
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.
-
wrote on 23 Feb 2012, 09:44 last edited by
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".
4/4