Auto hide feature by SyarifFakhri · Pull Request #452 · githubuser0xFFFF/Qt-Advanced-Docking-System
- Added main functionality for auto hiding docks
- Auto hide toggle button is added in the dock area titlebar
- Side tab bars are added to the left and right of each window
- Add config for enabling the auto hide button, left side bar area and the right side bar area
- Add logic for save state and restore state with the auto hide functionality
Syarif Fakhri added 5 commits
September 7, 2022 10:12Fix bug where pin and unpin doesn't work
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed all build issues that occured when building your pull request on my Windows machine with qmake and pushed everything to a new branch auto_hide_feature
Thank you for this big merge request with a great new feature. I fixed all build issues in your pull request that occured when building everything on Windows with MinGW and qmake.
When I run the demo application on WIndows to test the feature, I can see an issue that I will document in the next days.
The current implementation has a bug, that causes a wrong painting on Windows. To reproduce this, execute the following steps:
Because you implemented the feature, it is easier for you to find the problem.
Thanks for reviewing it so quickly! I will merge this with the auto hide branch you created and look into the issues you brought up. Please let me know if you find anything else :). I'm still testing this, so I will post more bug fixes as I go along, will let you know once it's fully ready for review!
Syarif Fakhri added 14 commits
September 8, 2022 11:18edge border when not selected
widgets when toggling overlay Also centralized and simplified the logic for the title bar button visibility
@SyarifFakhri Thank you for your contribution. I'm closing the pull request now because development now takes place in the autohide_feature branch.
@SyarifFakhri Thank you. Fixed it. Please test.
I have a question. In qmake I can add an RC file on Windows with the RC_FILE statement (see demo.pro RC_FILE += app.rc). Do you know how to add this for a CMake file?
@githubuser0xFFFF I did find one more issue while testing this. If you open an auto hide dock tab and open the context menu as shown:

Then click anywhere inside the dock but outside the context menu, the dock will collapse.
I believe that's due to this code here:
| if (widget && widget->window() != this->window()) |
The context menu is considered as a different window, so it closes. I think one fix would be to check if the widget is a descendant of the auto hide widget, and don't collapse it if it is perhaps?
@SyarifFakhri Thank you - good catch. I changed the implementation now. Now the auto hide container is not closed, if the user clicks into another floating window. It will only get closed in the following cases:
- user clicks in the same dock container but outside of the auto hide widget
- user clicks the auto hide tab
- user starts dragging a floating widget that is not the container of this auto hide widget
- user starts dragging a docked widget
Please test, if this is ok for you.
@SyarifFakhri I noticed that there are still some things, that needs to get fixed with hiding the auto hide widget
@SyarifFakhri Ok, I think I finally fixed the eventFilter function ion auto hide widget to work properly. Please test.
@yuriyoung Just read the manual and play around with the demo application and you will find it out in some minutes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
