views:

86

answers:

1

Hello everybody,

I am using QT Jambi (java) to make screenshots of a browser window. My main method starts the framework like this:

QApplication.initialize(new String[1]);

ScreenshotMain widget = new ScreenshotMain(); widget.showFullScreen(); QApplication.exec();

and when the browser is done with the loading the following method is invoked and takes the screenshot.

public void loadDone() { // Taking screenshot QPixmap pixmap; pixmap = QPixmap.grabWidget(browser);

pixmap.save(writeTo, "png"); System.out.println("Made screenshot "+writeTo);

browser.loadProgress.disconnect(this); browser.loadFinished.disconnect(this); QApplication.closeAllWindows(); }

My question now is the following:How can I make screenshots out of an application without having to open a browser window, have it load the content. The idea is that I have a server application and I don´t want to open a window to make the screenshot.

Does anyone of you have experience to make screenshots using QT Jambi in this way.

Thanks a lot for your help Marc

A: 

This might be what you are looking for: linky

Nubsis