QColorDialog color;//調出顏色選擇器對話框
QColor c = color.getRgba();
//c.red(), c.green(), c.blue()是分別對應的rgb值
應用在PCL中
void PCLVisualizer::colorSelector()
{
QColorDialog color;
QColor c = color.getRgba();
pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ> pointColor(clicked_points_3d, c.red(), c.green(), c.blue());
viewer->addPointCloud(clicked_points_3d, pointColor, cloudName);
viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 3, cloudName);
ui.qvtkWidget->update();
}