Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved add color label to QHBoxLayout?

    General and Desktop
    2
    4
    269
    Loading More Posts
    • 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
      s002wjh last edited by

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

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • S
          s002wjh @SGaist last edited by s002wjh

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • First post
              Last post