Results 1 to 3 of 3

Thread: QPushButton setText Alignment

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QPushButton setText Alignment

    Hi All,

    I have an external resource script in which I embed stringResources.txt -

    Essentially stringResources.txt is a QMap< QString, QString > key, valu pairs. Now I read the entire file into a QMap
    and I am trying to setText for different widgets using the key so that it can be dynamic and resources externalized.

    I am successful at that, however, when I do a setText on PushButton or Checkbox widgets using this method I end up getting the text top centered. even If I do text-align in stylesheet,t here is no change.

    I am attaching two screenshots - 1 with text top-centered and 2 the way I want and normally the way it works.

    Please let me know what needs to be done or what I am doing wrong ?

    Thanks,
    Raja.
    Attached Images Attached Images

Similar Threads

  1. QPushButton with image - text alignment
    By vladeck in forum Newbie
    Replies: 3
    Last Post: 1st July 2009, 19:20
  2. QPushButton SetText Color
    By Qt Coder in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2009, 17:21
  3. QPushButton setText problem
    By batileon in forum Qt Programming
    Replies: 3
    Last Post: 3rd December 2008, 03:02
  4. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 04:40
  5. QPushButton, stylesheets, text alignment
    By SiLiZiUMM in forum Qt Programming
    Replies: 1
    Last Post: 4th July 2007, 19:53

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.