Qt Mac OSX screen lock from application - c++

We have developed an Qt application for Mac OSX in which we have used the following code to lock the screen.
system("/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend");
The code works as expected except sometime after locking, the screen freezes (a white/gray blank screen). We have to force shutdown the mac to unfreeze.
I have tested in Mac OSX 10.7.2, 10.7.4, 10.7.5.
I am not sure if its a problem of our app or the issue is caused by Mac itself?
Can anyone shed some light into this?
Thanks,

Related

QT installer worked coding not give result

I download the app wifimouse for windows.
wifimouse app fully build with qt.
Source code of wifimouse server application
I install and run wifimouse app in my computer it works perfectly and all the options are works smoothly.
But, If I run the same code in my computer it not works properly.
For example ; In wifimouse application there is an option for brightness controling
Brightness code
error comes like this. But , it works smoothly in downloaded installer from here
Problem with qt in getting outputs.
My project
I want to get the cpu usage , ram usage ,process list and app list with qt.
In Windows
I am getting ram usage from this code.
But app list , cpu usage and process outputs are not showed.
In linux
In linux the cpu usage output not showed.
In Mac
In mac the app list output not showed.
Why this problem occured ?

Keyboard Not Captured on VirtualBox OS X

I have installed El Capitan on Virtual Box 5.1.28. However, the laptop keyboard isn't working even though the auto capture icon is turned on. When I use an external keyboard, that works. But I want to use my native laptop keyboard. Does anyone know what's wrong?
For anyone still having this problem, I learned that installing macOS on VMWare does not have this keyboard problem. Instructions are here

OS X 10.11 El Capitan Black Screen

I installed OS X 10.11 El Capitan on VMware and it worked successfully but after i shut it down and reopen , it got stuck after loading with apple logo and turns a black screen
can anyone help me with this,Please ?
i run this VMware on Windows 10 ,Thanks in advance.
According to this source who had the same problem you can follow these steps and see if it works:
Reboot to safe mode, here are the steps.
Delete this file "/Library/Preferences/com.apple.loginwindow.plist"
Switch off iCloud authentication and revert to local authentication.
I had the same issue with 10.13 High Sierra
Editing my VMX file (Documents/Virtual Machines/MacOS/MacOS.vmx) to include:
virtualHW.version = "10"
Fixed it for me.

SDL window isn't showing on Cygwin

I am trying to run an SDL application with very basic code on Cygwin, but I have the following error after calling SDL_Init:
No available video device
I have X11 packages installed, but that isn't solving the issue
You need to start the X server and set the DISPLAY variable appropriately before running an X program.

openframeworks, addons, and mavericks on osx

I had developed an app in openframeworks for OSX Mountain Lion using the addons ofxUI, ofxFFT, and ofxXmlSettings.
It worked beautifully. But recently I switched over to OSX 10.9 and now my code still compiles but errors immediately upon running.
2014-03-23 19:33:24.489 etaBasement_debug[47594:507] -[__NSCFError _cocoaErrorStringWithKind:]: unrecognized selector sent to instance 0x7b61a060
I can't really find what I need on Google. If anyone knows how to fix this issue or if I need to give more information, please let me know.