# class KColorButton

###

Module | kdeui
Namespace |
Class | KColorButton
Inherits | QPushButton

A pushbutton to display or allow user selection of a color.

This widget can be used to display or allow user selection of a color.

See also KColorDialog

### methods

- KColorButton (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  Creates a color button.

- KColorButton (c, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  c | QColor |
  parent | QWidget | 0

  Creates a color button with an initial color c.

- KColorButton (c, defaultColor, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  c | QColor |
  defaultColor | QColor |
  parent | QWidget | 0

  Creates a color button with an initial color c and default color defaultColor.

- KColorButton (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0

- KColorButton (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QColor |
  a1 | QWidget | 0

- changed (newColor)

  returns Nothing
  SIGNAL ("changed (const QColor&)")

  Argument | Type | Default
  --- | --- | ---
  newColor | QColor |

  Emitted when the color of the widget is changed, either with setColor() or via user selection.

- color ( )

  returns QColor

  Returns the currently chosen color.

- defaultColor ( )

  returns QColor

  Returns the default color or an invalid color if no default color is set.

- dragEnterEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QDragEnterEvent |

- dropEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QDropEvent |

- keyPressEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QKeyEvent |

- minimumSizeHint ( )

  returns QSize

- mouseMoveEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QMouseEvent |

- mousePressEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QMouseEvent |

- paintEvent (pe)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  pe | QPaintEvent |

- setColor (c)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  c | QColor |

  Sets the current color to c.

- setDefaultColor (c)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  c | QColor |

  Sets the default color to c.

- sizeHint ( )

  returns QSize