Skip to content

Commit 16bb4e0

Browse files
committed
Docs updates.
1 parent d5a3df3 commit 16bb4e0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

app_table_people.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, first, middle, last, age, height_mm):
2929
class PeopleModel(QAbstractTableModel):
3030
"""Tells Qt how our person data corresponds to different rows/columns/cells.
3131
32-
From the Qt documentation:
32+
From the Qt documentation (for editable tables):
3333
When subclassing QAbstractTableModel, you must implement rowCount(),
3434
columnCount(), and data(). Default implementations of the index()
3535
and parent() functions are provided by QAbstractTableModel.

app_table_word_pairs.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616

1717

1818
class WordPairModel(QAbstractTableModel):
19-
"""Tells Qt how our word pair data corresponds to different rows/columns/cells."""
19+
"""Tells Qt how our word pair data corresponds to different rows/columns/cells.
20+
21+
From the Qt documentation (for display-only tables):
22+
When subclassing QAbstractTableModel, you must implement rowCount(),
23+
columnCount(), and data(). Default implementations of the index()
24+
and parent() functions are provided by QAbstractTableModel.
25+
Well behaved models will also implement headerData().
26+
"""
2027

2128
def __init__(self, user_data):
2229
super().__init__()
@@ -93,14 +100,7 @@ def set_new_pair_data(self, user_data):
93100

94101

95102
class CustomWidget(QWidget):
96-
"""A widget that shows a simple table of word pairs
97-
98-
From the Qt documentation:
99-
When subclassing QAbstractTableModel, you must implement rowCount(),
100-
columnCount(), and data(). Default implementations of the index()
101-
and parent() functions are provided by QAbstractTableModel.
102-
Well behaved models will also implement headerData().
103-
"""
103+
"""A widget that shows a simple table of word pairs"""
104104

105105
def __init__(self):
106106
super().__init__()

0 commit comments

Comments
 (0)