Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Mac OS X: How do you know a Drawer widget is open?



  • It's more tricky than it seems.

    You can manually "shut" a drawer window by sliding it back in. When you do that it's not visible to the user anymore, but it's still "isVisible()" according to the API. How do I know then how to distinguish between an open or "closed" drawer window?



  • From a quick research, I would say that's not possible at all.



  • One of the most popular mac text editors, TextMate has a drawer window interface and a menu option to "open" or "hide" the drawer. When open, if I manually resize the drawer past the disappearing point, the menu option will turn to "show". That tells me there is a native OSX method (or hack) to check for this.

    Could it be that something simple exists in Cocoa for this, that just hasn't been abstracted by Qt?



  • This could be the case, yes. On the other hand, I'm not sure, if Qt creates the very same cocoa objects as native OS X applications.


Log in to reply