In qt gui editor, any gui component can be morphed into certain type of other gui components. But realistically speaking what is the practical use of this option? can it be done dynamically? if yes then what is the advantage of doing that?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The practical use is to quickly convert widgets into other, similar widgets.
Let's say you have a group box filled with some widgets and you realize that you rather want a tab widget. Without morphing you would need to
- create a tab widget
- select all widgets in the group box
- copy or move them to the first page of your tab widget
- delete the group box
Simply morphing the group box into a tab widget is faster and more convenient.
Or let's say you have some check boxes and realize that the options are mutually exlusive, then you can simply morph them to radio buttons.
Etc...
It's a convenience tool.