[Development] QML: Why C++11 scoped enums are not scoped in QML ?
BogDan Vatra
bogdan at kdab.com
Tue Jul 26 17:00:50 CEST 2016
Hi,
Thanks for the super quick reply !
I created a bug report for you here https://bugreports.qt.io/browse/
QTBUG-54961 .
Cheers,
BogDan.
On marți, 26 iulie 2016 14:54:46 EEST Simon Hausmann wrote:
> Hi,
>
>
> By the time this aspect of the QML engine was implemented, C++11 scoped
> enums did not exist. I think it would be fine
>
> to add this feature to the JavaScript bindings for C++ classes.
>
>
> Simon
>
> ________________________________
> From: Development <development-bounces+simon.hausmann=qt.io at qt-project.org>
> on behalf of BogDan Vatra <bogdan at kdab.com> Sent: Tuesday, July 26, 2016
> 4:50:38 PM
> To: development at qt-project.org
> Subject: [Development] QML: Why C++11 scoped enums are not scoped in QML ?
>
> Hi,
>
> Is there any reason why C++11 scoped enums are not scoped in QML ?
> If I have something like the following code in C++
>
> class MyClass : public QObject
> {
> Q_OBJECT
> public:
> enum class MyEnum : uint16_t {
> Val1,
> Val2,
> }
> Q_ENUM(MyEnum)
> );
>
> // register the class
>
> I'd like to use it in QML as:
> console.log(MyClass.MyEnum.Val1)
> not as
> console.log(MyClass.Val1)
>
> Cheers,
> BogDan.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list