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. How to change the font size in the QTextEdit from the QComboBox
Qt 6.11 is out! See what's new in the release blog

How to change the font size in the QTextEdit from the QComboBox

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 3.2k 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.
  • D Offline
    D Offline
    DanqueDynasty
    wrote on last edited by
    #1

    Ive been stumped on a problem for quite some time now, and so I gotta ask, how can I get the font in the QTextEdit to be sized based on the value in the QComboBox. Please help, I have been stuck on this problem for some time. thanks

    Swing Innovations: http://swinginnovations.com/

    1 Reply Last reply
    0
    • J Offline
      J Offline
      joonhwan
      wrote on last edited by
      #2

      maybe you can use QWidget::setStyleSheet(const QString&) function.
      see "here":http://qt-project.org/doc/qt-4.8/stylesheet-reference.html for reference

      joonhwan at gmail dot com

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Lykurg
        wrote on last edited by
        #3

        Connect the currentIndexChanged signal from the box to a slot where you set the font of the editor using QWidget::setFont().

        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