m_userPanelVBox->addWidget(m_userPanelExpandButton);
m_userPanelVBox->addWidget(m_userPanelLabel);
- this->setAutoFillBackground(true);
+ // this->setAutoFillBackground(true);
// this->setAttribute(Qt::WA_TranslucentBackground);
// this->setWindowOpacity(0.5); //DEFUNCT
+// QPalette userPanelPalette;
+// userPanelPalette.setBrush(this->backgroundRole(),
+// QBrush(QImage(":/res/personal_info_bckgrnd.png")));
+// this->setPalette(userPanelPalette);
+
m_userPanelStateMachine = new QStateMachine(this);
m_userPanelStateClosed = new QState(m_userPanelStateMachine);
m_userPanelStateClosed->assignProperty(this, "pos", QPoint(
m_userPanelTransitionClose->addAnimation(new QPropertyAnimation(this, "pos"));
m_userPanelStateMachine->start();
+ this->setObjectName("UserPanel");
+ this->setStyleSheet(QString(
+ "#UserPanel{background-image: url(:/res/images/personal_info_bckgrnd.png)}"));
}
void UserInfoPanel::reDrawUserPanel(int width, int height)
Q_UNUSED(width);
this->resize(USERPANEL_WIDTH,height + MARGIN_CORRECTION);
}
+
+void UserInfoPanel::paintEvent(QPaintEvent *)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ QStyleOption option;
+ option.init(this);
+
+ QStylePainter painter(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &option, &painter, this);
+}