Sfoglia il codice sorgente

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 14 anni fa
parent
commit
b69c0d3e67
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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);
 }
 
 //------------------------------------------------------------------------------