Results 1 to 5 of 5

Thread: Increase font size globally (and proportionally)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2015
    Posts
    52
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Increase font size globally (and proportionally)

    My application has two 'modes' of functioning, touchscreen and desktop. For the touchscreen mode, I would need to make everything bigger: fonts, icons, buttons, etc. Is there a way to achieve that?

    I have a slider that could change the stylesheet of the application, but I don't know how to make everything scale proportionally. I've successfully changed a checkbox, icon size and font size of a QListView by changing the stylesheet according to a slider value, but I actually would need to make those changes everywhere in the application.

    If not through a slider, making two fixed configurations would work too, but I don't know how to change the base font size globally so that everything is proportional to this base font.

  2. #2
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Increase font size globally (and proportionally)

    You could apply the stylesheet to the whole application by using QApplication's setStyleSheet(const QString & sheet) method.

    Please check:
    http://stackoverflow.com/questions/1...-sheet-loading

Similar Threads

  1. Not able to increase font size for QTextEdit
    By shyamsundar1982 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd March 2015, 07:38
  2. Replies: 1
    Last Post: 30th March 2012, 16:46
  3. Globally reset my font sizes to default?
    By scott_hollen in forum Qt Programming
    Replies: 1
    Last Post: 1st November 2011, 23:26
  4. Font size increase in QtableWidget
    By sosanjay in forum Qt Programming
    Replies: 1
    Last Post: 19th November 2009, 14:51
  5. How to increase font size in arm target
    By soumya in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 2nd September 2009, 05:58

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.