jchanvfx / NodeGraphQt

Node graph framework that can be re-implemented into applications that supports PySide2
http://chantonic.com/NodeGraphQt/
MIT License
1.27k stars 257 forks source link

Multibe drobdown/combo menus text below other dropdowns #414

Open J-Arnold opened 5 months ago

J-Arnold commented 5 months ago

Hi, I try to use multible dropdowns/combo menus in an node. I add in the example in file nodes/widget_nodes.py at line 25 additional dropdowns: self.add_combo_menu('my_menu', 'Menu Test', items=items, tooltip='example custom tooltip') self.add_combo_menu('my_menu2', 'Menu Test2', items=items, tooltip='example custom tooltip2') self.add_combo_menu('my_menu3', 'Menu Test3', items=items, tooltip='example custom tooltip3')

after starting if you select the top Dropdown the select textes are below and hidden by the other dropdowns, so it is not possible to read and select the text.

combobox issue
Yobas commented 5 months ago

I ran into a similar problem when using multiple combo boxes in the same node. It turned out that the problem is here: https://github.com/jchanvfx/NodeGraphQt/blob/a900a4b1256a4cf0791019f8796958dbf75f0df8/NodeGraphQt/widgets/node_widgets.py#L261

I think it is possible to increase the z-value for the NodeComboBox when the user opens the dropdown list and restore it when the list is hidden.

jchanvfx commented 5 months ago

Hi @J-Arnold,

I came across this issue before alternatively you could create you own custom node widget with multiple combo boxes and then embed it into the node.

See example: https://chantonic.com/NodeGraphQt/api/examples/ex_node.html#embedding-custom-widgets

Thanks @Yobas for the suggestion I'll look into implementing some kind of workaround for setting the z value.

Cheers, J

J-Arnold commented 5 months ago

Hi,

Thanks for the tip, if all dropdowns are in one Widget there is no overlay issue.