Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Font Size Help
Forum Updated to NodeBB v4.3 + New Features

Font Size Help

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 511 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.
  • M Offline
    M Offline
    marinahanna
    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 Extensions
      • Unsolved