QT equivalent of CGradient and CGradientCtrl
-
So sorry I forgot to post the URL, so of course you won't know what it does:
https://www.codeproject.com/articles/2196/cgradient-and-cgradientctrl
D.
-
So sorry I forgot to post the URL, so of course you won't know what it does:
https://www.codeproject.com/articles/2196/cgradient-and-cgradientctrl
D.
-
Well not much like that editor, but sort of in concept at least. But it does more than that - when the use moves the pegs the application can be told that changes have been made. So if I wish to move the "grey" point in a gamma slider for the default position of sqrt(0.5) , I can do so and the application get to know the new position etc.. Or I can change the "black point" and be told that has changed as well.
Palettes, yes but that's a Windows CPalette which isn't very much like a QPalette ...
-
Well not much like that editor, but sort of in concept at least. But it does more than that - when the use moves the pegs the application can be told that changes have been made. So if I wish to move the "grey" point in a gamma slider for the default position of sqrt(0.5) , I can do so and the application get to know the new position etc.. Or I can change the "black point" and be told that has changed as well.
Palettes, yes but that's a Windows CPalette which isn't very much like a QPalette ...
@Perdrix
Hi
Hmm I have not seen such Widget im afraid. ( also did a google search but its all types of other sliders)So it must allow color change and have movable PEGS that send a signal when moved.
Can user also add/remove pegs ?You could reuse the editor for the PEGS part
https://code.woboq.org/qt5/qttools/src/shared/qtgradienteditor/
or try to port that class CGradientCtrl to Qt. I could not watch the code so not sure how much
it would take. You can reuse its structures but anything mouse related and colors would have to be changed. -
Hi
Update.
I found this
https://github.com/ctin/MultiSlider
That can have multiple handles. (as many as you like) Maybe this can be tweaked to do what you want ?
-
Hi,
Do you mean something like shown in this cgradient demo project ?
-
Hi,
Do you mean something like shown in this cgradient demo project ?
-
@mrjj said in QT equivalent of CGradient and CGradientCtrl:
@SGaist
Yep, exactly that one. He links to it higher up.Sorry, I missed the link.
The multi slider you found looks like a good start.
-
@mrjj said in QT equivalent of CGradient and CGradientCtrl:
@SGaist
Yep, exactly that one. He links to it higher up.Sorry, I missed the link.
The multi slider you found looks like a good start.