How to show QDialog window over OSX Dock and OSX menu? - macos

I'd like to show full screen QDialog on Mac OSX.
I tried to do that:
QDialog* d = new QDialog(nullptr, Qt::Window);
d->showFullScreen();
d->activateWindow();
It works, but this dialog creates new OSX screen:
I tried to do that:
QDialog* d = new QDialog(nullptr, Qt::SplashScreen | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
d->setWindowState(Qt::WindowFullScreen);
d-show();
It doesn't create new screen, but QDialog shows under OSX Dock and OSX menu:
How to solve my problem?

What you are seeing is the normal behaviour of OS X. If you want a full screen application, without the dock and menu bar, then having a separate Desktop Screen (space) is the accepted method.
An alternative would be to maximise the size of your dialog and set the dock to hide, but you'd still be left with the menu at the top and changing the user's preference for how the dock is displayed is not a good user experience.

Related

Use non-native fullscreen window mode in PhpStorm on macOS

How can I configure PhpStorm to use the "non-native" fullscreen mode? I'd like PhpStorm to be fullscreen (without the macOS top menu bar, etc), in the same window (without creating a new window that I have to scroll between).
The terminal for macOS iTerm2 have this setting. You can choose to remove the tick from "Native full screen windows". When this tick is removed, the fullscreen mode will simply take out all space in the window, without creating a new separate window.
Native fullscreen example
Notice how a new separate "window" is created called "PhpStorm"
Non-native fullscreen example
Notice how theres still one window called "Desktop". The iTerm window fills out the whole screen though.
the only way you can do it at the moment is by adjusting the dock in mac to hide menu automatically and then spread the editor to wider and higher setting
click right on the dock in mac and goto settings and hide menu works for me
i am suffering from same issue lol after i saw iterm2 :P

Cannot restore topmost window from window menu (OSX)

I create a window and set level to NSStatusWindowLevel. In Dock Preferences, I enable "Minimize windows into application". After I minimize the window into dock icon, the window disappears when I select it (to restore) from window menu.
My OS X version is 10.11. When I try on OS X 10.6, it works fine.
Is this a bug of Cocoa? How can I overcome this issue?
I overcome this issue by this trick:
Before miniaturize, set window level to NSNormalWindowLevel
Observe NSWindowDidDeminiaturize notification
Restore window level to NSStatusWindowLevel in notification handler.

How can I hide the dock and menubar in my fullscreen game?

I'm writing a game that will run in a fullscreen window. I'm using Xojo to code it (therefore any boolean window properties that might be availble in Xcode / Interface Builder are not an option).
Is there a plist key/value I can set in my app that will hide the application menubar and the dock when my window is set to full screen?
Needs to work on Yosemite.
Get the macoslib
It contains extensions for NSWindow that can do this. Just search the project for "fullscreen".
There is also a demo. If you run the project, open the menu bar: Examples -> Cocoa -> NSWindow. That window has a "Toggle Fullscreen" button for testing.
Here is what you need to place in the window Open event :
self.LiveResize = False
self.MenuBarVisible = false
self.FullScreen = true
First line turns off animation,
Second line turns off UI elements (dock and menu bar),
Third line makes the window full screen

Shortcut for Rubymine fullscreen mode on Mac OS X

You can enter full-screen mode in Rubymine by navigating to MENU > VIEW > ENTER FULL SCREEN. Once in full-screen mode, moving your mouse to the top of the screen triggers the menu bar to dropdown, where you can once again navigate to MENU > VIEW > (now changed to) EXIT FULL SCREEN.
Does anyone know of a shortcut for this on Mac? I think there is one for OS X - not sure what it is off-hand, but can't find anyone anywhere for windows.
CTRL-COMMAND-F
OS X KeyMap cheatsheet here: http://www.jetbrains.com/ruby/docs/RubyMine_ReferenceCard_Mac.pdf

Mac OS X - app without menu?

I'd like to build an app that does not have a menubar, a dock icon, or sits in the app switcher. Basically, it should be like Quicksilver: I'd active it through a global hot key, say from Safari, and a little window appears, but Safari does not get inactive, neither does a different menubar show. I hope you understand what I mean...
How would I do that? I can prevent the dock icon, the app switcher, but I do not know how I can prevent the other apps from becoming inactive when my app's window shows or how I can remove the menu.
Thanks for any hints!
Try searching for "LSUIElement". That should give you all the information you need.
(Specifically, this page in the documentation).
As Dave already said, add
LSUIElement YES
in your application's Info.plist file. That will get rid of icon and menu bar.
Then, to actually bring a window to the front at the appropriate time (e.g. when triggered through a global keyboard shortcut), you could do something like this:
ProcessSerialNumber psn = {0, kCurrentProcess};
SetFrontProcess(&psn);
[someWindow makeKeyAndOrderFront:nil];

Resources