Unsolved Text Shadow Problem
-
Hello,
I want to do shadow for my label's and I using QGraphicsDropShadowEffect for this but my program crashing. Where is the problem ? Help me please.My codes
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QGraphicsDropShadowEffect>MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect;
effect->setBlurRadius(5);
effect->setXOffset(5);
effect->setYOffset(5);
effect->setColor(Qt::black);
ui->label->setGraphicsEffect(effect);
ui->setupUi(this);
}MainWindow::~MainWindow()
{delete ui;
}
-
ui->setupUi(this);
Make the above statement as first line in your constructor. It should work.
-
I have exactly the same problem. Anyone got a suggestion? MyPremierCreditCard
-
@Fener386 Did you try what @dheerendra suggested?