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. add color label to QHBoxLayout?
Forum Updated to NodeBB v4.3 + New Features

add color label to QHBoxLayout?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 508 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.
  • S Offline
    S Offline
    s002wjh
    wrote on last edited by
    #1

    is there anyway to add color coding label/box into QHBoxLayout? like green, blue etc

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What exactly are you trying to achieve ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What exactly are you trying to achieve ?

        S Offline
        S Offline
        s002wjh
        wrote on last edited by s002wjh
        #3

        NVM figure it out

        @SGaist said in add color label to QHBoxLayout?:

        Hi,

        What exactly are you trying to achieve ?

        i'm try to put color label inside QHBoxLayout so in my qtpaint plot, user know green color represent certain category.

        for example if "apple" label color is green, "strawberry" label color is red. and in my plot, a red line indicate its associate with strawberry, a green line indicate its associate with apple.

        but i dont know how to turn my qt label into color words.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          So you want to have a set of QLabels each of a different color in your layout ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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