View Full Version : QGLWidget in Screensavers?

28th October 2013, 15:14
Hey folks!
I was going to write a Screensaver for Windows (7), when I ran into a few problems. Maybe someone here can help me with that.
As far as I know, a Screensaver is just some executable, that accepts the parameters "/s", "/c" and "/p", right? So I testet that, wrote little Screensavers and renamed the output file to "whatever.scr". Everything worked just fine.

The problem only occurrs, when I use OpenGL. When I run it as "*.exe"-file, it's working just fine, but as soon as I rename it to "*.scr" and execute it, some of the OpenGL elements are not displayed.
To make sure, this wasn't an error in my coding, I tried the same with a few of the Qt-Examples. Most worked fine, but there is one example called "Overpainting example". In the Background, there is a Qt-Logo, moveable by mouse. The foreground is filled with bubbles.

When I compile that example and execute it, it looks just as it should.
When I rename the "*.exe" file to "*.scr", all the bubbles are gone.

I've never written a screensaver before, so I'm not even sure, if I can just rename exe-files, but that's what I heared/read.
Can someone help me?

Btw. I'm using qt 5.1.1 with mingw48 on Windows7 x64.