Results 1 to 8 of 8

Thread: left alignment for pushbutton text

  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default left alignment for pushbutton text

    hi
    how to set left alignment for pushbutton's text property

    Thnks
    Bala

  2. #2
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: left alignment for pushbutton text

    hi,
    can i use HTML format text in pushbutton for left alignment?

  3. #3
    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: left alignment for pushbutton text

    Quote Originally Posted by BalaQT View Post
    hi,
    can i use HTML format text in pushbutton for left alignment?
    No. You can use QwwRichTextButton for that. Regular push buttons are always centered.
    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.


  4. #4
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: left alignment for pushbutton text

    Thnks wysota,
    i will try ur widget.

    What is the best way to align the text in PUSHBUTTON?
    Is it possible to set the text alignment in stylesheet for pushbutton?

    Thnks
    Bala

  5. #5
    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: left alignment for pushbutton text

    Quote Originally Posted by BalaQT View Post
    What is the best way to align the text in PUSHBUTTON?
    Implement your own button class.

    Is it possible to set the text alignment in stylesheet for pushbutton?
    I don't think so but feel free to try.
    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.


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

    BalaQT (19th September 2009)

  7. #6
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: left alignment for pushbutton text

    Thnks wysota
    Bala

  8. #7
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: left alignment for pushbutton text

    What's about this:

    Qt Code:
    1. button->setStyleSheet("Text-align:left");
    To copy to clipboard, switch view to plain text mode 

  9. The following user says thank you to bremer for this useful post:

    BalaQT (22nd September 2009)

  10. #8
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Thumbs up Re: left alignment for pushbutton text

    excellent bremer.

    its working

    Thankz for ur excellent support.

    Bala

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Window Title Text left alignment issue.
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 3rd March 2010, 14:46
  3. Replies: 2
    Last Post: 30th December 2008, 21:35
  4. Q3Table text alignment problem
    By batileon in forum Qt Programming
    Replies: 4
    Last Post: 28th August 2008, 18:04
  5. QToolButton text alignment
    By Vladimir in forum Qt Programming
    Replies: 6
    Last Post: 2nd March 2007, 07:42

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.