Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QML module not found UM ? #2

Open
jianqingHuang opened this issue Aug 6, 2018 · 2 comments
Open

QML module not found UM ? #2

jianqingHuang opened this issue Aug 6, 2018 · 2 comments
Labels

Comments

@jianqingHuang
Copy link

import UM 1.1 as UM
QML module not found UM ?
how to import this moduel?

@Ghostkeeper
Copy link
Contributor

The UM 1.1 package gets registered by QtApplication in Uranium. It should be available if you're running this through a Uranium application.

@jianqingHuang
Copy link
Author

Hi @Ghostkeeper
there is a question ,but I have import UM. How can I do ?

"ReferenceError: screenScaleFactor is not defined"

Thank s!

import UM 1.1 as UM //This allows you to use all of Uranium's built-in QML items.
import QtQuick 2.2 //This allows you to use QtQuick's built-in QML items.
import QtQuick.Controls 1.1

UM.Dialog //Creates a modal window that pops up above the interface.
{
id: base

width: 150 * screenScaleFactor
height: 50 * screenScaleFactor
minimumWidth: 150 * screenScaleFactor
minimumHeight: 50 * screenScaleFactor

Label //Creates a bit of text.
{
    //This aligns the text to the top-left corner of the dialogue window.
    anchors.top: base.top //Reference the dialogue window by its ID: "base".
    anchors.topMargin: 10 * screenScaleFactor
    anchors.left: base.left
    anchors.leftMargin: 10 * screenScaleFactor

    text: "Hello!"
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants