Qt颜色选择器小部件? [英] Qt Color Picker Widget?

查看:681
本文介绍了Qt颜色选择器小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 QDialog 子类,为用户提供一些选项。其中一个选项是一种颜色。我看到


I have a QDialog subclass that presents some options to the user for their selecting. One of these options is a color. I have seen the QColorDialog, and I need something much simpler, that is also a regular widget so I can add to my layout as part of my dialog. Does Qt offer anything like this or will I have to make my own? If the latter, what is the best strategy?

解决方案

Have you looked at the QtColorPicker, part of Qt Solutions?

QtColorPicker provides a small widget in the form of a QComboBox with a customizable set of predefined colors for easy and fast access. Clicking the ... button will open the QColorDialog. It's licensed under LGPL so with dynamic linking and proper attribution it can be used in commercial software. Search for QtColorPicker and you'll find it. Here's a link to one site that hosts many of the Qt Solutions components:

https://qt.gitorious.org/qt-solutions/qt-solutions-gordons/source/bceb890b844d0b40c72d4422171e732ea38ecbe8:

这篇关于Qt颜色选择器小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆