Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrefreshed blank screen when embedded in StackView with QNANO_USE_RENDERNODE enabled #51

Open
NielsMayer opened this issue Jan 11, 2020 · 3 comments

Comments

@NielsMayer
Copy link
Contributor

NielsMayer commented Jan 11, 2020

After enabling QNANO_USE_RENDERNODE in libqnanopainter/include.pri, a modified "HelloItem" example does not refresh the painted item, after the StackView is pop()'d. My modification is the qtcreator 4.11.0 template app "Qt Quick Application - Stack" with HelloItem as initialItem:

    StackView {
        id: stackView
        anchors.fill: parent
        initialItem:
            HelloItem {
            }
    }

When either of the stackView pages are pushed and then popped, the initial HelloItem is not refreshed and results in a blank screen. The application requires resizing to force a refresh.

Initially you see:
image

Selecting "page 1" gives:
image

Clicking the back arrow should display HelloItem but instead nothing displayed:
image

This problem seems related to #22

This is the source code of the example ( libqnanopainter/include.pri needs to be modified to enable QNANO_USE_RENDERNODE to reproduce the bug with this code):

helloitem.tar.gz

@NielsMayer
Copy link
Contributor Author

After upgrading to Qt5.15 , compilation with QNANO_USE_RENDERNODE no longer causes QNanoItems inside a StackView item to not refresh.

Therefore, I am closing this bug and assuming the problem arose from an underlying bug in Qt that got fixed in 5.15.

@NielsMayer
Copy link
Contributor Author

Although I'm leaving this bug closed, I have found cases in more complicated apps where defining QNANO_USE_RENDERNODE causes refresh problems, as well as unexpected repainting of items that do not need repainting. This includes the original behavior described in this bug of not refreshing on closing a stackview window and going back to a QNanoItem view... I'm still characterizing this problem and if I can break it down to a simple example case, I will reopen this bug.

@QUItCoding -- would it be possible to integrate my trivial changes to "HelloItem" ( https://github.com/QUItCoding/qnanopainter/files/4049840/helloitem.tar.gz ) back into your "HelloItem" example? This would allow us to see whether such refresh problems reappear on other platforms or regress on future updates to Qt. The downside is that my StackView code requires at least Qt 5.7. On the other hand, given that Qt 5.9 is EOL and no longer supported, having that level of backwards compatibility may be irrelevant at the current time.

@NielsMayer
Copy link
Contributor Author

On going back to this issue, it turns out the aforementioned example does trigger issues w/ QNANO_USE_RENDERNODE set.
Perhaps due to OS or graphics drivers updates, i'm no longer seeing any cases where QNANO_USE_RENDERNODE works reliably, unlike previously where the example doesn't trigger the issue.

For example notice also what happens to the title label in the "gallery" app -- it overlays the qnanopainter item and is not located in title bar under "images" and "Frame Buffer" pane:
Screenshot_20200724_094051
Screenshot_20200724_094113

@NielsMayer NielsMayer reopened this Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant