Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Font Size Help
Qt 6.12 LTS is out! See what's new in the release blog

Font Size Help

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 681 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello, I have two very simple questions about changing the font size.

    (1)I have managed to change the font size for my labels, but how do I go about changing the font size of the text inside my push buttons? The ctrl ++ and the ctrl scroll methods do not work for me.

    (2)Also, I have a QTextEdit box that will have information written inside it. What code can I use in my python script to adjust the font? As an example, here is part of the code that I need help with in terms of adjusting font size:

    @
    def connectDevice(self):
    dev.setSensorModeColorIndepdent()
    dev.setNumSamples(numSamples)
    self.textEdit.clear()
    self.textEdit.setText('Device is Connected')
    @

    The font size on the "Device is connected" portion is 9pt, but would like to change it to 28pt. What can I use to make that change?

    [edit: Added missing coding tags @ SGaist]

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You can find "here":http://doc.qt.io/qt-5/qtwidgets-richtext-textedit-example.html an example that should give you the base to perform modifications on your QTextEdit.

      As for the buttons, they follow your system values

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved