QColorDialog Class Reference |
Constant | Value | Description |
---|---|---|
QColorDialog::ShowAlphaChannel | 0x00000001 | Allow the user to select the alpha component of a color. |
QColorDialog::NoButtons | 0x00000002 | Don't display OK and Cancel buttons. (Useful for "live dialogs".) |
QColorDialog::DontUseNativeDialog | 0x00000004 | Use Qt's standard color dialog on the Mac instead of Apple's native color panel. |
This enum was introduced in Qt 4.5.
The ColorDialogOptions type is a typedef for QFlags<ColorDialogOption>. It stores an OR combination of ColorDialogOption values.
See also options, setOption(), testOption(), and windowModality().
This property holds the currently selected color in the dialog.
Access functions:
This property holds the various options that affect the look and feel of the dialog.
By default, all options are disabled.
Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).
Access functions:
See also setOption() and testOption().
Constructs a color dialog with the given parent.
This function was introduced in Qt 4.5.
Constructs a color dialog with the given parent and specified initial color.
This function was introduced in Qt 4.5.
Destroys the color dialog.
This signal is emitted just after the user has clicked OK to select a color to use. The chosen color is specified by color.
See also color and currentColorChanged().
This signal is emitted whenever the current color changes in the dialog. The current color is specified by color.
See also color and colorSelected().
Returns the custom color at the given index as a QRgb value.
This function was introduced in Qt 4.5.
See also setCustomColor().
Returns the number of custom colors supported by QColorDialog. All color dialogs share the same custom colors.
Closes the dialog and sets its result code to result. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return result.
Reimplemented from QDialog.
See also QDialog::done().
Pops up a modal color dialog with the given window title (or "Select Color" if none is specified), lets the user choose a color, and returns that color. The color is initially set to initial. The dialog is a child of parent. It returns an invalid (see QColor::isValid()) color if the user cancels the dialog.
The options argument allows you to customize the dialog.
This function was introduced in Qt 4.5.
Pops up a modal color dialog, lets the user choose a color, and returns that color. The color is initially set to initial. The dialog is a child of parent. It returns an invalid (see QColor::isValid()) color if the user cancels the dialog.
Shows the dialog as a window modal dialog, returning immediately.
This function was introduced in Qt 4.5.
See also QDialog::open().
This is an overloaded function.
Opens the dialog and connects its colorSelected() signal to the slot specified by receiver and member.
The signal will be disconnected from the slot when the dialog is closed.
This function was introduced in Qt 4.5.
Returns the color that the user selected by clicking the OK or equivalent button.
Note: This color is not always the same as the color held by the currentColor property since the user can choose different colors before finally selecting the one to use.
Sets the custom color at index to the QRgb color value.
Note: This function does not apply to the Native Color Dialog on the Mac OS X platform. If you still require this function, use the QColorDialog::DontUseNativeDialog option.
See also customColor().
Sets the given option to be enabled if on is true; otherwise, clears the given option.
See also options and testOption().
Sets the standard color at index to the QRgb color value.
Note: This function does not apply to the Native Color Dialog on the Mac OS X platform. If you still require this function, use the QColorDialog::DontUseNativeDialog option.
Changes the visibility of the dialog. If visible is true, the dialog is shown; otherwise, it is hidden.
Reimplemented from QWidget.
Returns true if the given option is enabled; otherwise, returns false.
This function was introduced in Qt 4.5.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.5 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com