Results 1 to 12 of 12

Thread: vertical pushbutton text

  1. #1
    Join Date
    Nov 2007
    Posts
    57
    Thanks
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default vertical pushbutton text

    Could someone tell me how to make QPushButton text vertical? What function, what syntax? Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: vertical pushbutton text

    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    eric (29th January 2008)

  4. #3
    Join Date
    Nov 2007
    Posts
    57
    Thanks
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: vertical pushbutton text

    Thanks, this is a good way of rotating text. However, I need letters on the pushbutton to be rightside up and underneath each other, like so:

    H
    I

    J
    P
    N
    !

  5. #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: vertical pushbutton text

    Isn't it the same issue as with the label?

  6. The following user says thank you to wysota for this useful post:

    eric (30th January 2008)

  7. #5
    Join Date
    Nov 2007
    Posts
    57
    Thanks
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: vertical pushbutton text

    The best that I understand the documentation, it allows me to rotate text (put text on its side) but not put letters one under the other rightside up. Do you know if the latter is also possible?

  8. #6
    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: vertical pushbutton text

    Search the forum, there is a recent thread about drawing vertical text in a label. Some solutions are suggested there.

  9. #7
    Join Date
    Sep 2007
    Posts
    18
    Thanks
    3

    Default Re: vertical pushbutton text

    eric, I guess you haven't looked at this yet

    http://wiki.qtcentre.org/index.php?t...entationButton

    -Dyams

  10. #8
    Join Date
    Nov 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: vertical pushbutton text

    Quote Originally Posted by dyams View Post
    eric, I guess you haven't looked at this yet

    http://wiki.qtcentre.org/index.php?t...entationButton

    -Dyams

    this example is not working anymore the vertical buttons are too wide.

  11. #9
    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: vertical pushbutton text

    Too wide for what?
    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.


  12. #10
    Join Date
    Nov 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: vertical pushbutton text

    The width of vertical button is much more than required, you can try this example.Its outdated.

  13. #11
    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: vertical pushbutton text

    Comment out the implementation of minimumSizeHint().
    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.


  14. #12
    Join Date
    Dec 2016
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: vertical pushbutton text

    Is there a more recent solution in Qt5 for rotated QPushButton?

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 10:49
  2. Vertical text in a QTextDocument
    By Angelo Moriconi in forum Qt Programming
    Replies: 6
    Last Post: 7th February 2008, 06:30
  3. Vertical Orientation of Text.
    By ashukla in forum Qt Programming
    Replies: 9
    Last Post: 28th January 2008, 13:40
  4. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 13:05
  5. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 16:30

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.