Sfoglia il codice sorgente

ctkPopupWidgetPlugin was not allowing more than 1 child

As soon as the mouse moved outside ctkPopupWidget (in the Designer), the
widget was hidden and no more widgets could be added.
Julien Finet 14 anni fa
parent
commit
468edc43d8
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      Libs/Widgets/Plugins/ctkPopupWidgetPlugin.cpp

+ 4 - 0
Libs/Widgets/Plugins/ctkPopupWidgetPlugin.cpp

@@ -32,7 +32,11 @@ ctkPopupWidgetPlugin::ctkPopupWidgetPlugin(QObject* pluginParent)
 QWidget *ctkPopupWidgetPlugin::createWidget(QWidget* widgetParent)
 QWidget *ctkPopupWidgetPlugin::createWidget(QWidget* widgetParent)
 {
 {
   ctkPopupWidget* newWidget = new ctkPopupWidget(widgetParent);
   ctkPopupWidget* newWidget = new ctkPopupWidget(widgetParent);
+  // if the widget is a tooltip, it wouldn't accept children
   newWidget->setWindowFlags(0);
   newWidget->setWindowFlags(0);
+  // if the widget auto hides, it disappear from the workplace and don't allow
+  // children anymore.
+  newWidget->setAutoHide(false);
   return newWidget;
   return newWidget;
 }
 }