-
-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QColor API does not affect Color Input/Picker #603
Comments
Very interesting. Thanks for spotting this, @RobinSchfr! The problem seems to be that color_input = ui.color_input('Color', value='#0000ff')
color_input.picker.default_slot.children[0].props('model-value="#0000ff"') But |
Thank you very much, I'll take this quick fix for now. I'm glad that this was helpful for you. |
Commit e933862 add the correct initialization of the color picker. |
Tests are red. There's always a tiny difference between running locally and on GitHub. I'll fix it. |
I think it'll be good as well if you can apply e.g.
|
@RobinSchfr in e933862 I introduced a member color_input = ui.color_input()
color_input.picker.q_color.props('no-footer') Using the |
I am using the
ColorInput
and theColorPicker
classes.I want to add the functionality that the user can edit a color. So when a color is picked the color is saved in the
ColorInput
, and when the dialog gets opened again, the color should be set on the previous picked color (So the small circle should be on a actual position). In the current state no color is picked after opening the dialog.My approach is to use the
Qcolor API
to set thedefault-value
prop. But unfortunately no prop of theQcolor API
affects theColorInput
or theColorPicker
at all.Here are some examples I've tried:
ui.color_input(label='Color').props('default-value="#00ffff"')
ui.color_input(label='Color').props('default-value=#00ffff')
ui.color_input(label='Color').props('no-footer')
ui.color_input(label='Color').props('default-view=tune')
Did I miss something? Does anyone have an idea how to implement my functionality?
Thanks in advance!
Addition:
Well, that's very astonishing. I just discovered that the older Documentation includes a color picker with the exact functionality that I have been hoping for. I guess this proves that it is technically possible to solve this bug.
The text was updated successfully, but these errors were encountered: