What is the use of “morph into” in qt?

匆匆过客 提交于 2019-12-10 14:43:41

问题


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.



来源:https://stackoverflow.com/questions/6533329/what-is-the-use-of-morph-into-in-qt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!