#include "IxWidgetUtil.h"
#include <QVariant>

QList<IxWidget *> IxWidgetUtil::findIxWidgets(const QWidget *parent)
{
    QList<IxWidget *> ixWidgets;
    QList<QWidget*> widgets = parent->findChildren<QWidget*>();
    foreach (QWidget* widget, widgets)
    {
        QVariant property = widget->property("IxWidget");
        if(property.canConvert<IxWidget*>())
            ixWidgets << property.value<IxWidget*>();
    }
    return ixWidgets;
}
