summaryrefslogtreecommitdiffstats
path: root/tools/qtconfig/previewwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qtconfig/previewwidget.cpp')
-rw-r--r--tools/qtconfig/previewwidget.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/qtconfig/previewwidget.cpp b/tools/qtconfig/previewwidget.cpp
index 757b448..9fa9591 100644
--- a/tools/qtconfig/previewwidget.cpp
+++ b/tools/qtconfig/previewwidget.cpp
@@ -44,15 +44,16 @@
QT_BEGIN_NAMESPACE
-PreviewWidget::PreviewWidget( QWidget *parent, const char *name )
- : PreviewWidgetBase( parent, name )
+PreviewWidget::PreviewWidget(QWidget *parent)
+ : QWidget(parent)
{
+ setupUi(this);
+
// install event filter on child widgets
- QObjectList l = queryList("QWidget");
- for (int i = 0; i < l.size(); ++i) {
- QObject * obj = l.at(i);
- obj->installEventFilter(this);
- ((QWidget*)obj)->setFocusPolicy(Qt::NoFocus);
+ QList<QWidget*> l = findChildren<QWidget*>();
+ foreach(QWidget* w, l) {
+ w->installEventFilter(this);
+ w->setFocusPolicy(Qt::NoFocus);
}
}