Skip to content

QColorButton is a widget to show an initial color and choose a different color when it's double-clicked.

License

Notifications You must be signed in to change notification settings

epasveer/QColorButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

QColorButton

QColorButton is a widget to show an initial color and choose a different color when it's double-clicked.

There's an api to set the initial color for QColorButton and retrieve its new color.

Copy QColorButton.ui, QColorButton.h, QColorButton.cpp, QColorSwatch.h, QColorSwatch.cpp to your project. Make sure your build system does auotmatic creation of moc files from the .ui file.

ScreenShot

Running the test program will initially show a window with an initial color. Red in the case of the test program.

Double click the red area to bring up the standard color dialog.

Selecting OK after choosing a different color will result in the red area changing to the color you chose.

Building QColorButton

Download the latest code using 'clone'.

% git clone https://github.com/epasveer/QColorButton

Setup cmake and build

% cd QColorButton/src
% cd build
% cmake ..

% make

Install it (or not), which will usually copy it to /usr/local/bin. May need root access.

% cd QColorButton/src/build
% sudo make install

LICENSE

QColorButton source code is licensed under the MIT License.

About

QColorButton is a widget to show an initial color and choose a different color when it's double-clicked.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published