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

Main window shows frame buffer artifacts when moving a dock widget across floating dock widget border #445

Closed
iam-peter opened this issue Aug 15, 2022 · 4 comments

Comments

@iam-peter
Copy link

iam-peter commented Aug 15, 2022

I found an issue on Linux and Windows (didn't test it on macOS) that when dragging a DockWidget across the borders of a floating DockWidget there is one frame where the rendering of the main window is wrong (see the second image frame00153). I found this while testing QtDesignStudio. In there the flickering is more noticeable probably because the rendering of the main window takes longer than the one in the demo application.

I use Qt 6.3.1.

How to reproduce:

  1. Open the demo
  2. Drag the floating dock widget (My Calender 2) on top of the main window as seen in the screenshots
  3. Grab one of the main window dock widgets (Calender 0)
  4. Hold it on top of the floating widget
  5. Move it outside (on top of the main window) and inside (on top of the floating widget) repeatedly

While moving across the floating widget border the flickering should happen.

I found a fix for it. In CDockOverlay::showOverlay before resizing the overlay it needs to be hidden by calling hide().

frame00152
frame00153
frame00154

@githubuser0xFFFF
Copy link
Owner

Thank you Henning for reporting this. I will try to fix this.

@iam-peter
Copy link
Author

iam-peter commented Aug 18, 2022

You saw that the fix is already included in the issue?

In CDockOverlay::showOverlay before resizing the overlay it needs to be hidden by calling hide().

// Move it over the target.
hide();
resize(target->size());

Just making sure you're not gone waste as much time on it as I did :)

@githubuser0xFFFF
Copy link
Owner

githubuser0xFFFF commented Aug 29, 2022

I just tested with MinGW and Qt 5.15 and could not reproduce the proplem. I will now try Qt 6.3.1.

githubuser0xFFFF added a commit that referenced this issue Aug 29, 2022
@githubuser0xFFFF
Copy link
Owner

I could not reproduce the problem with Qt 6.3.1 and MSVC 2019 but I implemented your proposed patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants