Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML Screen Problems



  • Re: Screens Info
    Hi to everyone,
    I've still a problem with a qml application that has to work in a multiple screens.
    Under Windows os the problem is limited to a screen resolution. In ubuntu with KDE environment, the application starts with right proportion in the primary screen, when I move the window under the second screen the proportion breaks and Qt gives the following warning/error:

    QPainter::begin: Paint device returned engine == 0, type: 3
    QPainter::setFont: Painter not active
    QPainter::save: Painter not active
    QPainter::setRenderHint: Painter must be active to set rendering hints
    QPainter::setPen: Painter not active
    QPainter::restore: Unbalanced save/restore

    Do you have any idea? That's quite strange!

    Thx so much,
    Alessio


  • Moderators

    @Alessio-V. said in QML Screen Problems:

    Paint device returned engine == 0, type: 3

    This may not help but there are some bugs with linux and multiple monitors. These are old but you could be experiencing something like this.

    https://forum.kde.org/viewtopic.php?f=66&t=127244



  • Hi @ambershark,
    thanl you so much for your reply.
    Maybe I understood the problem and so does resolved itself.
    I started to develop in windows where the Qt gives the screen sizes in this way:

    • The first screen with its right sizing.

    • The second one with sizing equal to the sum of the two screens.

    For this reason I applied a workaround to have the right resolution for both screens.
    Instead in Ubuntu OS Qt gives the right proportion for both screens, so the workaround made the strange behavior described in my opening post.
    In this way I had to insert an #ifdef condition depending on the OS.

    Thanx!


Log in to reply