blob: 8dfa9d9f05969480256153eba8ed1976c13a70dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef COLORLISTEDITOR_H
#define COLORLISTEDITOR_H
#include <QComboBox>
QT_BEGIN_NAMESPACE
class QColor;
class QWidget;
QT_END_NAMESPACE
//! [0]
class ColorListEditor : public QComboBox
{
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
public:
ColorListEditor(QWidget *widget = nullptr);
public:
QColor color() const;
void setColor(const QColor &color);
private:
void populateList();
};
//! [0]
#endif
|