本文介绍了Qt Designer中的自定义布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何,我们都可以使用自定义布局,例如如定义 https://doc.qt.io/archives/qt-4.7/examples-layouts.html

Is there anyway that we can have Custom Layouts e.g. as defined athttps://doc.qt.io/archives/qt-4.7/examples-layouts.html

在Qt Designer内?

inside the Qt Designer ?

在Qt Designer中添加此类自定义布局的过程是什么?任何人都可以指导Qt Designer中进行此类自定义增强的步骤.

What would be the process to add such custom layouts in the Qt Designer? Can anyone guide about the steps involved for such custom enhancement in Qt Designer.

推荐答案

您不能直接在QtDesigner中创建自定义布局.相反,您可以将布局编写为QtDesigner的插件.之后,您可以打开QtDesigner,然后将自己的布局与Qt集合中的任何其他小部件一样放置到表单中.

You can't create custom layout right inside QtDesigner. Instead you can write your layout as a plugin for QtDesigner. After this you can open QtDesigner and just drop your own layout to the form as any other widget in the Qt collection.

请参见此小知识,以了解如何编写自己的插件对于Qt.没那么困难.

See this quide to find out how to write your own plugin for Qt. It's not so difficult.

这篇关于Qt Designer中的自定义布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 03:17