Преглед на файлове

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 години
родител
ревизия
b69c0d3e67
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  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);
 }
 
 //------------------------------------------------------------------------------