I want to set some initial height of the UI elements eg. AppButton and I want to use this height through different UI elements of the app.
So I have Style.qml which is Singleton
import Felgo 3.0
import QtQuick 2.12
property double buttonHeight:dp(30)
However I can’t set dp(30) here because it says ReferenceError: dp is not defined
I can’t set it at the beginning of the App
because it says: Non-existent attached object
I’m setting it at the end of Main
which is fine for Desktop, but it causes mobile app to blink/resize on startup
Question: what is recommended way of using dp() function , so I could set size of the UI elements on startup and have it available in all components ?
Now I’m using import “style” in other qml files and I can set eg height:Style.buttonHeight but app blink/resize on startup