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. QCombobox css bug??

QCombobox css bug??

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.1k 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.
  • M Offline
    M Offline
    minjunkim
    wrote on last edited by
    #1

    Hi,

    i was faced some strange issue..

    QCombobox:focus didn't work properly

    below is my code

    QComboBox:hover
    {
    font: bold 14px rgb(150, 0, 60);
    background-color: rgba(255,255,255,220);
    border-style: outset;
    border-radius: 3px;
    border: 1px solid rgb(150,0,60);
    }

    border is ok but font didn't work..

    why is happening?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I don't see font colour listed as editable using QSS: docs, perhaps that's the reason.

      (Z(:^

      M 1 Reply Last reply
      0
      • sierdzioS sierdzio

        I don't see font colour listed as editable using QSS: docs, perhaps that's the reason.

        M Offline
        M Offline
        minjunkim
        wrote on last edited by
        #3

        @sierdzio

        Thank you for reply

        Sorry.. i did mistake..

        below is perfectly work

        QComboBox:hover
        {
        color: rgb(150,0,60);
        font: bold 14px;
        background-color: rgba(255,255,255,220);
        border-style: outset;
        border-radius: 3px;
        border: 1px solid rgb(150,0,60);
        }

        JonBJ 1 Reply Last reply
        0
        • M minjunkim

          @sierdzio

          Thank you for reply

          Sorry.. i did mistake..

          below is perfectly work

          QComboBox:hover
          {
          color: rgb(150,0,60);
          font: bold 14px;
          background-color: rgba(255,255,255,220);
          border-style: outset;
          border-radius: 3px;
          border: 1px solid rgb(150,0,60);
          }

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @minjunkim

          QCombobox:focus didn't work properly

          But you don't do anything about "focus", you do QComboBox:hover. I presume you are treating "focus" & "hover" as the same thing?

          I assume you have verified that without the :hover just a plain QComboBox rule does respect that font?

          Is it an editable combobox? Is the font change to apply to the items in the selection dropdown, the text in an editable combo, or both?

          I have a feeling that this may have been asked recently. And the outcome was that you cannot have a font change on something like hover-only, for whatever reason. Is that good enough, or do you want me to try to dig it the discussion from somewhere?

          M 1 Reply Last reply
          0
          • JonBJ JonB

            @minjunkim

            QCombobox:focus didn't work properly

            But you don't do anything about "focus", you do QComboBox:hover. I presume you are treating "focus" & "hover" as the same thing?

            I assume you have verified that without the :hover just a plain QComboBox rule does respect that font?

            Is it an editable combobox? Is the font change to apply to the items in the selection dropdown, the text in an editable combo, or both?

            I have a feeling that this may have been asked recently. And the outcome was that you cannot have a font change on something like hover-only, for whatever reason. Is that good enough, or do you want me to try to dig it the discussion from somewhere?

            M Offline
            M Offline
            minjunkim
            wrote on last edited by
            #5

            @JonB

            um..

            Maybe you can use below to help

            QComboBox:hover
            {
            /something you want/
            color: red;
            }

            QComboBox:focus:hover
            {
            color: white;
            }

            This way, hover and focus can be applied separately.

            Is the intention of your question correct?

            JonBJ 1 Reply Last reply
            0
            • M minjunkim

              @JonB

              um..

              Maybe you can use below to help

              QComboBox:hover
              {
              /something you want/
              color: red;
              }

              QComboBox:focus:hover
              {
              color: white;
              }

              This way, hover and focus can be applied separately.

              Is the intention of your question correct?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @minjunkim said in QCombobox css bug??:

              Maybe you can use below to help
              ...
              Is the intention of your question correct?

              Sorry, I don't understand. It is not I who needs help, it is you who are asking the question. I was just giving you some hints.

              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