rmagro
1st August 2012, 11:08
Hi all,
I need your help to understand why may code is not able to load correctly a png image with shadow (that you can see attached) whan I try to set it in a QMainWindows with custom shape..
Code follows:
setMask((new QPixmap(":/dike5prova/logoic_big.png"))->mask());
QPalette* palette = new QPalette();
palette->setBrush(QPalette::Window,*(new QBrush(*(new QPixmap(":/dike5prova/logoic_big.png")))));
setPalette(*palette);
setWindowFlags(Qt::FramelessWindowHint);
QWidget *centralWidget = new QWidget(this);
it works well with normal png..
but using that one I'm not able to see the shadow correctly, only a black stripe..
How Can I correct my code ?
Many thanks in advance,
Roberto
8080
I need your help to understand why may code is not able to load correctly a png image with shadow (that you can see attached) whan I try to set it in a QMainWindows with custom shape..
Code follows:
setMask((new QPixmap(":/dike5prova/logoic_big.png"))->mask());
QPalette* palette = new QPalette();
palette->setBrush(QPalette::Window,*(new QBrush(*(new QPixmap(":/dike5prova/logoic_big.png")))));
setPalette(*palette);
setWindowFlags(Qt::FramelessWindowHint);
QWidget *centralWidget = new QWidget(this);
it works well with normal png..
but using that one I'm not able to see the shadow correctly, only a black stripe..
How Can I correct my code ?
Many thanks in advance,
Roberto
8080