跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.2k 主題 77.8k 貼文
  • HowTo: Struct -> QVariant -> QML type

    2
    0 評價
    2 貼文
    2k 瀏覽
    V
    I think you should wrap your struct in an QObject-derived class, and then register this class to QML engine so that you can instantiate the class in QML. You can create a method, which is callable in QML, in the class to assign values to your struct via QML code.
  • Render texture to QQuickFramebufferObject using OpenGL

    1
    0 評價
    1 貼文
    2k 瀏覽
    尚無回覆
  • Typo in attached property scoping example?

    1
    0 評價
    1 貼文
    481 瀏覽
    尚無回覆
  • Using QML Items as texture for custom QSGGeometry QML QQuickItem

    5
    0 評價
    5 貼文
    4k 瀏覽
    M
    Thanks lemourin, Eventually I got it working a while back, but it was not a nice experience writing lots of nasty c++ to get around the lack of public API for doing this and has been captured by the following bug. https://bugreports.qt-project.org/browse/QTBUG-31989
  • Model/View: using single view and single model with several sets of data

    4
    0 評價
    4 貼文
    1k 瀏覽
    J
    I think it's reading it as javascript not as part of the delegate. I think you might want to change the role used by the delegate by doing something like: styleData.role = "number" This seems to not be very well documented. I inferred this from these two sources: http://stackoverflow.com/questions/22874387/qml-tableview-access-model-properties-from-delegate http://qt-project.org/doc/qt-5/qml-qtquick-controls-tableview.html#itemDelegate-prop
  • 0 評價
    2 貼文
    1k 瀏覽
    S
    Solved, the above code was OK ! My test model data was wrong : It had minimum and maximum swapped (min =100, max = -100). Doh! This had the effect that I could edit the existing value (that was out of range) without limits, but after deleting all characters i could not enter anything. Oh well, above code may be useful to someone, it works fine when fed with the correct parameters ;-).
  • [SOLVED] Defining own QML type - can i define method ?

    5
    0 評價
    5 貼文
    1k 瀏覽
    S
    Ok, thanks. That worked.
  • Wacom and Qt Quick 2

    9
    0 評價
    9 貼文
    3k 瀏覽
    K
    Any update on this with the new Qt 5.3?
  • Best way to use various MouseArea for mobile application

    1
    0 評價
    1 貼文
    477 瀏覽
    尚無回覆
  • Ordering Property and Anchor changes

    2
    0 評價
    2 貼文
    742 瀏覽
    p3c0P
    Hi, I think you can use a "sequentialanimation":http://qt-project.org/doc/qt-5/qml-qtquick-sequentialanimation.html and a "scriptaction":http://qt-project.org/doc/qt-5/qml-qtquick-scriptaction.html here.
  • Dropdown tool from toolbar...

    1
    0 評價
    1 貼文
    901 瀏覽
    尚無回覆
  • How to reset QQuickView and his QML file into initial state?

    1
    0 評價
    1 貼文
    976 瀏覽
    尚無回覆
  • Xmlhttprequest: open with username and password

    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • 0 評價
    3 貼文
    959 瀏覽
    D
    Thanks man, just the link I needed :-)
  • QtQuick Controls not working correctly with custom QtQuick Items

    5
    0 評價
    5 貼文
    2k 瀏覽
    A
    By plain window, I assume you mean QML being wrapped into an Item { ... } element rather than ApplicationWindow , as well as using QQuickView to handle the window from the C++ side? It did not change anything, but I notice that the clicked event fires off if I click where the button is supposed to be, so it's at least there, just seems like it becomes invisible or put behind the QQUickItem GL window. The button works fine in the openglunderqml example, I copied the Squircle code over to my project and noticed that the button would still not draw unless I did not change the QSurfaceFormat like so: @int main(int argc, char **argv) { QGuiApplication app(argc, argv); QSurfaceFormat format; format.setSamples(16); format.setOption(QSurfaceFormat::DebugContext); format.setMajorVersion(3); format.setMinorVersion(3); format.setProfile&#40;QSurfaceFormat::CoreProfile&#41;; qmlRegisterType<Squircle>("SimpleLOS", 1, 0, "Overlay"); AppView view; view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl("qrc:////content/gui/main.qml")); //view.setFormat(format); view.show(); return app.exec(); }@ Setting up my normal scene again without changing the QSurfaceFormat does not show the button, but at least I can be fairly certain that the issue has to be with the context or something similar.
  • Manual event controlling in C++ from e.g. MultiPointTouchArea

    1
    0 評價
    1 貼文
    839 瀏覽
    尚無回覆
  • How to open a main window in a second monitor with 'Qt Quick'

    4
    0 評價
    4 貼文
    2k 瀏覽
    SGaistS
    It's also a solution but you have to know your screen dimensions. With QDesktopWidget you ensure that you are in a valid geometry and don't need to know your screen size.
  • Setting context property for a QQuickView crashing? [SOLVED]

    4
    0 評價
    4 貼文
    2k 瀏覽
    SGaistS
    You're welcome ! If this solves your problem, then please update the thread title prepending [solved] so other forum users may know a solution has been found :)
  • [SOLVED] Accessing properties in QML Delegate for imported C++ objects / ListView

    4
    0 評價
    4 貼文
    4k 瀏覽
    S
    Thanks Vincent, for the suggestion to use qabstractitemmodel. It looks suitable. When I find the time, I'll try this too, it may be more efficient.
  • Qt 4.8 vs 5.3 for QML performance (embedded: no-OpenGL, soft-float)

    4
    0 評價
    4 貼文
    2k 瀏覽
    M
    Using a software opengl renderer doesnt sound like a good solution to me. I cant see how it would improve performance over 4.8. Im starting to think that QML in any form is too heavy for this ARM SoC. No matter what i try, i just cant get anything close to acceptable graphics performance.