From 036dbc767554630334e2b09936fbff36139e5d06 Mon Sep 17 00:00:00 2001 From: marian Date: Tue, 28 Apr 2009 13:49:16 +0000 Subject: [PATCH] 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 --- clients/qt4/qt4client.cpp | 5 +++++ clients/qt4/qt4client.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/clients/qt4/qt4client.cpp b/clients/qt4/qt4client.cpp index 8bc5021e..f70183df 100644 --- a/clients/qt4/qt4client.cpp +++ b/clients/qt4/qt4client.cpp @@ -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,¶ms); if (!obj) continue; diff --git a/clients/qt4/qt4client.h b/clients/qt4/qt4client.h index 2cc67ed7..8f2892e1 100644 --- a/clients/qt4/qt4client.h +++ b/clients/qt4/qt4client.h @@ -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