<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">hi,</span><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
I was working on bug number 326844. </div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><a href="https://bugs.kde.org/show_bug.cgi?id=326844" target="_blank">https://bugs.kde.org/show_bug.cgi?id=326844</a><br>
</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">It was a feature request to resize the window to fit the current page size.</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">I solved this bug up to some extent and was stuck in a small problem from last two three days. Here are some screenshot of what is happening.</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">Before selecting resize window to fit page:-</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><img src="cid:ii_143b40892c16c038" alt="Inline image 3" width="758" height="425" class=""><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">After selecting resize to fit page:-</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<img src="cid:ii_143b409eb6201d3d" alt="Inline image 4" class=""><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
I am using the resize method for resizing the window.</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">The window is resizing  as required but sometimes it doesn't resizes . It has to be moved by mouse and then again click on the button in the menu to resize the window again.  Once it is moved by mouse, it works fine. Now, when i change the zoom level of the current page, the problem starts again.</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">I think the problem occurs due to something happening in the other portion of the code.</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">I searched about it on the internet and nobody was able to answer the solution to people with same problem. There are some alternative solutions to the problem:-</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">==> Use set geometry instead of resize which works fine. but would have to be taken care of the size of the screen and the original position of the window. Also, repainting the portion outside the window when the window is resized to a smaller window.<br>
</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">==> Use a timer which will signal a slot which in turn will resize the window, but that might require qsignalmapper to map the width and height to the slot. ( I didn't tried this solution ).</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">The best solution i could find on the internet is this <a href="http://qt-project.org/forums/viewthread/25648" target="_blank">http://qt-project.org/forums/viewthread/25648</a></div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">Please guide me how should I solve this problem. Should I use such methods which don't appear to be clean.</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">Thanks,</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
Saheb Preet Singh</div></div>