I want to open a Qt file dialog on top and it works setting the Qt::WindowStaysOnTopHint flag. The problem is that if there's an application running on full screen my dialog doesn’t get the focus.
How could I do it?
Thanks.
Try this:
dia->show();
dia->activateWindow();
dia->raise();
dia->setFocus()
Related
I want to develop a screen shot tool in mac,I need to get the top window under my mouse.
There is "ChildWindowFromPointEx" API in Windows OS, but Mac is more complex.
Does anybody know how to deal with it? Thanks very much
windowNumber returns the number of the frontmost window that would be hit by a mouse-down at the specified screen location. According to the apple docs.
my mac os application is running in full screen mode.
On button click i'm opening finder window which allow me to open any another file or application but problem is that, when i open any another app, screen switches back to xCode and that application opens. Need to open selected app/file above same window.
I have tried:
**[[NSWorkspace sharedWorkspace] launchApplication:path];**
passing application path to launchAppication method
How can i do this?????
Help
The issue is basically because using [NSView enterFullScreenMode:withOption:] will set the app's [NSWindow level] to kCGMaximumWindowLevel - 1, so that all other app's windows will appear behind it.
This is kinda what you would expect from a fullscreen app, which implies system-modal behaviour.
I guess the only way of allowing another app to appear in front of the fullscreen app would be to lower the window level, however I have no idea what effect that would have.
I am using Intellij IDEA on Mac OSX 10.9.2. Usually I have the IDE on another space, and I switch between both. The problem is that when I run something from the IDE, the Java icon pops up in the dock, switching the space automatically, so I have to switch back to the IDE each time this happens. It is really annoying.
Is there anyway to prevent this from happening? I have tried the "headless" option, but it doesn't work.
you should try right-clicking the icon in your dock and selecting "assign to both desktops" on the icon that's bugging you...
it should do the trick
BTW, this isn't a java question , it's a mac OSX question
I was surprised this doesn't happen automatically, but I would like my applications window to be in focus as I click its dock icon, when in minimized mode.
Just to clarify, when I minimize the app, the window goes to dock, but when I click the its corresponding Dock Icon, the window don't come in focus.
Is there anything I am missing?
I am using Qt 4.5.3 on Mac OS X 10.5, 10.6
Thanks for help.
Rahul
First answer: That's the expected behavior of a Mac app. Try Safari for example. An app can be active without showing any window. In that case, only the menu bar at the top shows that the active app is changed. So, unless absolutely necessary, you shouldn't bring the minimized window back unless the user explicitly does so. That's the Mac way!
Second answer: I understand that there are cases where you want to bring the minimized window up. In Cocoa, the application delegate method -applicationDidBicomeActive is called when the application gets the focus, and there you can bring the window up yourself. I'm sure Qt also has a similar event/callback/signal or whatever, but I don't know any Qt ... :p Sorry I can't be of any help.
I know there is an on-screen keyboard which you can access on Mac OSX, however I need to add a toolbar button to launch it from within my application.
Does anybody know how I can do this?
You can launch KeyboardViewerServer.app in whatever way your language does that (you do not say which)
From Terminal:
open -a KeyboardViewerServer
I found it in /System/Library/Components/KeyboardViewer.component/Contents/SharedSupport/KeyboardViewerServer.app
If you have problems with it on Leopard, see also
http://discussions.apple.com/thread.jspa?threadID=1257002&tstart=50