[Qt-interest] setUnifiedTitleAndToolBarOnMac and Cocoa Qt cause problems
Israel Brewster
israel at frontierflying.com
Wed Jul 22 21:05:30 CEST 2009
On Jul 22, 2009, at 10:14 AM, Frank Mertens wrote:
> I usually keep it with just restoring the window size and letting the
> window manager decide, where to place the window.
Which would be fine, except that it is the resize that actually fails,
not the move (as evidenced by the move() and resize() test case).
Using the geometry() methods just adds the convenience of having the
window open exactly where the user expects, because it is right where
they left it. In both cases, however, the resize fails - so your
method won't work any better. This becomes especially problematic when
you have code to save the window size on close, and restore it on
open, as the size on open actually ends up slightly smaller than what
you had saved. So repeated open/close cycles see the window getting
progressively smaller, until it hits the minimum possible size. Not
good.
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
>
> Israel Brewster wrote:
>> Anyone? Anyone? Ok, so I realize this is a somewhat obscure usage
>> case,
>> but I wouldn't have though it would be so obscure as to get no
>> response :-)
>> -----------------------------------------------
>> Israel Brewster
>> Computer Support Technician II
>> Frontier Flying Service Inc.
>> 5245 Airport Industrial Rd
>> Fairbanks, AK 99709
>> (907) 450-7250 x293
>> -----------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> On Jul 14, 2009, at 1:37 PM, Israel Brewster wrote:
>>
>>
>>
>>> Using the setUnifiedTitleAndToolBarOnMac option with a cocoa build
>>> of
>>> Qt appears to cause issues when attempting to save/restore window
>>> positions. With this combination, when attempting to restore the
>>> size
>>> and position of a window, the window invariably (at least on my
>>> machine) appears shifted and/or resized. This is the case when using
>>> any of the standard resize options, such as setGeometry(),
>>> restoreGeometry() or resize() and move(). Using a carbon build all
>>> methods work properly, as does the Cocoa build when not using the
>>> unified title and toolbar option. Is the
>>> setUnifiedTitleAndToolBarOnMac option deprecated with the cocoa
>>> build?
>>> Or is this a bug? I have attached a QTest test case demonstrating
>>> these issues.
>>>
>>> -----------------------------------------------
>>> Israel Brewster
>>> Computer Support Technician II
>>> Frontier Flying Service Inc.
>>> 5245 Airport Industrial Rd
>>> Fairbanks, AK 99709
>>> (907) 450-7250 x293
>>> -----------------------------------------------
>>> <Israel Brewster.vcf>
>>> <
>>> testWindow
>>> .cpp
>>> >
>>> <
>>> testWindow
>>> .h><testWindow.pro>_______________________________________________
>>>
>>> Qt-interest mailing list
>>> Qt-interest at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 397 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090722/71048385/attachment.bin
More information about the Qt-interest-old
mailing list