[Interest] QMdiSubWindow resize() does include the frame

John Weeks john at wavemetrics.com
Wed Apr 24 22:40:16 CEST 2013


On 24-Apr-2013, at 12:28 PM, Immanuel Weber wrote:

> Thanks John for the code. It works fine. I'm not really into the qt internals, I don't know if it is enough to overload in QMdiSubWindow size() and resize() to account for your code snippets.

The size() and resize() members aren't virtual, so you will get surprising results if you try to override them. My somewhat unsatisfying solution was to create new member functions that set the size and position of these "windoids". I found it beyond my capability to come up with a foolproof way to force everyone to use "correct" code.

Note that .ui files will compile to code that calls size(), setGeometry() and such. They may do that through a base-class pointer, frustrating your attempts to make them do something different, and making it impossible to simply hide those functions with your own implementation.

> Should this be reported as a bug?


Up to you. I haven't been at this Qt thing long enough to know how it would be received.

-John Weeks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130424/c8721272/attachment.html>


More information about the Interest mailing list