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

List:       pykde
Subject:    Re: PyQt6 QIODeviceBase.openModeFlag.ReadOnly enum missing?
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2022-02-28 21:58:33
Message-ID: 5e446033bf9aea8a260b83ad8d180274 () riverbankcomputing ! com
[Download RAW message or body]

On 28/02/2022 20:35, loreprojects@gmail.com wrote:
> Hello,
> 
> 
> 
> I've been working through some PyQt5 code to trying and upgrade to the 
> PyQt6
> scenario:
> 
> I have ran into an issue with
> https://www.riverbankcomputing.com/static/Docs/PyQt6/api/qtcore/qiodevicebas
> e.html
> <https://www.riverbankcomputing.com/static/Docs/PyQt6/api/qtcore/qiodeviceba
> se.html#OpenModeFlag> #OpenModeFlag
> 
> 
> 
> Is this still to be implemented or is there something I should / 
> should-not
> be doing in place of this?
> 
> By the way, this is currently only used to fetch the qwebchannel.js 
> file.
> 
> 
> 
> Some Code:
> 
>        from PyQt6.QtCore import QIODevice, QIODeviceBase
> 
> 
> 
>        if qt_resource_file.open(QIODeviceBase.openModeFlag.ReadOnly):
> 
>            qt_resource_content =
> bytes(qt_resource_file.readAll()).decode('utf-8')
> 
> 
> 
> My error:
> 
>        AttributeError: type object 'QIODeviceBase' has no attribute
> 'openModeFlag'

OpenModeFlag not openModeFlag

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

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