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. Widget - multiple fonts
QtWS25 Last Chance

Widget - multiple fonts

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 3.5k Views
  • 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.
  • S Offline
    S Offline
    Sorin
    wrote on last edited by
    #1

    How can I set on a widget( lets say QToolButton ) a text having different fonts? Thanks!

    There are only 10 types of people in the world: Those who understand binary, and those who don't

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tony
      wrote on last edited by
      #2

      Well,

      if you mean "change text font" on a widget, you have setFont method. But I guess that's not what you're asking about, so please clarify it better :)

      T.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexander
        wrote on last edited by
        #3

        or use styles

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sorin
          wrote on last edited by
          #4

          For example I want to put "this":http://img687.imageshack.us/img687/2752/stringh.jpg string on my control

          There are only 10 types of people in the world: Those who understand binary, and those who don't

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Sorin
            wrote on last edited by
            #5

            Till now the only solution I found is to add a QLabel with a diferent font as a child of my QToolButton control

            There are only 10 types of people in the world: Those who understand binary, and those who don't

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              Sorin: Qt allows to use rich text in most places, which can have embedded font settings. Does that work for you?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sorin
                wrote on last edited by
                #7

                what I need is a QToolButton to display his text in rich text format, I saw that a bug was posted for "this":http://bugreports.qt.nokia.com/browse/QTBUG-3535 but I was closed without being evaluated

                There are only 10 types of people in the world: Those who understand binary, and those who don't

                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