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.3k 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 24 Nov 2015, 07:03 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 24 Nov 2015, 08:11 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 24 Nov 2015, 08:22
      0
      • R Offline
        R Offline
        Ratzz
        wrote on 24 Nov 2015, 08:14 last edited by
        #3

        @vinothrajendran4
        Here is one example .

        --Alles ist gut.

        V 1 Reply Last reply 24 Nov 2015, 08:23
        0
        • L Lineaxe
          24 Nov 2015, 08:11

          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 24 Nov 2015, 08:22 last edited by
          #4

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

          1 Reply Last reply
          0
          • R Ratzz
            24 Nov 2015, 08:14

            @vinothrajendran4
            Here is one example .

            V Offline
            V Offline
            vinothrajendran4
            wrote on 24 Nov 2015, 08:23 last edited by
            #5

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

            M 1 Reply Last reply 24 Nov 2015, 08:45
            0
            • V vinothrajendran4
              24 Nov 2015, 08:23

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

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 24 Nov 2015, 08:45 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 24 Nov 2015, 08:47
              0
              • M mrjj
                24 Nov 2015, 08:45

                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 24 Nov 2015, 08:47 last edited by
                #7

                @mrjj : Thanks

                M 1 Reply Last reply 24 Nov 2015, 08:54
                0
                • V vinothrajendran4
                  24 Nov 2015, 08:47

                  @mrjj : Thanks

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 24 Nov 2015, 08:54 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

                  6/8

                  24 Nov 2015, 08:45

                  • Login

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