PyQt5 v5.15.10, PyQt6 v6.5.3, SIP v6.7.12 Available

Phil Thompson phil at riverbankcomputing.com
Tue Oct 10 14:22:36 BST 2023


It's Ok, I know what the problem is - new wheels will be uploaded later 
today.

Phil

On 10/10/2023 13:24, Florian Bruhin wrote:
> Hey,
> 
>> >
>> >
>> > PyQt6 v6.5.3
>> > PyQt6-sip v13.6.0
>> > PyQt6-Qt6 v6.5.3
>> >
>> >
>> In a Qt6 class derived from QTableView, with the slot 
>> selectionChanged,
>> under Python 3.11 (Windows), I'm getting the following error:
>> 
>> AttributeError: 'QItemSelection' object has no attribute 'length'
>> 
>> Again on Windows Qt6, in a class derived from QAbstractTableModel, 
>> when
>> emitting the signal headerDataChanged, I'm getting the following error
>> (with class name DeduplicateModel):
>> AttributeError: 'DeduplicateModel' does not have a signal with the
>> signature headerDataChanged(Qt::Orientation, int, int)
>> 
>> The code works using PySide6. It's possible I may not have decorated 
>> every
>> slot in the application, if that matters?
> 
> For what it's worth, I saw something similar pop up in my bleeding edge
> Arch Linux CI environment with:
> 
> python-pyqt6 6.5.2-1 (!)
> qt6-base 6.6.0rc-1
> 
> where:
> 
>     class FakeProcess(QProcess):
> 
>         def __init__(self, parent: QObject = None) -> None:
>             super().__init__(parent)
>             # replacing some things with mocks, but not touching
>             # self.finished
> 
> and:
> 
>     proc.finished.emit(0, QProcess.ExitStatus.NormalExit)
> 
> results in:
> 
>     AttributeError: 'FakeProcess' does not have a signal with the
> signature finished(int, QProcess::ExitStatus)
> 
> despite it clearly inheriting this from QProcess, and that working fine
> in earlier Qt/PyQt versions.
> 
> Unfortunately so far I haven't been able to reproduce locally so far,
> so I don't have a minimal reproducer.
> 
> Damon, could you maybe check if this errors out for you too?
> 
>     from PyQt6.QtCore import QProcess
>     class Process(QProcess): pass
>     proc = Process()
>     proc.finished.emit(0, QProcess.ExitStatus.NormalExit)
> 
> (and if not, maybe something with a boilerplate __init__ like above?)
> 
> Florian


More information about the PyQt mailing list