Results 1 to 3 of 3

Thread: How to reduce line spacing between 2 names on same button?

  1. #1
    Join Date
    Jan 2013
    Posts
    22
    Thanked 3 Times in 2 Posts
    Qt products
    Qt/Embedded

    Default How to reduce line spacing between 2 names on same button?

    I have displayed string list of 4 parameters on 2 push buttons which are located vertically.
    there is not problem for displaying 4 params. but when i am trying to display more parameters then it looks as if 2 buttons are overlapped.
    this problem can be solved by reducing line spacing between 2 parameters. i am displaying the string list using button->->setText(str[0]); then i am not getting how to reduce the line spacing. I tried to reduce the button font but still that problem is there.


    Thanks,
    sanujas

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to reduce line spacing between 2 names on same button?

    I think you either need to increase the vertical size of button (which I think is may not be preferred), or otherwise implement a custom button with custom painting.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jan 2013
    Posts
    22
    Thanked 3 Times in 2 Posts
    Qt products
    Qt/Embedded

    Default Re: How to reduce line spacing between 2 names on same button?

    The case is like number of strings on button can be variable, it's depending upon user selection. yah 1st option will not be useful. so will 2nd option be useful? can you pl brief about creating custom button using custom painting?

    Thanks,
    Sanujas

Similar Threads

  1. Line Spacing at QTextBrowser
    By hirti in forum Newbie
    Replies: 0
    Last Post: 22nd July 2011, 10:13
  2. QTextDocument - line spacing
    By mazurekwrc in forum Qt Programming
    Replies: 5
    Last Post: 24th February 2011, 23:23
  3. QGraphicsTextItem and in between line spacing
    By eric_vi in forum Qt Programming
    Replies: 0
    Last Post: 19th October 2010, 17:57
  4. QWebView - Problems with line spacing
    By ckovacs in forum Qt Programming
    Replies: 0
    Last Post: 7th October 2009, 23:05
  5. What is the line spacing
    By smoozer in forum Qt Programming
    Replies: 3
    Last Post: 9th September 2009, 16:26

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.