[Qt-interest] ´ð¸´: capture screen

John McClurkin jwm at nei.nih.gov
Tue Jun 15 16:47:01 CEST 2010


pengliang(ÅíÁÁ) wrote:
> Hi Luis:
>    Thank you.
> Hi Carsten:
>   Thanks for your advice.
> 
> I have modified them, but the problem still does exist.
> -----------------------------------
> if(setHideWnd == true) {
>     hide();
>     capture_screen();
>     show();
> } else {
>    Capture_screen();
> }
> ----------------------------------
> void MainWindow::capture_screen()
>  {
>       QString picture_file= QString("%1/%2").arg(save_dir).arg("picture ");
>         QPixmap fullscreenmap;
>         fullscreenmap =QPixmap::grabWindow(QApplication::desktop()->winId());
>         fullscreenmap.save(picture_file,"JPG",-1);
>  }
> -------------------------------------------
> Whether I still made some mistakes?
> 
> 
> 
> -----ÓʼþÔ­¼þ-----
> ·¢¼þÈË: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] ´ú±í Luis Lezcano Airaldi
> ·¢ËÍʱ¼ä: 2010Äê6ÔÂ13ÈÕ 0:16
> ÊÕ¼þÈË: qt-interest at trolltech.com
> Ö÷Ìâ: Re: [Qt-interest] capture screen
> 
> El 12/06/10 07:31, Carsten Breuer escribi¨®:
>> Hi pengliang,
>> hi all,
>>
>>    
>>> Please see the snippet bellow. (I want to minimizied the windows
>>> and capture the screen, but application capture screen before the window
>>> was fully minimized.) why? Can anybody tell me why? Or give me some ideas.
>>>      
Top level windows are shown or hidden by the system window manager. 
Calling show() or hide() just schedules the event with the window 
manager. The amount of time before the window manager hides or shows the 
window will depend on what is going on at the time.



More information about the Qt-interest-old mailing list