Text Shadows in QLabel Snippets: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
AutoSpider (talk | contribs) (Add "cleanup" tag) |
||
Line 1: | Line 1: | ||
{{Cleanup | reason=Auto-imported from ExpressionEngine.}} | |||
//Easy way to add shadows to text in QLabel | //Easy way to add shadows to text in QLabel | ||
//include headers <QGraphicsDropShadowEffect> | //include headers <QGraphicsDropShadowEffect> |
Revision as of 17:03, 3 March 2015
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine. Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean. |
//Easy way to add shadows to text in QLabel //include headers <QGraphicsDropShadowEffect>
// For an example we have QLabel called userName // set blur to 0, and setOffset to 1,1 and color for smooth look must be little butter darker then text color
QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(this);
effect->setBlurRadius(0);
effect->setColor(QColor("#EEEEEE"));
effect->setOffset(1,1);
ui->userName->setGraphicsEffect(effect);