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

2019-06-22 13:54发布

问题:

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.



标签: c++ qt4