Prevent QGuiApplication with eglfs from repainting the screen

  • Hello Qt users and developers,

    On our device we call application with eglfs paramater.
    I have following problem:
    In my project I have following main() function:

    QGuiApplication oApp(....);
    // A
    // Some stuff
    // more stuff
    // B

    QQuickView* pView = new QQuickView();


    My problem is that operations between A and B take like 10 s. For this time the QGuiApplications does something what sets the screen to black. Do You have any idea if there is any flag or setting that will prevent from such behaviour. I tried some splash solutions, but the black screen is still there (for 1 s).

    I will be grateful for any hint.

  • @poor_robert

    You mean there is a black screen for 1 second between the creation of the qquickview and the actual display of the content?
    Maybe your QML code takes too long to load? Have you tried just displaying for example a simple red rectangle.

  • @onek24 @onek24

    1. Do you have any ideas for tags for this thread ;)?

    2. At the moment I do following steps:

      1. Create QGuiApplication,
      1. Load some Qml stuff and so on,
      1. Create QQuickView and call show() on it,

    I've tried some splash screen solutions just after point 1: the applications is being run on the device so I just sent some image to /dev/fbo .

    But there is still this black screen for 1 second as mantioned before.

    I think that QGuiApplications repaints or clears screen. I wonder if there is any option to stop this behaviour...

  • @poor_robert

    1. It's just my Signature, but sure: QGuiApplication, QQuickView, black screen
    2. How do you load the Qml stuff? Is the screen black for 1 second after you call show() on it?

  • @onek24
    Loading of the qml stuff is not my point here...

    I only wonder how the QGuiApplication initializes the screen so it's black.

  • @poor_robert

    Afaik QGuiApplication initializes no screen(window?) at all.

    QGuiApplication's main areas of responsibility are:

    • It initializes the application with the user's desktop settings, such as palette(), font() and styleHints(). It keeps track of these properties in case the user changes the desktop globally, for example, through some kind of control panel.
    • It performs event handling, meaning that it receives events from the underlying window system and dispatches them to the relevant widgets. You can send your own events to windows by using sendEvent() and postEvent().
    • It parses common command line arguments and sets its internal state accordingly. See the constructor documentation below for more details.
    • It provides localization of strings that are visible to the user via translate().
    • It provides some magical objects like the clipboard().
    • It knows about the application's windows. You can ask which window is at a certain position using topLevelAt(), get a list of topLevelWindows(), etc.
    • It manages the application's mouse cursor handling, see setOverrideCursor()
    • It provides support for sophisticated session management. This makes it possible for applications to terminate gracefully when the user logs out, to cancel a shutdown process if termination isn't possible and even to preserve the entire application's state for a future session. See isSessionRestored(), sessionId() and commitDataRequest() and saveStateRequest() for details.

    For further informations about the QGuiApplication check it's docs.

    If you remove the QQuickView then you will have no Gui at all. So the first time your Gui will be initialized is when you create your QQuickView.

  • @onek24


    Your post gave me some new ideas. I'll test and see what's the result.


  • @poor_robert

    You're welcome. Please share your results with us when you're done.

  • @poor_robert

    I'm facing exactly the same problem. Have you solved this? How did you get rid of that black screen? Thanks.

    Sorry for posting in a year old thread.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.