[Interest] QMenu

Igor Mironchik igor.mironchik at gmail.com
Wed Mar 29 13:57:44 CEST 2017


Hi,

It's a fade effect...

And I found only one solution:

void

MainWindow::x5()

{

QEventLooploop;

QTimer::singleShot(1000,&loop,&QEventLoop::quit);

loop.exec();


29.03.2017 13:38, Konstantin Shegunov пишет:
> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170329/717230b8/attachment.html>


More information about the Interest mailing list