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. setting QLineEdit text bold
Forum Updated to NodeBB v4.3 + New Features

setting QLineEdit text bold

Scheduled Pinned Locked Moved Solved General and Desktop
qlineeditbold
8 Posts 4 Posters 5.4k 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.
  • V Offline
    V Offline
    vinothrajendran4
    wrote on last edited by
    #1

    I have a sentence to be displayed in QLineedit....In that i need to make some of the words in bold ....Any help is appreciated..........

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lineaxe
      wrote on last edited by
      #2

      I recommend you use a textEdit field. It has a few options on how to make certain words diffent colors. You would just want to limit it to one line.

      V 1 Reply Last reply
      0
      • RatzzR Offline
        RatzzR Offline
        Ratzz
        wrote on last edited by
        #3

        @vinothrajendran4
        Here is one example .

        --Alles ist gut.

        V 1 Reply Last reply
        0
        • L Lineaxe

          I recommend you use a textEdit field. It has a few options on how to make certain words diffent colors. You would just want to limit it to one line.

          V Offline
          V Offline
          vinothrajendran4
          wrote on last edited by
          #4

          @Lineaxe : Thanks @Lineaxe.....But is there any way to do with QLineEdit......

          1 Reply Last reply
          0
          • RatzzR Ratzz

            @vinothrajendran4
            Here is one example .

            V Offline
            V Offline
            vinothrajendran4
            wrote on last edited by
            #5

            @Ratzz : Thanks @Ratzz....How about making a single word bold , but other words normal.......Any help.....

            mrjjM 1 Reply Last reply
            0
            • V vinothrajendran4

              @Ratzz : Thanks @Ratzz....How about making a single word bold , but other words normal.......Any help.....

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              hi
              LineEdit do not support html as textEdit does so I dont think you can color just one word
              in any easy way.

              V 1 Reply Last reply
              0
              • mrjjM mrjj

                hi
                LineEdit do not support html as textEdit does so I dont think you can color just one word
                in any easy way.

                V Offline
                V Offline
                vinothrajendran4
                wrote on last edited by
                #7

                @mrjj : Thanks

                mrjjM 1 Reply Last reply
                0
                • V vinothrajendran4

                  @mrjj : Thanks

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @vinothrajendran4
                  that said, i did find some code on the new that uses a trick.
                  please see this sample
                  https://www.dropbox.com/s/m6slequi83tbqg2/linedit.zip?dl=0

                  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