::sizeHint() const
{
QWidget* aParent = parentWidget();
- if(myIsBase){
- static float aCoeff = 2.0/3.0;
- return QSize(aCoeff*aParent->width(),aCoeff*aParent->height());
- }else{
- static float aCoeff = 1.0/3.0;
- return QSize(aCoeff*aParent->width(),aCoeff*aParent->height());
- }
+ float aCoeff = 2.0/3.0;
+ if(!myIsBase)
+ aCoeff = 1.0/3.0;
+
+ int aWidth = int(aCoeff*aParent->width());
+ int aHeight = int(aCoeff*aParent->height());
+ return QSize(aWidth,aHeight);
}