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. change different font size of different widget at a time
Forum Updated to NodeBB v4.3 + New Features

change different font size of different widget at a time

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 2.0k Views 2 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.
  • S Offline
    S Offline
    saber
    wrote on 25 Jun 2018, 05:56 last edited by saber
    #1

    Is there any way to change the fonts of the whole app's widgets,label,pushbutton with just one spinbox ??

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 25 Jun 2018, 07:52 last edited by
      #2

      Hi
      Well there is QApplication::setFont(font);

      S 1 Reply Last reply 25 Jun 2018, 10:54
      3
      • M mrjj
        25 Jun 2018, 07:52

        Hi
        Well there is QApplication::setFont(font);

        S Offline
        S Offline
        saber
        wrote on 25 Jun 2018, 10:54 last edited by
        #3

        @mrjj

        problem is i used mixed font in different widgets . like some button has font size 11 and some has 10.

        so i guess i have to set one number to all??

        thanks .

        M 1 Reply Last reply 25 Jun 2018, 11:11
        0
        • S saber
          25 Jun 2018, 10:54

          @mrjj

          problem is i used mixed font in different widgets . like some button has font size 11 and some has 10.

          so i guess i have to set one number to all??

          thanks .

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 25 Jun 2018, 11:11 last edited by
          #4

          @saber
          It depends on what goal is.
          Use same size on all or what you want.
          Else you will to handle the buttons manually.
          So yes, one size is easier.

          if you already are using style sheets, it could also be an option.

          S 1 Reply Last reply 25 Jun 2018, 11:45
          1
          • M mrjj
            25 Jun 2018, 11:11

            @saber
            It depends on what goal is.
            Use same size on all or what you want.
            Else you will to handle the buttons manually.
            So yes, one size is easier.

            if you already are using style sheets, it could also be an option.

            S Offline
            S Offline
            saber
            wrote on 25 Jun 2018, 11:45 last edited by
            #5

            @mrjj
            i don't know what is best for that.
            i have to use different font size .
            i used the font option in qtdesigner . but if i could get the different font size with style sheets , i will do that.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nkiy
              wrote on 1 Jul 2018, 03:45 last edited by nkiy 7 Jan 2018, 04:16
              #6

              maybe you could try with stylesheet ? like "QWidget { font-family: xxxx }" ?

              UPDATE:
              well I just found that QWidget only supports background style properties, useless suggestion, plz ignore me.

              M 1 Reply Last reply 1 Jul 2018, 07:18
              2
              • N nkiy
                1 Jul 2018, 03:45

                maybe you could try with stylesheet ? like "QWidget { font-family: xxxx }" ?

                UPDATE:
                well I just found that QWidget only supports background style properties, useless suggestion, plz ignore me.

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 1 Jul 2018, 07:18 last edited by
                #7

                @nkiy
                Hi, you can use fonts :)
                alt text

                1 Reply Last reply
                0

                1/7

                25 Jun 2018, 05:56

                • Login

                • Login or register to search.
                1 out of 7
                • First post
                  1/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved