Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QColorSelectorDialog Class Reference
[QtBaseModule]

The QColorSelectorDialog class allows users to select a color. More...

    #include <QColorSelectorDialog>

Inherits QDialog.

Public Functions

Public Slots

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The QColorSelectorDialog class allows users to select a color.

The user may select from a number of pre-defined colors displayed in a grid. A default color is displayed at the bottom of the grid.

The easiest way to create a QColorSelectorDialog is to use the static function getColor().

    QColor color = QColorSelectorDialog::getColor(Qt::red);

Member Function Documentation

QColorSelectorDialog::QColorSelectorDialog ( const QColor & color, QWidget * parent = 0, Qt::WindowFlags flags = 0 )

Constructs a color selector dialog with the given parent and flags that initially has the specifed color selected.

QColorSelectorDialog::QColorSelectorDialog ( QWidget * parent = 0, Qt::WindowFlags flags = 0 )

Constructs a color selector dialog with the given parent and flags.

QColorSelectorDialog::~QColorSelectorDialog ()

Destroys a QColorSelectorDialog

QColor QColorSelectorDialog::color () const

Returns the currently highlighted color.

See also setColor().

const QColor & QColorSelectorDialog::defaultColor () const

Returns the default color.

See also setDefaultColor() and color().

QColor QColorSelectorDialog::getColor ( const QColor & color = Qt::white, QWidget * parent = 0 )   [static]

This is a convenience static function that returns a color selected by the user. The default color is specified by color.

The function creates a modal file dialog with the given parent widget.

void QColorSelectorDialog::selected ( const QColor & color )   [signal]

When the selected color changes, this signal is emitted with the color parameter containing the new color.

void QColorSelectorDialog::setColor ( const QColor & color )   [slot]

Sets the currently highlighted color to color.

See also color().

void QColorSelectorDialog::setDefaultColor ( const QColor & color )

Sets the default color.

See also setColor() and defaultColor().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3