Reply
Thread Tools
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#1
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,
                                                         gboolean take);
But, as the function name said, it works only for GTK Applications.
Is there something similar for Qt4.6 and the Maemo target?

Google was so far not my friend...
__________________
I was a Qt Ambassador!

Please DONATE if you like my work!
It's the best way to motivate me to create more stuff for your Device.
 

The Following User Says Thank You to helex For This Useful Post:
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#2
Have a look at QPixmap::grabWindow
http://doc.qt.nokia.com/latest/qpixmap.html#grabWindow
 
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#3
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
 

The Following User Says Thank You to jstokes For This Useful Post:
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#4
Ooookay.
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. But thanks for the hint. I would say I will look into it later again. It's good to know.
__________________
I was a Qt Ambassador!

Please DONATE if you like my work!
It's the best way to motivate me to create more stuff for your Device.
 

The Following User Says Thank You to helex For This Useful Post:
Posts: 415 | Thanked: 732 times | Joined on Jan 2009 @ Finland
#5
 
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#6
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.)
__________________
I was a Qt Ambassador!

Please DONATE if you like my work!
It's the best way to motivate me to create more stuff for your Device.
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:49.