Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Prevent QGuiApplication with eglfs from repainting the screen
Qt 6.11 is out! See what's new in the release blog

Prevent QGuiApplication with eglfs from repainting the screen

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 3 Posters 5.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    poor_robert
    wrote on last edited by
    #1

    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();
    pView->show();
    

    }

    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.

    O 1 Reply Last reply
    0
    • P poor_robert

      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();
      pView->show();
      

      }

      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.

      O Offline
      O Offline
      onek24
      wrote on last edited by onek24
      #2

      @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.

      P 1 Reply Last reply
      0
      • O onek24

        @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.

        P Offline
        P Offline
        poor_robert
        wrote on last edited by
        #3

        @onek24 @onek24
        Hello,

        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...

        O 1 Reply Last reply
        0
        • P poor_robert

          @onek24 @onek24
          Hello,

          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...

          O Offline
          O Offline
          onek24
          wrote on last edited by
          #4

          @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?
          P 1 Reply Last reply
          0
          • O onek24

            @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?
            P Offline
            P Offline
            poor_robert
            wrote on last edited by
            #5

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

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

            O 1 Reply Last reply
            0
            • P poor_robert

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

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

              O Offline
              O Offline
              onek24
              wrote on last edited by onek24
              #6

              @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.

              P 1 Reply Last reply
              0
              • O onek24

                @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.

                P Offline
                P Offline
                poor_robert
                wrote on last edited by
                #7

                @onek24

                Ok.

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

                Thanks!

                O 1 Reply Last reply
                0
                • P poor_robert

                  @onek24

                  Ok.

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

                  Thanks!

                  O Offline
                  O Offline
                  onek24
                  wrote on last edited by
                  #8

                  @poor_robert

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

                  1 Reply Last reply
                  0
                  • ramnR Offline
                    ramnR Offline
                    ramn
                    wrote on last edited by ramn
                    #9

                    @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.

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved