<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font face="Helvetica, Arial, sans-serif">On 2/6/23 4:48 AM, Phil
Thompson wrote:
<blockquote type="cite">On 06/02/2023 02:16, Stephen Waterbury
wrote:
<br>
<blockquote type="cite">According to the C++ documentation
<br>
<br>
<a class="moz-txt-link-freetext" href="https://doc.qt.io/archives/qt-5.12/qstandarditemmodel.html#headerData">https://doc.qt.io/archives/qt-5.12/qstandarditemmodel.html#headerData</a>
<br>
<br>
... it takes 2 positional args (section, orientation) and 1
keyword arg
<br>
(role). If I call it with the 2 positional args, I get a
traceback saying
<br>
<br>
TypeError: headerData() missing 1 required positional
argument: 'role'
<br>
<br>
Did pyqt define the 'role' arg as positional? And if so,
why?
<br>
</blockquote>
<br>
No.
<br>
<br>
Please provide a short working example that demonstrates the
problem.
<br>
<br>
Phil
<br>
</blockquote>
</font><font face="Helvetica, Arial, sans-serif">Oops. Creating
the SSCCE proved that the signature in pyqt is indeed correct --<br>
my subclass of QStandardItemModel was the culprit -- it
redefined headerData<br>
with "role" as a positional arg. Sheesh, sorry for the noise!
:/</font></p>
<p><font face="Helvetica, Arial, sans-serif"><br>
</font></p>
</body>
</html>