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. Qt designer mixed fonts in QLabel

Qt designer mixed fonts in QLabel

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.2k 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.
  • B Offline
    B Offline
    Bert59
    wrote on last edited by
    #1

    Hi,

    I would like to have a QLabel with the following text:

    05685d05-7f94-4255-ba07-aa83f53584ab-image.png

    So a mix of greek and arabic letters.

    Is that possible?

    J.HilkJ 1 Reply Last reply
    0
    • B Offline
      B Offline
      Bert59
      wrote on last edited by
      #5

      Tank you.
      As I'm using Windows 10, I used the Character map to get the unicode of theta.
      1f4fbe89-e106-45b3-ad27-3e9eaec88ff6-image.png
      Then I copy/paste in the QLabel in the designer and I get the theta character.

      77d798f8-c498-4514-b4fa-43192452ad68-image.png

      Another way to do it directly in the Designer is to right click on the label and select Change rich text...

      af30aa9b-7a8e-492d-9030-d8078ba32dd5-image.png

      On the Source tab one can enter the html code of the character

      This works fine also

      1 Reply Last reply
      2
      • B Bert59

        Hi,

        I would like to have a QLabel with the following text:

        05685d05-7f94-4255-ba07-aa83f53584ab-image.png

        So a mix of greek and arabic letters.

        Is that possible?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #2

        @Bert59 QString is utf16 based. utf16 supports the greek alphabet.

        So, as long as your font supports the letters, QLabel supports it too.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        2
        • B Offline
          B Offline
          Bert59
          wrote on last edited by
          #3

          Thank you, but how can I enter a utf 16 code in a QLabel in the designer?

          J.HilkJ 1 Reply Last reply
          0
          • B Bert59

            Thank you, but how can I enter a utf 16 code in a QLabel in the designer?

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by J.Hilk
            #4

            @Bert59 copy and paste should work fine :D

            Usually the OS has special number keyboard you can call forth to copy past from or you use one online. Some OS support stuff like alt key + numpad numbers. etc.

            You'll have to figure that out yourself, as QtCreator and QDesigner have no dedicated input panel for it


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              Bert59
              wrote on last edited by
              #5

              Tank you.
              As I'm using Windows 10, I used the Character map to get the unicode of theta.
              1f4fbe89-e106-45b3-ad27-3e9eaec88ff6-image.png
              Then I copy/paste in the QLabel in the designer and I get the theta character.

              77d798f8-c498-4514-b4fa-43192452ad68-image.png

              Another way to do it directly in the Designer is to right click on the label and select Change rich text...

              af30aa9b-7a8e-492d-9030-d8078ba32dd5-image.png

              On the Source tab one can enter the html code of the character

              This works fine also

              1 Reply Last reply
              2

              • Login

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