Added missing parent parameter to custom table constructor. Add window and parent names to parameter list when building a custom object. Copy style sheet from added widget when populating a window.

git-svn-id: http://voip.null.ro/svn/yate@2603 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2009-04-28 13:49:16 +00:00
parent eefdcbd3ed
commit 036dbc7675
2 changed files with 9 additions and 3 deletions

View File

@ -2068,6 +2068,7 @@ void QtWindow::doPopulate()
QtClient::getUtf8(wTitle,formWidget->windowTitle());
title(wTitle);
setWindowIcon(formWidget->windowIcon());
setStyleSheet(formWidget->styleSheet());
}
// Initialize window
@ -2136,6 +2137,10 @@ void QtWindow::doInit()
}
}
TelEngine::destruct(list);
params.addParam("parentwindow",m_id);
NamedString* pw = new NamedString("parentwidget");
QtClient::getUtf8(*pw,frm[i]->objectName());
params.addParam(pw);
QObject* obj = (QObject*)UIFactory::build(type,name,&params);
if (!obj)
continue;

View File

@ -553,10 +553,11 @@ public:
/**
* Constructor
* @param name Table's name
* @param parent Optional parent widget
*/
inline QtTable(const char* name)
: UIWidget(name)
{ setObjectName(name); }
inline QtTable(const char* name, QWidget* parent = 0)
: QTableWidget(parent), UIWidget(name)
{ setObjectName(name); }
private:
QtTable() {} // No default constructor