[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: PyQt6: TypeError passing alignment kwarg to QLabel constructor
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2021-04-25 11:07:38
Message-ID: b48d2fec47399d498f1c4bcc68614b50 () riverbankcomputing ! com
[Download RAW message or body]

On 22/04/2021 10:44, Ales Erjavec wrote:
> Hi,
> 
> `QLabel(alignment=...)` call raises a "TypeError: unable to convert
> Python 'AlignmentFlag' object to C++ 'Qt::Alignment' instance":
> ```
> from PyQt6.QtCore import Qt
> from PyQt6.QtWidgets import QLabel, QApplication
> 
> app = QApplication([])
> 
> w = QLabel(alignment=Qt.AlignmentFlag.AlignLeft)
> ```
> Windows 10
> Python: 3.8.8
> PyQt6: 6.1.0.dev2104211125

Should be fixed in the next snapshot.

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic