[Qt-interest] Fwd: Qt and Lion fullscreen
Till Oliver Knoll
till.oliver.knoll at gmail.com
Fri Oct 14 18:53:30 CEST 2011
Hello,
I take the liberty to forward this to the list :)
Cheers, Oliver
Anfang der weitergeleiteten E‑Mail:
> Von: Flavio Tordini <flavio.tordini at gmail.com>
> Datum: 14. Oktober 2011 18:22:48 MESZ
> An: till.oliver.knoll at gmail.com
> Betreff: Qt and Lion fullscreen
>
> Hi Oliver,
> I read your messages on the Qt mailing list about hiding the toolbar
> when in Lion sullscreen mode. Thanks for posting your research!
>
> I found a workaround for your technique based on Objective C
> categories. Instead of extending Qt private class
> QCocoaWindowDelegate, you just extend NSObject, its superclass. It's a
> dirty hack, obviously. But it works, because the method names are
> quite unique.
>
> Here's the code:
>
> @interface NSObject (fullscreen)
>
> - (NSApplicationPresentationOptions)window:(NSWindow *)window
> willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions;
>
> @end
>
> @implementation NSObject (fullscreen)
>
> - (NSApplicationPresentationOptions)window:(NSWindow *)window
> willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions
> {
> return
> NSApplicationPresentationAutoHideToolbar |
> NSApplicationPresentationAutoHideMenuBar |
> NSApplicationPresentationFullScreen |
> NSApplicationPresentationHideDock;
> }
>
> @end
>
> Thanks again for sharing your ideas.
>
> Cheers,
> Flavio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111014/27e5365e/attachment.html
More information about the Qt-interest-old
mailing list