Skip to content

Commit 760e111

Browse files
committed
doc updates
1 parent 5c8bb8a commit 760e111

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

NodeGraphQt/widgets/node_widgets.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ def get_node_widget(self):
3636

3737
class NodeBaseWidget(QtWidgets.QGraphicsProxyWidget):
3838
"""
39-
This is the main wrapper class that allows a custom ``QWidget`` to be
39+
This is the main wrapper class that allows a ``QtWidgets.QWidget`` to be
4040
added in a :class:`NodeGraphQt.BaseNode` object.
4141
42-
If you want to add your own custom widget into a node you'll need
43-
to subclass ``NodeBaseWidget`` for an example see :ref:`Embedding Custom Widgets`
42+
See :ref:`Embedding Custom Widgets` example to adding your own widget
43+
into a node.
44+
45+
Args:
46+
parent (NodeGraphQt.BaseNode.view): parent node view.
47+
name (str): property name for the parent node.
48+
label (str): label text above the embedded widget.
4449
"""
4550

4651
value_changed = QtCore.Signal(str, object)
@@ -55,12 +60,6 @@ class NodeBaseWidget(QtWidgets.QGraphicsProxyWidget):
5560
"""
5661

5762
def __init__(self, parent=None, name=None, label=''):
58-
"""
59-
Args:
60-
parent (NodeItem): parent node view. see :meth: `BaseNode.view`
61-
name (str): property name for the parent node.
62-
label (str): label text above the embedded widget.
63-
"""
6463
super(NodeBaseWidget, self).__init__(parent)
6564
self.setZValue(Z_VAL_NODE_WIDGET)
6665
self._name = name

docs/examples/ex_node.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ See: :ref:`Node Widgets` for more node widget types.
8181
Embedding Custom Widgets
8282
************************
8383

84-
Here's an example to embed a custom widget using the
85-
:meth:`NodeGraphQt.BaseNode.add_custom_widget` function and
86-
:class:`NodeGraphQt.NodeBaseWidget` class.
84+
Here's an example to embed a custom widget where we subclass the
85+
:class:`NodeGraphQt.NodeBaseWidget` and then add to the node with the
86+
:meth:`NodeGraphQt.BaseNode.add_custom_widget` function.
8787

8888
.. code-block:: python
8989
:linenos:

docs/node_widgets.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ NodeBaseWidget
1111
:members:
1212
:exclude-members: node, setToolTip, type_, value, widget
1313

14+
-----
15+
16+
Below are builtin node widgets inherited from :class:`NodeGraphQt.NodeBaseWidget`
17+
1418
NodeCheckBox
1519
************
1620

0 commit comments

Comments
 (0)