<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 15, 2014 at 4:57 PM, Sven Langkamp <span dir="ltr"><<a href="mailto:sven.langkamp@gmail.com" target="_blank">sven.langkamp@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's hard to tell what you are trying to do. Can you attach the code and a screenshot?</blockquote>
</div><br></div><div class="gmail_extra">Sure. Here's the code snippet I added in the paintEvent.<br><br></div><div class="gmail_extra"><code><br>//painting foreground color<br>    QPainterPath path2;<br>    path2.addEllipse(QPoint(180,180), colorInnerRadius-25, colorInnerRadius - 25);<br>
    painter.fillPath(path2, m_triangleColorSelector->color());<br>    painter.drawPath(path2);<br></div><div class="gmail_extra"></code><br></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">
I've also added in some modifications to the masks. The size of the masks and also the path are arbitrary and are just used for testing. <br><br></div><div class="gmail_extra"><code><br></div><div class="gmail_extra">
    int side = qMin(width()/2, height()/2);<br></div><div class="gmail_extra">    int side2 = qMin(width()/2, height()/2);<br>    QRegion maskedRegion (width()/2 - side/2, height()/2 - side/2, side, side, QRegion::Ellipse);<br>
    QRegion maskedRegion2 (180 - side2/2, 180 - side2/2 , side2, side2, QRegion::Ellipse);<br>    setMask(maskedRegion + maskedRegion2);<br></div><div class="gmail_extra"></code><br></div><div class="gmail_extra"><br>
</div><div class="gmail_extra">These wouldn't work since, the QRect which houses only the popup palette. I couldn't figure out the part of the code which changes the QRect size. <br><br></div><div class="gmail_extra">
But, as I've been going through it, changing the size in the sizeHint() method seems to change the overall size of the widget i.e., it enlarges it. So, I probably should change most of the code which calculates the relative positions of the favourite brushes and so on. Is it the right way to do it? <br>
</div><div class="gmail_extra"><br>-- <br><div dir="ltr"><div>regards,</div>Koushik. S</div>
</div></div>