Re: [Interest] ApplicationWindow is not an Item?

2016-06-16 Thread Sze Howe Koh
On 16 June 2016 at 23:41, Jason H  wrote:
>
> I tried using Keys on an application window. I got an error that it is not an 
> item. While it's trivial to throw an item in, why isn't it an Item?

That's a design concept I wondered about too, but I think I've found
the answer: Because...

* An Item is something that can be painted and displayed inside a
window/viewport.
* An Item is a painting, but a Window is not; rather, it is a frame in
which paintings are inserted.
* Qt draws Items itself, while it relies on the operating system to
draw Windows.


Regards,
Sze-Howe
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] ApplicationWindow is not an Item?

2016-06-16 Thread ekke
Am 16.06.16 um 18:08 schrieb J-P Nurmi:
>>> On 16 Jun 2016, at 17:42, Jason H  wrote:
>>>
>>> I tried using Keys on an application window. I got an error that it is not 
>>> an item. While it's trivial to throw an item in, why isn't it an Item?
>> Because QML Window is not an Item. I'd like the Keys attached property work 
>> regardless, though. It should just forward it to the content item of the 
>> window. This has been discussed several times, but I don't remember why it 
>> wasn't done yet.
> A good point in the comments of https://bugreports.qt.io/browse/QTBUG-28957 
> that you're probably better off with the Shortcut QML type.
Shortcuts are working great - can confirm from my example apps tested on
Android (BlackBerry PRIV with keyboard)
>
> --
> J-P Nurmi
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

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


Re: [Interest] ApplicationWindow is not an Item?

2016-06-16 Thread J-P Nurmi

>> On 16 Jun 2016, at 17:42, Jason H  wrote:
>> 
>> I tried using Keys on an application window. I got an error that it is not 
>> an item. While it's trivial to throw an item in, why isn't it an Item?
> 
> Because QML Window is not an Item. I'd like the Keys attached property work 
> regardless, though. It should just forward it to the content item of the 
> window. This has been discussed several times, but I don't remember why it 
> wasn't done yet.

A good point in the comments of https://bugreports.qt.io/browse/QTBUG-28957 
that you're probably better off with the Shortcut QML type.

--
J-P Nurmi
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] ApplicationWindow is not an Item?

2016-06-16 Thread J-P Nurmi

> On 16 Jun 2016, at 17:42, Jason H  wrote:
> 
> I tried using Keys on an application window. I got an error that it is not an 
> item. While it's trivial to throw an item in, why isn't it an Item?

Because QML Window is not an Item. I'd like the Keys attached property work 
regardless, though. It should just forward it to the content item of the 
window. This has been discussed several times, but I don't remember why it 
wasn't done yet.

--
J-P Nurmi
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] ApplicationWindow is not an Item?

2016-06-16 Thread Jason H
I tried using Keys on an application window. I got an error that it is not an 
item. While it's trivial to throw an item in, why isn't it an Item?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest