Explorar el Código

By default, ctkColorDialog is resizable

If you use a ctkColorDialog, it's probably because you have tabs to add
into. Which means that you are likely to want to resize the dialog as
well.
Julien Finet hace 14 años
padre
commit
b69c0d3e67
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      Libs/Widgets/ctkColorDialog.cpp

+ 6 - 0
Libs/Widgets/ctkColorDialog.cpp

@@ -66,6 +66,12 @@ void ctkColorDialogPrivate::init()
   this->LeftTabWidget = new QTabWidget(q);
   topLay->insertWidget(0, this->LeftTabWidget);
   this->LeftTabWidget->addTab(this->BasicTab, QObject::tr("Basic"));
+  
+  // If you use a ctkColorDialog, it's probably because you have tabs to add
+  // into. Which means that you are likely to want to resize the dialog as
+  // well.
+  q->setSizeGripEnabled(true);
+  q->layout()->setSizeConstraint(QLayout::SetDefaultConstraint);
 }
 
 //------------------------------------------------------------------------------