October 12, 2011

ronM71 ronM71
Lab Rat
225 posts

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?

3 replies

October 13, 2011

Volker Volker
Robot Herder
5428 posts

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

October 13, 2011

ronM71 ronM71
Lab Rat
225 posts

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?

October 14, 2011

Volker Volker
Robot Herder
5428 posts

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.

 
  ‹‹ Linking a QPlugin from another QPlugin corrupts the plugin loading?      QContextMenu over which widget? ››

You must log in to post a reply. Not a member yet? Register here!