QML Popup overlay not available in AppStudio v3.1?

874
3
Jump to solution
10-09-2018 01:56 PM
by Anonymous User
Not applicable

I'm trying to use the standard QML Popup object in an AppStudio project, using AppStudio 3.1.134. 

There should be an attached property Overlay, but it doesn't seem to work. According to the QML docs (and the inbuilt F1 help within Qt Creator as installed by AppStudio) this property should be available from Qt 5.10 and this version of AppStudio is using 5.11 I think.

Can anyone shed any light on why this isn't working?

Popup QML Type | Qt Quick Controls 2 5.11 

simple example that doesn't work for me:

 Popup {        id: popup          parent: Overlay.overlay          x: Math.round((parent.width - width) / 2)        y: Math.round((parent.height - height) / 2)        width: 100        height: 100    }

Cheers,

-Paul

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
ErwinSoekianto
Esri Regular Contributor

Paul,

I tested this, I could reproduce the issue you reported when using QtQuick.Controls 2.1, you need to upgrade the import statement to use QtQuick.Controls to version 2.4 as stated in the QML Popup documentation

import QtQuick.Controls 2.4

Let me know if this works on your side. 

Erwin. 

View solution in original post

0 Kudos
3 Replies
ErwinSoekianto
Esri Regular Contributor

Paul,

I tested this, I could reproduce the issue you reported when using QtQuick.Controls 2.1, you need to upgrade the import statement to use QtQuick.Controls to version 2.4 as stated in the QML Popup documentation

import QtQuick.Controls 2.4

Let me know if this works on your side. 

Erwin. 

0 Kudos
by Anonymous User
Not applicable

Hi Erwin

Thanks - yes it does seem to work.

I got confused and didn't think that Controls 2.4 was installed (so didn't try it!), as the Qt Creator intellisense for me only indicates up to 2.2 is installed, and therefore also the Overlay.overlay doesn't color the text green in the UI as you'd normally expect if it was installed. But if I just ignore that and change it to 2.4 anyway then it works.

0 Kudos
by Anonymous User
Not applicable

Also, the QML documentation says v2.5 is required, which I think is what I tried originally and if I do that then it says 2.5 not installed. I just didn't think to try the versions in between!

0 Kudos