I have an application that is written in C++ and is using QT as a framework. The compiler is gcc and the IDE is QT Creator.
On Mac OS, I need my app to interface with Spaces by accessing the collectionBehavior property of the NSWindow. So there should be a kind of a bridge from C++ app to NSWindow.
Can someone give me the hint on if/how this could be possible either with my current gcc/qtcreator setup (which I don't think is possible) or under xcode?
If you're using Cocoa Qt (there are 2 versions of Qt - Cocoa and Carbon, remember that!), you can use winId() on QWidget class to retrieve native widget handle.
On Qt Carbon QWidget::winId() returns HIViewRef, on Qt Cocoa it return NSView. I gues you can retrieve somehow NSWindow from NSView
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With