QCOlorDialog: is it possible to improve the display of the color selection?



  • I'm just facing to a stupid problem. I have displayed a QColorDialog with an initial color that was black. Then, I clicked "on the rainbow rectangle" to select another color. But current color were still black. I have lost a lot of time before to understand that my actions just changed HS values, letting V value to 0. So I also had to move the vertical slider that manages the V value.

    Unfortunately, my users will never understand this. So, I need that the HS rectangle displays colors using the current V value, or to use another color representation for color selection (wheel, ...).

    Do you know if it is easy to do?

    Thanks.


  • Lifetime Qt Champion

    Hi,

    What version of Qt are you using ?
    On what OS ?
    With which compiler ?



  • Hi @SGaist,
    I'm currently using QT5.6.3 with Visual Studio 2013. under Windows 10.

    PS: sorry for the delay for my response. But I received no mail about your post ("Watching" is enabled so I do not understand).


  • Lifetime Qt Champion

    How does it behave if you set a color where you explicitly set the HSV values ?



  • Hi @SGaist,
    The problem I have is not a question of using HSV. The problem is more a question of GUI. QColorDialog, on Windows, offers an interface of color selection that requires two step:

    • In a first step you select a color on a "rainbow". This rainbow only covers the HS values,

    • In a second step you select "color intensity" using a slicer. This slicer covers the V value.

    The fact that it is a two-step process is perturbating for lambda-users. The typical case I encountered is the following:

    I opened the QColorDialog with black as current color. So, to change the color, the natural approach of the user is to "click on the rainbow". But in fact this changed nothing on the color. Because V value stays at 0 (value from black), and only HS changes. So in RGB it is still a black color.

    See the below image. On it the user might suppose that he/she has selected a green color. But in fact it is still black.
    0_1519918077845_QColorDialog.PNG

    So what I would have is that the "rainbow" part reflect the V too (even if it does not change it). So from an initial back color, the rainbow will be black. By this way the user might understand that it has to change the color intensity too (and first when the initial color is black).


  • Lifetime Qt Champion

    That's the native windows colour dialog not Qt's own thus it's a bit of a Windows specific issue.

    By the way, why are you using black as a staring colour ?



  • Hi @SGaist,
    About starting with black color, it is just because my application provides a color gradient functionality. By default it is between white and black. But user will be able to change the two extrem colors. So, if he/she decides to change the final color, default initial color is black, just in case he/she clicks on OK without doing anything else.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.