void ConfigItem::show() { ConfigureDialog *dlg = static_cast<ConfigureDialog*>(listView()->topLevelWidget()); if (m_widget == NULL){ m_widget = getWidget(dlg); if (m_widget == NULL) return; dlg->wnd->addWidget(m_widget, id() ? id() : defId++); dlg->wnd->setMinimumSize(dlg->wnd->sizeHint()); QObject::connect(dlg, SIGNAL(applyChanges()), m_widget, SLOT(apply())); } dlg->showUpdate(type() == CLIENT_ITEM); dlg->wnd->raiseWidget(m_widget); }
void ConfigItem::show() { ConfigureDialog *dlg = static_cast<ConfigureDialog*>(treeWidget()->topLevelWidget()); if (m_widget == NULL) { m_widget = getWidget(dlg); if (m_widget == NULL) return; m_id = dlg->wnd->addWidget(m_widget/*, id() ? id() : defId++*/); dlg->wnd->setMinimumSize(dlg->wnd->sizeHint()); QObject::connect(dlg, SIGNAL(applyChanges()), m_widget, SLOT(apply())); QTimer::singleShot(50, dlg, SLOT(repaintCurrent())); } dlg->showUpdate(type() == CLIENT_ITEM); dlg->wnd->setCurrentWidget(m_widget); }