Skip to content
Snippets Groups Projects
Commit aa8eaf28 authored by alexander.mruchok's avatar alexander.mruchok
Browse files

[+] Added AdaptiveWidget::updateChildStyle

[+] Added defines.h, Properties namespace
parent 57536812
No related branches found
No related tags found
2 merge requests!17Develop old,!11Feature 3131
......@@ -2,7 +2,8 @@ HEADERS += \
$$PWD/AppStyleSheetHandler.h \
$$PWD/ScreenInfo.h \
$$PWD/UiScaling.h \
$$PWD/Utils.h
$$PWD/Utils.h \
$$PWD/defines.h
SOURCES += \
$$PWD/AppStyleSheetHandler.cpp \
......
#ifndef DEFINES_H
#define DEFINES_H
#include <QString>
namespace Properties {
static const QString TEXT = "text";
static const QString STATE = "state";
}
#endif // DEFINES_H
#ifndef ADAPTIVEWIDGET_H
#define ADAPTIVEWIDGET_H
#include "QStackedWidget"
#include <QStackedWidget>
#include <ScreenInfo.h>
#include <QState>
#include <QStyle>
class AdaptiveWidget : public QStackedWidget
{
......@@ -44,6 +45,14 @@ protected:
}
}
void updateChildStyle(const QString& a_objName)
{
for (auto widget : getTheSameWidgets<QWidget>(a_objName)) {
widget->style()->unpolish(widget);
widget->style()->polish(widget);
}
}
template <class T /*= QWidget*/>
inline QList<T*> getTheSameWidgets(const QString& a_objName)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment