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

Can you add Auto Hide functionality? #147

Closed
libaineu2004 opened this issue Apr 14, 2020 · 28 comments
Closed

Can you add Auto Hide functionality? #147

libaineu2004 opened this issue Apr 14, 2020 · 28 comments

Comments

@libaineu2004
Copy link

Can you add the function of automatically hiding and docking?
The following four states can be switched:
Float
Dock
Hide
Auto Hide

for example:Qt-Auto-Hide-DockWidget
https://github.com/anyox/Qt-Auto-Hide-DockWidget

@githubuser0xFFFF
Copy link
Owner

Could you please elaborate what is your use case for this kind of functionality?

@libaineu2004
Copy link
Author

Could you please elaborate what is your use case for this kind of functionality?

Flexible and dockable widgets for Qt5, like Visual Studio 2017 user interface.
https://github.com/JackyDing/QtFlex5

@libaineu2004
Copy link
Author

Could you please elaborate what is your use case for this kind of functionality?

Sometimes the computer screen is small, you need to hide part of the form, so that you can easily see the form of interest.

@githubuser0xFFFF
Copy link
Owner

Ok, I understand. You do not need this feature for yourself and you do not have an urgent need for this feature. You just think it would be nice to have it in the library.

I will check what I can do.

@libaineu2004
Copy link
Author

Ok, I understand. You do not need this feature for yourself and you do not have an urgent need for this feature. You just think it would be nice to have it in the library.

I will check what I can do.

In fact, my need is to add an automatic hide button to the dockwidget. After the mouse clicks the button, the dockwidget will be hidden, and then there will be a sidebar toolbar on the left or right or bottom side. The toolbar has buttons. When this button is pressed After that, the dockwidget will be displayed again.

@gitatomic
Copy link

Was just about to ask for that feature exactly. I'm in the process of porting my project GitAtomic to Qt and this is simply a "must have" not just, nice to have. This is standard behavior.

@githubuser0xFFFF
Copy link
Owner

githubuser0xFFFF commented May 1, 2020

Ok, I think, I will try to implement this feature, but this will take some time (some weeks). If you need it urgently, you may try QTitanDocking. I think, they have this feature. Or you could donate 20$ or more via the donate button on the front page of this project, to indicate that this feature is really important and urgent for you and that you would like me to spend some spare time immediately to implement this feature for you.

Btw, what do you mean with "This is standard behaviour"?

@gitatomic
Copy link

Hi, Thank you for reply. Will donate 40$ with great pleasure as I believe we devs need to support each other (will do it after the COVID situation is finished).
As for standard behavior. What I meant by that is that in virtually every docking system you have the "hiding" of panels as a standard/expected feature. That's why for example QTitanDocking have it. As well as Visual Studio and others. Well, even QT Creator even though it doesn't have real docking system (really missed opportunity and great pity) yet it allows to hide its panels.

Once again, thank you for your reply and wish you good health in those strange times.

@Folling
Copy link

Folling commented May 2, 2020

I second this proposal. It would be very nice to have. However, there could be an intermediate solution that should be a lot simpler to implement:
Dear ImGui allows you to hide the tab panel but leaves a small triangle at the top-left. Clicking that triangle re-shows the tab area.
It's a very simple and elegant solution to this problem, and could serve as a nice basis until more sophisticated solutions are in place.

@gitatomic
Copy link

@Folling I completely disagree with "so called" intermediate solution idea. From the experience I know that:
a) Time (even fraction of it) spent on that intermediate solution would be better spend on proper solution. There is no point in implementing something that would be in short time replaced. It simply a waste of time.
b) More often than not, those "intermediate solutions" become the "final solutions" and users suffer with that for years.

@libaineu2004
Copy link
Author

I found a temporary solution, github has an open source project of golang IDE: https://github.com/visualfc/liteide
This project also implements DockWidget, the source files are as follows:
https://github.com/visualfc/liteide/tree/master/liteidex/src/liteapp/tooldockwidget.cpp
https://github.com/visualfc/liteide/tree/master/liteidex/src/liteapp/sidewindowstyle.cpp

But I hope Qt-Advanced-Docking-System can do better than it!
@githubuser0xFFFF
Looking forward to your good news!

@gitatomic
Copy link

@libaineu2004 Could you please explain how would that be a temporary solution? And to which/whos problem?

@libaineu2004
Copy link
Author

@libaineu2004 Could you please explain how would that be a temporary solution? And to which/whos problem?

I mean https://github.com/visualfc/liteide, this project also has dockwidget. But I prefer to use
Qt-Advanced-Docking-System. I hope
Qt-Advanced-Docking-System improves the hiding and docking functions.

@githubuser0xFFFF
Copy link
Owner

githubuser0xFFFF commented May 4, 2020

I just checked LiteIDE and it is completely different from what you see in Visual Studio. In Visual Studio an Auto Hide Window is overlayed in layer above the normal docked Windows - so that means it does not change the docking layout. The LiteIDE behaviour is completely different.

I'm not going to implement a temprary solution. If I start implementing this feature, then it will be a final solution.

@gitatomic
Copy link

@githubuser0xFFFF Smart choice ;)

@gitatomic
Copy link

@githubuser0xFFFF Just to clarify on auto hide. In VS and GitAtomic (which I believe has it implemented the way it should be) if you hide a panel it will hide to the side it is docked to, not always above the window as you suggested in your last comment.

@githubuser0xFFFF
Copy link
Owner

Sorry, I used the wrong wording. With above I mean the Z order. That means the the auto hide widget is overlayed in a layer over the normal dock layout.

@gitatomic
Copy link

@githubuser0xFFFF Perfect!

@libaineu2004
Copy link
Author

Yes. The Dockwidget of LiteIDE and Visual Studio are completely different.

Looking forward to your excellent work!@githubuser0xFFFF

@githubuser0xFFFF githubuser0xFFFF changed the title Can you add the function of automatically hiding and docking? Can you add Auto Hide functionality? May 4, 2020
@hs-apotell
Copy link

Is this feature in development? Anything we can do to prioritize it's delivery?

@githubuser0xFFFF
Copy link
Owner

The feature is under development in the autohide branch and it already has the highest priority.

@hs-apotell
Copy link

@githubuser0xFFFF Any update on this? It's nearly 7 months since the last comment on this issue. Is this still work in progress or is this work shelved?

@githubuser0xFFFF
Copy link
Owner

@hs-apotell The work is not shelved. I really would like to implement this feature and I already started work in the autohide branch. But it is no feature that is required by the product that I maintain in my job so it is a pure sparetime mission to implement this. So it is difficult to spend a lot of time on this feature. But I still hope that I can implement it in the near future.

@hs-apotell
Copy link

@githubuser0xFFFF Could you pen down some thoughts/approach on how you think this should be implemented. May be one of us can contribute the feature, with some guidance from your end.

@zjl955
Copy link

zjl955 commented Apr 19, 2022

Is this feature in development? Looking forward to your results!

@githubuser0xFFFF
Copy link
Owner

At the moment I do not work on this feature so do not expect any results in the near future

@githubuser0xFFFF
Copy link
Owner

Added inittial implementation in branch https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/tree/auto_hide_feature.

The branch was created based on the pull request #452

@githubuser0xFFFF
Copy link
Owner

I close the issue, because this feature is under active development

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

6 participants