Reputation: 1
I am trying to implement double click showmaximized / showNormal for my QDialog widget title bar. The dialog has to contain ContextHelpButton, so it's impossible to combine it with Qt::Window,Qt::WindowMaximizeButtonHint and Qt::WindowMinimizeButtonHint flags. I don't need the buttons to maximize and showNormal, only double click on title bar functional.
There was a great post to catch mouse click event on titlebar area Qt detecting mouse click on titleBar (Windows) I've managed to call showMaximized() and showNormal() inside native enent.
But similar functional has to work for Linux. Still haven't found the "double click on title bar" event name to catch on Linux.
I implemented small macro to divide functional for Windows and Linux. Hope it will work.
#ifdef Q_OS_WIN
// Windows functional
#endif
#ifdef Q_OS_LINUX
// linux functional
#endif
I've read a lot of similar posts, but I still haven't found a solution which would work in my conditions. Maybe someone has struggled with the same proplem, please help.
Upvotes: 0
Views: 90