[Widgets] register transparency property of Gui::ColorButton

- at the moment it is not possible to set the property "allowTransparency" in Qt Designer
This commit is contained in:
Uwe
2023-02-25 18:51:36 +01:00
committed by wwmayer
parent d26b84df3f
commit fc1a6012cf
2 changed files with 18 additions and 1 deletions

View File

@@ -1762,7 +1762,10 @@ void PrefDoubleSpinBox::setParamGrpPath ( const QByteArray& name )
// -------------------------------------------------------------
ColorButton::ColorButton(QWidget* parent)
: QPushButton( parent ), _allowChange(true), _drawFrame(true)
: QPushButton(parent),
_allowChange(true),
_drawFrame(true),
_allowTransparency(false)
{
_col = palette().color(QPalette::Active,QPalette::Midlight);
connect( this, SIGNAL( clicked() ), SLOT( onChooseColor() ));
@@ -1793,6 +1796,16 @@ bool ColorButton::allowChangeColor() const
return _allowChange;
}
void ColorButton::setAllowTransparency(bool ok)
{
_allowTransparency = ok;
}
bool ColorButton::allowTransparency() const
{
return _allowTransparency;
}
void ColorButton::setDrawFrame(bool ok)
{
_drawFrame = ok;