[Qt-interest] model dialog background error?

tang ke tangk at lemote.com
Fri Oct 14 05:05:28 CEST 2011


hi,all guys.
when I use a png picture with background image, if I add the Qt::Dialog,
it will show the black rect, if I delete the Qt::Dialog, it will works
right.

the widget construct function:
WidgetA::WidgetA(QWidget *parent)
:QWidget(parent)
{
QPixmap m_background("c:/1.png");
QPalette palette;
palette.setBrush(QPalette::Background, QBrush(m_background));
setPalette(palette);
setAutoFillBackground(true);
setFixedSize(m_background.size());
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
setWindowModality(Qt::ApplicationModal);
}

the main.cpp:

QWidget aaaaa;
aaaa.setGeometry(100, 100, 1000, 600);
WidgetA a(&aaaaa);
a.show();
aaaaa.show();


qt version:4.7.2
OS:winXp

-- 
Best Regards


Tang Ke (Application develop of software department)
Tel:0086-512-52308628 Fax:0086-512-52308688
Phone:18962393077
E-mail:tangk at lemote.com  MSN:tangk at lemote.com, mumutouv at gmail.com
Web: http://www.lemote.com <http://www.lemote.com/>
JiangSu ZhongKe Lemote Technology Co.,Ltd
MengLan Industry Park,YuShan,ChangShu City,JiangSu,China

-------------- next part --------------
A non-text attachment was scrubbed...
Name: error.bmp
Type: image/bmp
Size: 492038 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111014/6cc4cd76/attachment.bmp 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: right.bmp
Type: image/bmp
Size: 166454 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111014/6cc4cd76/attachment-0001.bmp 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tangk.vcf
Type: text/x-vcard
Size: 442 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111014/6cc4cd76/attachment.vcf 


More information about the Qt-interest-old mailing list