Results 1 to 8 of 8

Thread: QLineEdit text orientation

  1. #1
    Join Date
    Aug 2009
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default QLineEdit text orientation

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QLineEdit text orientation

    You can't. You have to implement a new widget for it. Alternatively you can place a rotated QLineEdit in graphics view.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2009
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QLineEdit text orientation

    Is there another widget in Qt that can display text and accepts text orientation change?
    (QLabel or QEdit... something like that)

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QLineEdit text orientation

    No, but you can subclass an existing widget and implement it yourself, it's very easy.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Aug 2009
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QLineEdit text orientation

    10x for the answers.

    can you give me some more hints

  6. #6
    Join Date
    Sep 2009
    Posts
    20
    Thanked 2 Times in 2 Posts

    Default Re: QLineEdit text orientation

    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.

  7. #7
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QLineEdit text orientation

    Quote Originally Posted by lasher View Post
    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
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QLineEdit text orientation

    Quote Originally Posted by lasher View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Grey text in empty QLineEdit
    By Mefisto in forum Qt Programming
    Replies: 4
    Last Post: 3rd October 2017, 12:35
  2. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 10:49
  3. QLineEdit and background text
    By SnarlCat in forum Qt Programming
    Replies: 2
    Last Post: 6th March 2009, 23:17
  4. QLineEdit text() crash - Qt3
    By user_mail07 in forum Qt Programming
    Replies: 7
    Last Post: 10th June 2008, 10:42
  5. Pointer Question related to QLineEdit
    By ChrisReath in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2008, 16:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.