minimizeButtonPressed() doesn't work when minimized at panel


#1

I implement the function

void minimizeButtonPressed(){ // do smth }
it works ok when I click the button “_” at the top right corner of my window.
But when I right-click the rectangle at the bottom system panel and choose “minimize” - it doesn’t call my function.


#2

Yeah, like it says in the comments, that’s a callback for the actual minimise button. If you need to know when the state changes for other reasons, there’s a minimisationStateChanged method too.


#3

Thank you, I had to read the documentation more accurately :slight_smile: