Is there any possibility to determine is plugin widget created in designer or in preview?
I have problem, when try to change widget maximum size in properties in designer
constructor:
PluginWidget:: PluginWidget(QWidget *parent,bool aDesigner)//aDesigner=true if object created from createWidget - in Designer mode
: QWidget(parent),
mFirst(true),
mHorizontal(true)
{

if(aDesigner)
{
//mFirst=false; - this will help to work correct in preview, but not in designer before I change horizontal property
setHorizontal(true);
}
}

Set property:

void
PluginWidget::setHorizontal(bool aValue)
{
mHorizontal=aValue;
if (!mFirst)
{
int width=this->width();
int height=this->height();
if (mHorizontal)
{
setMaximumHeight(11);
setMaximumWidth(16777215);
}
else
{
setMaximumHeight(16777215);
setMaximumWidth(11);
}
this->setGeometry(x(),y(),height,width);
}
mFirst=false;
update();
}

If I change this property(MaximumHeight and MaximumWidth are called) - then I can not resize it in top direction(mHorisontal=false) or in left direction(mHorisontal=true). And other problem, when object created it calls all set-functions - mFirst can help in project , but not in preview when mHorizontal need to be false in preview . Please can you tell me what I do wrong?