PDA

View Full Version : QLineEdit text orientation



emrares
14th September 2009, 09:13
How can i change the text orientation in a QLineEdit so that the text it will be displayed like in this picture (SIDEWAYS).

http://www.annemade-jewelry.com/text_orientation2.jpg

wysota
14th September 2009, 09:37
You can't. You have to implement a new widget for it. Alternatively you can place a rotated QLineEdit in graphics view.

emrares
14th September 2009, 10:14
Is there another widget in Qt that can display text and accepts text orientation change?
(QLabel or QEdit... something like that)

wysota
14th September 2009, 11:01
No, but you can subclass an existing widget and implement it yourself, it's very easy.

emrares
14th September 2009, 11:02
10x for the answers.

can you give me some more hints :)

lasher
14th September 2009, 19:07
Dear Wysota,

As I saw you wrote many good answers on this forum, maybe you can prepare
some tutorials - answers for most frequently asked questions, for example
how to subclass QLineEdit and make possible to change text orientation.
I know that probably you have no time but this will decrease basic questions on
this forum so you answers also.

Greetings.

faldzip
14th September 2009, 19:43
Dear Wysota,

As I saw you wrote many good answers on this forum, maybe you can prepare
some tutorials - answers for most frequently asked questions, for example
how to subclass QLineEdit and make possible to change text orientation.
I know that probably you have no time but this will decrease basic questions on
this forum so you answers also.

Greetings.
take a look at QtCentre's Wiki sites. There already are some tutorials, for example: vertically oriented QPushButton

wysota
15th September 2009, 07:25
As I saw you wrote many good answers on this forum, maybe you can prepare
some tutorials - answers for most frequently asked questions, for example
how to subclass QLineEdit and make possible to change text orientation.
Maybe you should prepare such a tutorial?


I know that probably you have no time but this will decrease basic questions on
this forum so you answers also.

It wouldn't decrease the number of basic questions here, trust me :) But that's true that it would be easier to answer such questions just by providing a link to the wiki. Unfortunately I don't have time to do everything myself. You have a vertical pushbutton example in the wiki, as pointed out by Filip - it has to suffice.