洞察探索如何利用兼容微信生态的小程序容器,实现跨平台开发,助力金融和车联网行业的数字化转型。
753
2022-10-30
一个基于Qt Widgets应用程序的Visual Studio风格的停靠窗口库
DockingPanes
DockingPanes is a library for Qt Widgets that implements docking windows that have the look and feel of Visual Studio. It provides a simple API which allows an application to make use of docking windows with a few calls.
Features
Provides a central widget area for your main application windows.Allows docking windows to be docked in any position around the central widget.Allows docking windows to be docked in a tabbed "pane" to maximise space available for the central widget.Allows docking window panes to be collapsed into a button to the top, left, right or bottom of the central widget depending on the position of the docking window in the hierarchy. A fly-out mechanism allows the windows to be access by hovering over the button.Positions of windows can be stored to a variable or file which allows different configurations of windows per application context to be used and saved and restored across application runs.
Compatability
The library has only been tested under windows and may require tweaking of drawing for other platforms, however, there is no platform specific code.
Compiling
A qmake project file is provided to build the library, this allows the library to be build either inside QtCreator by opening the project or by using qmake from the command line and building native files for your build system.
Debug builds of the library are suffixed with a per platform string to allow debug and release builds to exist side by side.
Documentation
The API is designed to be simple to use and as such there is currently no documentation available. The DockingManager class contains the most useful calls.
We will add doxygen documentation as and when we are able to, however this is not a high priority.
Usage
The following is a short basic example of initialising the docking manager, creating a tool window and setting the central widget of the MainWindow to the docking manager widget.
auto centralWidget = new QLabel("Hello World");auto dockingManager = new DockingPaneManager;dockingManager->setClientWidget(centralWidget);auto toolWindowWidget = new QLabel("Hola World");auto initialSize = QSize(200,100);auto dockingWindow = dockingManager->createPane("myPaneId", "Window Title", toolWindowWidget, initialSize, DockingManager::dockFloat, nullptr);// the window is now created and managed by the docking manager. The ToolWindow returned can be used with other API calls to open or close the window and other functions.setCentralWidget(dockingManager->widget());
License
DockingPanes is licensed under the GPLv3 License, if you would like to use the library and this is not compatible then you should contact us to discuss options.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~