Results 1 to 5 of 5

Thread: Problems with StyleSheet and QFontMetrics (see attached program)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Problems with StyleSheet and QFontMetrics (see attached program)

    Hi,

    Herewith I have attached a toy program in which it sets the stylesheet "* { font-size: 20pt; }" of app context.

    After setting above style sheet, I am taking QFontMetrics to do some processing on fontmetrics.width() / fontmetrics.height() but both are getting wrong.

    In toy program if you click "Print Font Info" button, I displays the correct information.
    But when showing the fontmetrics of dialog (click on 'Show Dialog') or panel (click on 'Show Panel') it displays wrong.

    In short: my aim is to set application font and subsequently I should get the correct fontmetrics info.

    Please let me know if I am doing anthing wrong.

    Thank you.
    -Hiral
    Attached Files Attached Files

Similar Threads

  1. Stylesheet and QFontMetrics
    By ucomesdag in forum Qt Programming
    Replies: 7
    Last Post: 18th January 2010, 07:45
  2. QFontMetrics.height()
    By Caius Aérobus in forum Qt Programming
    Replies: 8
    Last Post: 4th April 2009, 17:36
  3. Replies: 2
    Last Post: 26th March 2009, 08:43
  4. QFontMetrics and HTML tags
    By vonCZ in forum Newbie
    Replies: 1
    Last Post: 14th August 2008, 12:13
  5. QFontMetrics, i can't understand
    By pakulo in forum Qt Programming
    Replies: 11
    Last Post: 24th June 2007, 17:59

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.