PDA

View Full Version : Rotate QLabel



shader76
20th April 2006, 12:12
Hi Folks,

i want to show several IP-Adresses in a GUI. I use QLabels for this.
Some of them should be rotated 90°, how can I achieve this, didn´t found somethin like label-rotate(90);

Is there a chance to do this ?

Kind regards
-shader76-


_____________________________
-Visual Studio.Net 2003 & QT4.1

jpn
20th April 2006, 12:49
Reimplement QLabel::paintEvent and use QPainter::rotate().

shader76
20th April 2006, 12:58
aintEvent ? DO you have an example for this ?

I´m still a noobie :confused:

SkripT
20th April 2006, 16:56
You could insert '\n' char between every number in the IP address too...

jayw710
20th April 2006, 22:42
Reimplement QLabel::paintEvent and use QPainter::rotate().


shader76:

the smiley was placed in there by the message window which converted
: p
into a smiley. It just means "QLabel:: paintEvent".

To get it to display properly, I added a space between the ":" and the "p" which should not be there in code. If I didn't add that space, all you'd see is another smiley!

Best,
Jay

jacek
21st April 2006, 00:17
To get it to display properly, I added a space between the ":" and the "p" which should not be there in code. If I didn't add that space, all you'd see is another smiley!
There should be a "Disable smilies in text" checkbox in "Additiona Options" below the editor.

sabeesh
24th December 2007, 07:23
Hi,
I didn't get any answer for this thread. Please help

jpn
24th December 2007, 10:20
Try QxtLabel (http://www.libqxt.org/static/docs/classQxtLabel.html)

high_flyer
24th December 2007, 11:06
off topic:
hey jpn, cool lib!! :cool:
I didn't know about it until now!
You should put it in your signature or something ;)
If I only knew about it before... (QxtSpanSlider comes to mind for example)

Great work, once I have some time, I'll try and contribute too.

jpn
24th December 2007, 12:31
Thanks ;)

PS. Contributions are very welcome. The best way to get in touch with us is to visit #qxt on freenode (the channel might be somewhat dead during xmas time, though..)