@@ -204,7 +204,8 @@ def add_custom_widget(self, widget, widget_type=None, tab=None):
204204 #: redraw node to address calls outside the "__init__" func.
205205 self .view .draw_node ()
206206
207- def add_combo_menu (self , name , label = '' , items = None , tab = None ):
207+ def add_combo_menu (self , name , label = '' , items = None , tooltip = None ,
208+ tab = None ):
208209 """
209210 Creates a custom property with the :meth:`NodeObject.create_property`
210211 function and embeds a :class:`PySide2.QtWidgets.QComboBox` widget
@@ -218,22 +219,25 @@ def add_combo_menu(self, name, label='', items=None, tab=None):
218219 name (str): name for the custom property.
219220 label (str): label to be displayed.
220221 items (list[str]): items to be added into the menu.
222+ tooltip (str): widget tooltip.
221223 tab (str): name of the widget tab to display in.
222224 """
223225 self .create_property (
224226 name ,
225227 value = items [0 ] if items else None ,
226228 items = items or [],
227229 widget_type = NodePropWidgetEnum .QCOMBO_BOX .value ,
230+ widget_tooltip = tooltip ,
228231 tab = tab
229232 )
230233 widget = NodeComboBox (self .view , name , label , items )
234+ widget .setToolTip (tooltip or '' )
231235 widget .value_changed .connect (lambda k , v : self .set_property (k , v ))
232236 self .view .add_widget (widget )
233237 #: redraw node to address calls outside the "__init__" func.
234238 self .view .draw_node ()
235239
236- def add_text_input (self , name , label = '' , text = '' , tab = None ):
240+ def add_text_input (self , name , label = '' , text = '' , tooltip = None , tab = None ):
237241 """
238242 Creates a custom property with the :meth:`NodeObject.create_property`
239243 function and embeds a :class:`PySide2.QtWidgets.QLineEdit` widget
@@ -247,21 +251,25 @@ def add_text_input(self, name, label='', text='', tab=None):
247251 name (str): name for the custom property.
248252 label (str): label to be displayed.
249253 text (str): pre filled text.
254+ tooltip (str): widget tooltip.
250255 tab (str): name of the widget tab to display in.
251256 """
252257 self .create_property (
253258 name ,
254259 value = text ,
255260 widget_type = NodePropWidgetEnum .QLINE_EDIT .value ,
261+ widget_tooltip = tooltip ,
256262 tab = tab
257263 )
258264 widget = NodeLineEdit (self .view , name , label , text )
265+ widget .setToolTip (tooltip or '' )
259266 widget .value_changed .connect (lambda k , v : self .set_property (k , v ))
260267 self .view .add_widget (widget )
261268 #: redraw node to address calls outside the "__init__" func.
262269 self .view .draw_node ()
263270
264- def add_checkbox (self , name , label = '' , text = '' , state = False , tab = None ):
271+ def add_checkbox (self , name , label = '' , text = '' , state = False , tooltip = None ,
272+ tab = None ):
265273 """
266274 Creates a custom property with the :meth:`NodeObject.create_property`
267275 function and embeds a :class:`PySide2.QtWidgets.QCheckBox` widget
@@ -276,15 +284,18 @@ def add_checkbox(self, name, label='', text='', state=False, tab=None):
276284 label (str): label to be displayed.
277285 text (str): checkbox text.
278286 state (bool): pre-check.
287+ tooltip (str): widget tooltip.
279288 tab (str): name of the widget tab to display in.
280289 """
281290 self .create_property (
282291 name ,
283292 value = state ,
284293 widget_type = NodePropWidgetEnum .QCHECK_BOX .value ,
294+ widget_tooltip = tooltip ,
285295 tab = tab
286296 )
287297 widget = NodeCheckBox (self .view , name , label , text , state )
298+ widget .setToolTip (tooltip or '' )
288299 widget .value_changed .connect (lambda k , v : self .set_property (k , v ))
289300 self .view .add_widget (widget )
290301 #: redraw node to address calls outside the "__init__" func.
0 commit comments