Closed TilmanK closed 2 years ago
@bluebird75 Go ahead, it's complete. I've confirmed in simple examples that the changes are correct - you can really build complex widget structures just by passing None around ;)
Nice.
Unrelated but I want to get started on PyQt6-stubs. Can you rejoin the thread on #69 ? I see that you have a repo with some code for it.
I believe QTableWidget.cellWidget
should return Optional[QWidget]
, not List[QWidget]
. Can someone confirm that List[QWidget]
was a mistake, or am I wrong?
(I already wrote an inline comment here, but I'm not sure if this triggered a notification for anybody involved.)
https://doc.qt.io/qt-5/qtablewidget.html#cellWidget
[QWidget](https://doc.qt.io/qt-5/qwidget.html#QWidget) *QTableWidget::cellWidget(int row, int column) const
Looks like it shouldn't be a List
, yeah. It doesn't clearly state that the pointer can be NULL
, but I'd guess it can be. Maybe you could explore at runtime to double check? And provide a pr?
Created #198.
Ok, so here's the PR. I've tested every method and indeed every one of them either returns a
None
when called with invalid values or acceptsNone
as argument, which is convenient regarding use-cases like this:I'll update the PR later today with fixes for
QListWidget
andQTreeWidget
as well.