跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • Transition animations with Qt Quick Controls

    1
    0 評價
    1 貼文
    600 瀏覽
    尚無回覆
  • 0 評價
    3 貼文
    1k 瀏覽
    T
    Well, I managed to figure it out, and it's actually extremely simple. I decided to look for Ubuntu's QML and JS files, and I found them under /usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components, I opened up popupUtils.js to study it's open() function, and, of course, it simply returns the object --__-- Yes, it's that simple, so instead of just calling @PopupUtils.open(myComponent)@ you call @dialog = PopupUtils.open(myComponent)@ Then you can just use use @dialog.myLabel.text = "MyText" //myLabel is a property alias pointing at a Label item@ The problem is Ubuntu doesn't have it well documented yet, (well, popupUtils.js isn't documented at all).
  • [SOLVED] Problem with resizeEvent in QQuickView with SizeRootObjectToView on

    2
    0 評價
    2 貼文
    3k 瀏覽
    M
    Ok i find a solution. If i put : @ QQuickItem* rootQml = rootObject(); rootQml->setProperty("width", ev->size().width()); rootQml->setProperty("height", ev->size().height()); @ in the resizeEvent, it works.
  • Clickable places in QGraphicsSceen

    2
    0 評價
    2 貼文
    800 瀏覽
    SGaistS
    Hi, Please enclose your code in coding tags, otherwise it's extremely hard to read and people won't be motived to read the code to help you
  • Standard example: Texture in SGNode - Rendering FBOs

    4
    0 評價
    4 貼文
    2k 瀏覽
    Q
    On ubuntu examples works well without modifications, but without shader programm one-thread example does not work. So, i use gDEBugger GL and found that after after qml drawing depth test enabled and some shader programm binded. So this helps me: @ QOpenGLFunctions_2_1 glf21; glf21.initializeOpenGLFunctions(); ..... glDisable(GL_DEPTH_TEST); glf21.glUseProgram(0);@
  • Problem with qml

    4
    0 評價
    4 貼文
    1k 瀏覽
    sierdzioS
    The path is relative and you are doing a shadow build - it's almost certain that qml.qml is not in the folder the executable is placed in (in your case: file:///C:/Users/USER/Desktop/projectsQt/test 11/build-test1-Desktop_Qt_5_1_0_MinGW_32bit-Debug/).
  • Rounded Image Corners

    3
    0 評價
    3 貼文
    2k 瀏覽
    P
    Hi Andre, thanks for your reply. However enabling clipping sadly did not solve the problem. This is the updated code: @import QtQuick 2.0 Image { id: background source: "../background.jpg" width: 360 height: 360 focus: true Rectangle { id: rectangle x: 30 y: 30 width: 300 height: 300 color: "#ffffff" radius: 20 border.width: 5 border.color: "#000000" clip: true Image { id: image width: 300 height: 300 source: "../example.jpg" } } } @ Do you have an idea how to fix this issue?
  • Invoke C++ method from QML with "parent" as QWidget does not seem to work

    1
    0 評價
    1 貼文
    657 瀏覽
    尚無回覆
  • Why model data isn't exposed as properties of the delegate object?

    6
    0 評價
    6 貼文
    2k 瀏覽
    F
    Need I request a feature on the bug tracker?
  • Import Qtquick 1.0 into Qt 4.7

    2
    0 評價
    2 貼文
    771 瀏覽
    sierdzioS
    What are those "Shapes"? Some custom library of yours? Edit: you can easily switch to Qt 4.8.5 and benefit from updates introduced in QtQuick 1.1.
  • QSqlQueryModel in a QML view causes items being shown twice

    1
    0 評價
    1 貼文
    805 瀏覽
    尚無回覆
  • QQuickPaintedItem is not advised?

    12
    0 評價
    12 貼文
    10k 瀏覽
    T
    [quote author="sierdzio" date="1375359070"]. Anyway, we are getting way off the topic :P[/quote] You're right, I just want qml Items could be created from C++ :) That would make life much easier.
  • TextEdit font rendering scaling problem in QtQuick 1.1

    1
    0 評價
    1 貼文
    660 瀏覽
    尚無回覆
  • Qt5 Scene Graph custom geometry and gradients

    4
    0 評價
    4 貼文
    1k 瀏覽
    U
    I don't really have an example as the code will highly depend on the kind of shape and gradient you are trying to achieve. The easiest way is to use QSGGeometry::ColoredPoint2D for your vertices data and to adjust their color and placement in such way that when color is interpolated between vertices in fragment shader you get your desired gradient. I don't know if this will be implemented in ready made materials in the future.
  • How to reload a qml changing contents.

    1
    0 評價
    1 貼文
    849 瀏覽
    尚無回覆
  • I18N - Qt Quick5.0 - How to implement for user entered text string(s)

    1
    0 評價
    1 貼文
    472 瀏覽
    尚無回覆
  • [Solved] Launch a child QML window from a parent QML window

    3
    0 評價
    3 貼文
    31k 瀏覽
    G
    Thanks, it worked! I was inane enough to use "this" instead of the id of ApplicationWindow. I am curious though, as to how this could be implemented in QML + C++. Please guide me if you know that. Also, I want a value (access token, to be specific) back from the child window. How do you suggest I do that? My thought was to add a property to the child window: access_token, which I might access in the parent window before closing the child window. Do you have a better suggestion? [quote author="stevenceuppens" date="1375278713"]Hi Bhoot, you can try this, AuthorizationBrowser.qml @ import QtQuick 2.0 import QtQuick.Window 2.1 // needed for the Window component Window { width: 300 height: 200 Rectangle { anchors.fill: parent color: "lightGrey" Text { anchors.centerIn: parent text: "My New Window" } } } @ main.qml @ import QtQuick 2.0 Rectangle { id: root width: 360 height: 360 property variant win; // you can hold this as a reference.. Text { text: "Click here to open new window!" anchors.centerIn: parent } MouseArea { anchors.fill: parent onClicked: { var component = Qt.createComponent("AuthorizationBrowser.qml"); win = component.createObject(root); win.show(); } } } @[/quote]
  • How to display errors for Loader?

    2
    0 評價
    2 貼文
    794 瀏覽
    sierdzioS
    You need to anchor your Text element. Also, make sure Loader is working as you expect with: @ id: view // ... onStatusChanged: { console.log("Loader status changed to " + status); } @
  • [SOLVED] QtQuick Controls 1.0 Designer style and actual style

    3
    0 評價
    3 貼文
    1k 瀏覽
    sierdzioS
    Nice catch! Thank you for sharing the solution :)
  • C++ model (QAbstractItemModel) with Qt Quick view?

    1
    0 評價
    1 貼文
    2k 瀏覽
    尚無回覆