[Interest] application appearance changing when laptop goes in saving energy mode
maitai
maitai at virtual-winds.org
Mon Nov 9 16:45:43 CET 2015
Thanks Robert for your reply,
In fact I succeeded to reproduce partly the problem. I have a laptop
with 2 graphic cards, switchable. Whenever the PC goes in power-saving
mode, it switches to the intel one. When this happens, my menubar
(regular QMenuBar) is changing font and becomes ugly, and the only way
to get it back to normal is to restart the application. It seems to
happen also from time to time if I switch from external monitor to
laptop monitor.
This app is not using opengl, it's just a plain QWidget app.
No signal or event as far as I can see is triggered when this happens,
just a paintEvent it seems.
The funny thing is that even QtCreator is impacted by that... It also
changes font or style.
Any clue on what is going on there?
Thanks
Philippe Lelong
Le 09-11-2015 12:03, Robert Iakobashvili a écrit :
> On Mon, Nov 9, 2015 at 7:54 AM, maitai <maitai at virtual-winds.org>
> wrote:
>>
>> Hello
>>
>> On Windows, some users are reporting that the application style (font?
>> palette?) is changing when laptop goes in energy saving mode, and
>> becomes more or less unreadable (white font on white background, etc).
>> I have seen that myself also a couple of times but I'm unable to
>> reproduce it.
>>
>> When it occurs, putting the laptop back on power does not fix
>> anything, and the only way to get back the proper appearance is to
>> restart the application. If you start the application when in battery
>> saving mode, no problem. The application is widget-based (QMainWindow,
>> QGraphicalScene, QMenubar, etc), Qt is 5.5.1 but that was reported
>> also with previous Qt versions.
>>
>> As I said this occurs only for a few users, and I cannot reproduce it.
>> Maybe it's connected with the laptop changing GPU, I don't know.
>>
>> Does anyone knows what could possibly trigger this, and if I can catch
>> it somehow either to avoid it or reload style/palette/font/etc when it
>> occurs?
>>
>> Thanks
>> Philippe Lelong
>
>
> Hi,
>
> With which options Qt was configured and built?
>
> Any plugins your software is using?
>
> Is it correlating with any particular Windows versions
> like on Windows-10 or 8.1?
>
> That sounds like an aggressive memory optimization by OS.
> Locking in memory sometimes could help against.
>
> There is a Qt signal
>
> QGuiApplication::on_applicationStateChanged(Qt::ApplicationState
> state);
>
> and using it on Android.
>
> Perhaps, coming to the state:Qt::ApplicationActive from
> somewhere else and reloading fonts, etc could be a work-around?
>
> Kind regards,
> Robert
More information about the Interest
mailing list