Vertical text (Was: Re: kmix maintanence - please direct bugreports to me)

Joseph Wenninger jowenn at kde.org
Thu Apr 24 12:23:02 BST 2003


Hi

That piece of code is not that good. I used something like that for a
long time in konquerors sidebar. You lose anti aliasing. You have to
draw the text into a pixmap without rotation and than draw that pixmap
rotated onto the screen.

Kind regards
Joseph Wenninger

> 
> VerticalText::VerticalText(QWidget * parent, const char * name, WFlags f) : 
> QWidget(parent,name,f)
> {
>         resize(20,100 /*parent->height() */ );
>         setFixedSize(20,100);
> }
> 
> VerticalText::~VerticalText() {
> }
> 
> void VerticalText::paintEvent ( QPaintEvent * /*event*/ ) {
>         QPainter paint(this);
>         paint.rotate(270);
>         paint.drawText(-height()+2,width(),name());
> }
> 
> Chris
> 
> 







More information about the kde-core-devel mailing list