Qt-interest Archive, April 2007
displaying a qpushbutton's text in vertical direction
Message 1 in thread
HI,
how to enable a qpushbutton's text to display in vertical direction? just
like this :
x
z
e
r
o
has anyone once did this ?
regrds
fengli
Message 2 in thread
> how to enable a qpushbutton's text to display in vertical direction? just
> like this :
> x
> z
> e
> r
> o
Hi
You can simply insert corresponding line breaks:
button->setText("x\nz\ne\nr\no");
If you mean _rotated_ text, you will have to reimplement paintEvent(),
rotate and translate the painter and use
QStyle::drawControl(QStyle::CE_PushButton) to draw the button.
--
[ signature omitted ]