An eyedropper tool that picks a color by sampling any pixel on screen. More...
| Import Statement: | import Shotcut.Controls |
When pickColor is emitted (typically by clicking a button), the user can drag a crosshair over any part of the screen; releasing emits colorPicked with the sampled color.
import Shotcut.Controls as Shotcut Shotcut.ColorPickerItem { id: eyedropper onColorPicked: filter.set("color", color) } Button { text: qsTr("Pick") onClicked: eyedropper.pickColor() }
cancelled() |
Emitted when the user cancels the pick without selecting a color (e.g. by pressing Escape).
Note: The corresponding handler is onCancelled.
colorPicked(color color) |
Emitted when the user releases the mouse after picking. color is the sampled screen color.
Note: The corresponding handler is onColorPicked.
pickColor(point initialPos) |
Invoke this signal (emit via eyedropper.pickColor()) to start the screen-sampling mode. initialPos is the initial crosshair position; pass no argument to use the current cursor position.
Note: The corresponding handler is onPickColor.