#include "demoicon.h" #include "config.h" DemoIcon::DemoIcon(QWidget *parent) : QLabel(parent) { setPixmap(QPixmap(":/images/symbol/demo.png")); connect(&timer, SIGNAL(timeout()), SLOT(check())); timer.start(1000); check(); } void DemoIcon::check() { Define::config_item item = Config::getInstance()->getConfigValue(Define::config_demo_mode); if (item.d32 == 0) hide(); else show(); }