I want to add all the selected colors into a list without duplicate entry and later all the selected colors should popup in a widget.
How can I add QColor into list and later extract it
I want to add all the selected colors into a list without duplicate entry and later all the selected colors should popup in a widget.
How can I add QColor into list and later extract it
Copyright © 2021 Jogjafile Inc.
QColordoes not provide a hash function forQSetorstd::unordered_setby default. You can add that locally (or globally for your program) though by delegating that to the hash function for QRgb (which includes alpha value as well):Or you can also not put the
QColors into the set, but theQRgbvalues (viaQColor::rgba()), and later convert them back toQColorvia theQColor(QRgb)constructor again.