[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How to snapshot a menu?
From:       Thiago Macieira <thiago () kde ! org>
Date:       2009-07-30 13:22:41
Message-ID: 200907301522.49091.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Em Quinta-feira 30 Julho 2009, ās 10:22:39, Anne Wilson escreveu:
> On Thursday 30 July 2009 09:07:33 Andreas Theofilu wrote:
> > Hi,
> >
> > I'm currently writing the users manual for my application and want to
> > show parts of opened menus. But it seems not possible to make a snap shot
> > of an open menu. Is there a way to do that?
>
> Using ksnapshot, set a delay of, say, 5 seconds, giving you plenty of time
> to open the menu.  You may be able to get the menu by snapshotting the
> window under the cursor, but you may have to take the whole desktop and
> just crop to the bit you want.

There's another option, but *only* if you built Qt in debug mode. Run the 
application with the -nograb option. Then you can tab out of the menu and use 
ksnapshot to screenshot the application.

The reason you're having problem is because menus and any kind of popup grab 
the X server, to make sure that it disappears when you click somewhere else. 
So you can't have a menu shown and tab out of the application. However, the -
nograb option disables that grabbing.

But the -nograb option is only available in debug builds of Qt, since it's 
meant for testing applications. If you're running your app in the debugger, -
nograb is the default, even, since your application may stop execution while a 
popup is shown.

If the application stops execution with the X server grabbed, you can't click 
anywhere.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Software
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic