# -*- coding: utf-8 -*- """ *************************************************************************** QtGui.py --------------------- Date : November 2015 Copyright : (C) 2015 by Matthias Kuhn Email : matthias at opengis dot ch *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * *************************************************************************** """ __author__ = 'Matthias Kuhn' __date__ = 'November 2015' __copyright__ = '(C) 2015, Matthias Kuhn' from PyQt5.QtGui import * def __qcolor_repr__(self: QColor): if not self.isValid(): return '' elif self.spec() == QColor.Rgb: return f'' elif self.spec() == QColor.Hsv: return f'' elif self.spec() == QColor.Cmyk: return f'' elif self.spec() == QColor.Hsl: return f'' elif self.spec() == QColor.ExtendedRgb: return f'' # PyQt doesn't provide __repr__ for QColor, but it's highly desirable! QColor.__repr__ = __qcolor_repr__