Re: [Interest] Are Qt.transparent and "transparent" different colors?

2021-04-12 Thread Giuseppe D'Angelo via Interest

On 07/04/2021 12:09, Tor Arne Vestbø wrote:

Yes, please file a bug about this.


https://bugreports.qt.io/browse/QTBUG-92588

Cheers,

--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Are Qt.transparent and "transparent" different colors?

2021-04-12 Thread Tor Arne Vestbø


> On 27 Mar 2021, at 14:40, Giuseppe D'Angelo via Interest 
>  wrote:
> 
> On 27/03/2021 11:58, Alexander Dyagilev wrote:
>> Hmmm... What is this enum for then?
> 
> In C++ APIs, it's used in QColor's constructor.
> 
> In QML, enumeration types are strange beasts (and I wish they weren't), 
> sometimes being enum and sometimes being integers. I suggest to open a bug 
> report suggesting to add a Qt::Color -> color type construction (assuming 
> it's possible), because it's indeed supposed to "just work". (On the other 
> hand, clearly, int->color should never work.)

Yes, please file a bug about this.


Cheers,
Tor Arne

> 
> Thanks,
> -- 
> Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Are Qt.transparent and "transparent" different colors?

2021-03-27 Thread Giuseppe D'Angelo via Interest

On 27/03/2021 11:58, Alexander Dyagilev wrote:

Hmmm... What is this enum for then?



In C++ APIs, it's used in QColor's constructor.

In QML, enumeration types are strange beasts (and I wish they weren't), 
sometimes being enum and sometimes being integers. I suggest to open a 
bug report suggesting to add a Qt::Color -> color type construction 
(assuming it's possible), because it's indeed supposed to "just work". 
(On the other hand, clearly, int->color should never work.)


Thanks,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Are Qt.transparent and "transparent" different colors?

2021-03-27 Thread Alexander Dyagilev

Hmmm... What is this enum for then?

On 3/27/2021 1:27 PM, Giuseppe D'Angelo via Interest wrote:

On 27/03/2021 07:00, Alexander Dyagilev wrote:

Rectangle {color: "transparent"} - getting transparent rectangle


This is fine.


Rectangle {color: Qt.transparent} - getting rectangle filled with white
color


This one is illegal. You can't set an enum or an int to a "color" type 
in QML.


https://doc.qt.io/qt-5/qml-color.html

You are getting an error message on the console.

HTH,

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Are Qt.transparent and "transparent" different colors?

2021-03-27 Thread Giuseppe D'Angelo via Interest

On 27/03/2021 07:00, Alexander Dyagilev wrote:

Rectangle {color: "transparent"} - getting transparent rectangle


This is fine.


Rectangle {color: Qt.transparent} - getting rectangle filled with white
color


This one is illegal. You can't set an enum or an int to a "color" type 
in QML.


https://doc.qt.io/qt-5/qml-color.html

You are getting an error message on the console.

HTH,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Are Qt.transparent and "transparent" different colors?

2021-03-27 Thread Alexander Dyagilev

Hello,

Why the same name then?

Rectangle {color: "transparent"} - getting transparent rectangle

Rectangle {color: Qt.transparent} - getting rectangle filled with white 
color


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest