QSA-interest Archive, December 2007
overlap of QIcon with image
Message 1 in thread
<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV></DIV>
<DIV><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2>I need to display the below UI.</FONT></SPAN></DIV>
<DIV><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=202074013-17122007>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2>Lets assume Gray color box is QIcon Widget, which is loaded with a Gray color image. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2>And Red color rectangle is transparent icon which is drawn to overlap the QIcon widget.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV></SPAN></DIV>
<DIV><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2>Fig (1): I need the below UI. </FONT></SPAN><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2><IMG src="cid:1.3050665456@xxxxxxxxxxxxxxxxxxxxxxxxxxx"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2>Fig(2): If i draw red icon using painter.drawPixmap then i am getting the below UI.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=202074013-17122007><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> <SPAN class=202074013-17122007><IMG src="cid:2.3050665457@xxxxxxxxxxxxxxxxxxxxxxxxxxx"></SPAN></DIV>
<DIV> </DIV>
<DIV>Basically I need to set QIcon widget / QIcon loaded image to be transparent. So that the red color rectangle can be visible on top of QIcon Widget .</DIV>
<DIV> </DIV>
<DIV>I tried </DIV>
<DIV> </DIV>
<DIV>Approach(1): In QIcon paintEvent handler function.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> QGfx * gfx = painter->internalGfx();<BR> unsigned int oldType = gfx->overlayTransparentType();<BR> gfx->setOverlayTransparentType(0);</DIV>
<DIV> </DIV>
<DIV> painter->drawPixmap (xPos, yPos, *pixmap);</DIV>
<DIV> </DIV>
<DIV> gfx->setOverlayTransparentType(oldType); <BR></DIV>
<DIV>
<DIV>Before drawing i called setOverlayTransparentType. But this doesn't solved the problem.</DIV>
<DIV> </DIV>
<DIV>Does anyone can help me on this ? Basically I could like to know How do I overlap QIcon loaded image & Icon ?</DIV></DIV>
<DIV align=left><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV align=left>Thanks & Regards,</DIV>
<DIV align=left>P.Sriniamul</DIV></DIV><BR></DIV></div><br>
<!--4--><hr size=1></hr> 5, 50, 500, 5000 - Store N number of mails in your inbox. <a href="http://in.rd.yahoo.com/tagline_mail_4/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/">Click here.</a></body></html>
