[PyQt] QML constant with PyQt

Phil Thompson phil at riverbankcomputing.com
Wed Oct 16 12:36:56 BST 2013


On Wed, 16 Oct 2013 13:26:40 +0200, Alexander Rössler
<mail.aroessler at gmail.com> wrote:
> Hello,
> 
> How can I create a constant accessible in QML 
> without an object using PyQt? In C++ I would use 
> Q_ENUMS(). Creating a read-only property does 
> not work since it needs an object.

Have you tried using QtCore.Q_ENUMS()?

Phil


More information about the PyQt mailing list