跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • Alter property from component via javascript

    2
    0 評價
    2 貼文
    619 瀏覽
    p3c0P
    Hi and Welcome, Can you show some of your code ? What have you tried ?
  • Tips for a good QML library

    1
    0 評價
    1 貼文
    560 瀏覽
    尚無回覆
  • Get application binary path using QML

    2
    0 評價
    2 貼文
    2k 瀏覽
    p3c0P
    Hi, AFAIK if you are not loading the QML file from qrc then you can use Qt.resolvedUrl(".") directly to get the current path but if loading from qrc then you will need to get it from C++ using QDir::currentpath() and pass it to QML.
  • QT Creator Mouse

    1
    0 評價
    1 貼文
    572 瀏覽
    尚無回覆
  • Import data (XML file) from URL

    8
    0 評價
    8 貼文
    3k 瀏覽
    J
    Maybe the same as above says. Download html file via QNetworkAccessManager, and deal it using C++ string functions yourself, then bring it to QML.
  • QQuickView to FBO to OpenGL texture

    5
    0 評價
    5 貼文
    3k 瀏覽
    J
    I were doing the same thing before, but that I don't use any RTT feature , instead I use normal rendering pipeline. I don't know if it is faster when using RTT. Here is my blog and code talking about this. http://blog.csdn.net/gamesdev/article/details/38024327
  • Back button functionality and multiple times statement execution in Component.onCompleted

    1
    0 評價
    1 貼文
    626 瀏覽
    尚無回覆
  • Flickable onMouseXChanged

    8
    0 評價
    8 貼文
    2k 瀏覽
    p3c0P
    Ok. And don't forget to add anchors.fill: parent in MouseArea so that it covers the whole Flickable Item. You can mark the post as solved.
  • Qml gui and nogui mode[solved]

    14
    0 評價
    14 貼文
    4k 瀏覽
    SGaistS
    You're welcome ! Since you have it running now, please update the thread title prepending [solved] so that other forum users may know a solution has been found :)
  • QML Mouse onReleased Happening before onClicked(Solved)

    8
    0 評價
    8 貼文
    3k 瀏覽
    H
    Ok, thank you all, I will do it.
  • Expanding the Window when clicked

    6
    0 評價
    6 貼文
    1k 瀏覽
    p3c0P
    Well i see multiple issues here, The handler is onDoubleClicked and not doubleClicked so change it. Since you want to change the height of Rectangle you must refer to it in MouseArea using the id of Rectangle or since it's a parent of MouseArea you can use parent. No need to use binding there. So, @ MouseArea { id: mouseArea1 onDoubleClicked:{ parent.height =400 } } @ Also you need not specify width and height for MouseArea since you are already filling it to parent's width and height.
  • [QTBUG-26330]QML WebView resizing and redraw bug?

    15
    0 評價
    15 貼文
    7k 瀏覽
    M
    If anyone is interested in at least having a quick fix, you can disable the WebView's rendering during the resize by using a timer. My fix looked a bit like this: @Item { id: root onWidthChanged: renderingTimer.restart(); onHeightChanged: renderingTimer.restart(); Timer { id: renderingTimer; onRunningChanged: webView.renderingEnabled = !running; interval: 100; } WebView { id: webView preferredWidth: root.width preferredHeight: root.height } }@ With the item object placed inside a Flickable. If you have a better fix, don't hesitate to correct me.
  • QML-Designer and external Components

    4
    0 評價
    4 貼文
    1k 瀏覽
    F
    Did you try QML2_IMPORT_PATH in environment? Not QML_IMPORT_PATH. For the pro file, try full path for QML_IMPORT_PATH first, instead of using MW_ROOT_PATH. Eg: @ QML_IMPORT_PATH += "/home/foo/src/hmi/MwQml/qml" @
  • Trouble with calling a cpp method from qml

    5
    0 評價
    5 貼文
    1k 瀏覽
    Y
    Tomme Thank you I appreciate your help . Actually since I couldn't handle mixing qml with c++ I decided to use Qt designer instead for my project , but I will try this later .
  • Upgrading from qt quick ui

    1
    0 評價
    1 貼文
    449 瀏覽
    尚無回覆
  • Obtain object type string from QML

    8
    0 評價
    8 貼文
    8k 瀏覽
    I
    I mean that if we using objectName() method that we must set this property to all instances of class in constructor or in other places. For example: @ MyObject1() { // setObjectName("MyObject1"); // or setObjectName(metaObject()->className()); } @ or as you wrote: @ Text { id: mytext objectName: "MyTextObject" anchors.centerIn: parent text: "Hello, World!" } @ But if we using className wrapper property than we may define this methods in our class declaration. And this is allow to us to making safe inheritance from MyObject1: for subclasses className() return actual className! @Q_PROPERTY(QString className READ className CONSTANT) QString className() { return metaObject()->className(); }@ and we can using objectName for other purposes, for example: @ MyObject1 objA = new MyObject1(); objA.setObjectName("A"); MyObject1 objB = new MyObject1(); objB.setObjectName("B"); @ This is can be useful for debugging.
  • Webview not scrollable using QtWebKit 1.0

    1
    0 評價
    1 貼文
    635 瀏覽
    尚無回覆
  • [Solved] Trigger custom QML handler from c++

    6
    0 評價
    6 貼文
    2k 瀏覽
    G
    Oh yes, that was the missing part. now its working and its awsome. Thanks for the help.
  • Saving html content with images

    1
    0 評價
    1 貼文
    543 瀏覽
    尚無回覆
  • Dynamic change text direction

    10
    0 評價
    10 貼文
    3k 瀏覽
    p3c0P
    Can you post the relevant code where it shows the binding to horizontalAlignment ?