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:
// Some stuff
// more stuff
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.
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.
Do you have any ideas for tags for this thread ;)?
At the moment I do following steps:
- Create QGuiApplication,
- Load some Qml stuff and so on,
- 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...
- It's just my Signature, but sure: QGuiApplication, QQuickView, black screen
- How do you load the Qml stuff? Is the screen black for 1 second after you call show() on it?
Loading of the qml stuff is not my point here...
I only wonder how the QGuiApplication initializes the screen so it's black.
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.
Your post gave me some new ideas. I'll test and see what's the result.
You're welcome. Please share your results with us when you're done.
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.