[Interest] QMenu

Konstantin Shegunov kshegunov at gmail.com
Wed Mar 29 12:38:21 CEST 2017


Hi,

On Wed, Mar 29, 2017 at 1:22 PM, Igor Mironchik
<igor.mironchik at gmail.com> wrote:
> I run Kubuntu in VirtualBox under Win 10. And my VM a little slow. Maybe
> it's a problem of VM? Or it will be so on every Linux distribution?

I believe this is due to the differences between how messages are
processed on windows and with X11.

> How to hide menu in the slot before making screenshot on Linux?

I'd first try to queue the call instead of manually driving the event
loop, something like this:

QAction * action = addAction( QIcon( ":/img/zoom-in.png" ), tr( "2x" ));
QObject::connect(action, &QAction::trigerred, this, &MainWindow::x2,
Qt::QueuedConnection);

If that doesn't work, I'd try installing an event filter onto the menu
and execute the capture operation only *after* the menu has received
its QHideEvent.

I hope that helps.
Kind regards.



More information about the Interest mailing list