![]() |
Qt4.6 - Something similar to "hildon_gtk_window_take_screenshot"
Hi Forum,
I wonder if there is a possibility to fake a fast application startup at Qt4.6 like the possibility we have for GTK+ applications. At GTK we could use this function to create a screenshot that is shown automatically at the next startup before the Application is loaded: Code:
void hildon_gtk_window_take_screenshot (GtkWindow *window, Is there something similar for Qt4.6 and the Maemo target? Google was so far not my friend... :( |
Re: Qt4.6 - Something similar to "hildon_gtk_window_take_screenshot"
Have a look at QPixmap::grabWindow
http://doc.qt.nokia.com/latest/qpixmap.html#grabWindow |
Re: Qt4.6 - Something similar to "hildon_gtk_window_take_screenshot"
I don't know if there's any Qt-specific method for this, but look at the function itself: http://maemo.gitorious.org/hildon/hi...-gtk.c#line478
Notice that the bits which actually request for the screenshot to be taken are calls to the X library - they're not GTK+ specific! You could replace GDK_WINDOW_XID with QWidget::winId() and look through QWidget::x11Info's display member to replace gtk_widget_get_display (as a start) But maybe there is a Qt method for this and I'm going OTT |
Re: Qt4.6 - Something similar to "hildon_gtk_window_take_screenshot"
Ooookay. :D
I played a little bit with it. I'm able to store the screen into a image file, but the rest... mmh, I gave up for the moment... I'm new to C++ and Qt, doing some testing for my first real application. My last project I used python without the knowledge what I'm really doing there. :D But thanks for the hint. I would say I will look into it later again. It's good to know. :) |
Re: Qt4.6 - Something similar to "hildon_gtk_window_take_screenshot"
|
Re: Qt4.6 - Something similar to "hildon_gtk_window_take_screenshot"
Thanks timoph and sakya, but creating a screenshot and storing it to a file is not my problem.
My problem is that Hildon doesn't automatically use this image as loading screen for the next application startup. It was discussed nearly 2 years ago here: maemo-developers-Mailinglist But it's all GTK related and I'm unable to find someting similar for Qt. (except to write it myself like jstokes has suggested.) |
All times are GMT. The time now is 21:07. |
vBulletin® Version 3.8.8