Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Access dynamic created ListModel elements from C++!

    12
    0 Votes
    12 Posts
    12k Views
    X
    Hi Andre, Yes, it depends :) And I find another way to play with ListView model qmlRegisterType a customized C++ Model such as: @ qmlRegisterType<MyModel>("cn.com.isoft.demo", 1, 0, "MyModel"); @ QStringList property such as: @ Q_PROPERTY(QStringList myLists READ myLists NOTIFY myListsChanged) @ put MyModel in QML such as: @ import cn.com.i-soft.demo 1.0 ... ListView { ... MyModel { id: myModel } model: myModel.myLists delegate: Rectangle { ... Text { text: modelData } } } @ Regards, Leslie Zhai
  • 0 Votes
    2 Posts
    2k Views
    M
    This has been reported here: https://bugreports.qt-project.org/browse/QTBUG-36761
  • How can I set iconSize in ToolButton?

    6
    0 Votes
    6 Posts
    12k Views
    Q
    Hi Jens, When using ToolButton and Actions the scaling seems to be wrong on Android. Adding an Image {} inside ToolButton and also setting the image source in an action would create two images. Is this a temporary scaling bug for Android or how should I do this correctly? [quote author="Jens" date="1393503948"]True the ToolButton has a preferred platform specific icon size. For the time being the obvious workaround would be this: @ ToolButton{ id:openFile width: parent.height Image { source: "qrc:/images/zoom.png" anchors.fill: parent anchors.margins: 4 } } @[/quote]
  • No Opacity on top of Opacity

    4
    0 Votes
    4 Posts
    935 Views
    JKSHJ
    You're welcome! P.S. It's possible ;) http://www.troll.me/2012/01/24/uncategorized/late-night-coding-zero-build-errors/
  • Maps, Location API, custom plugin and QML

    2
    0 Votes
    2 Posts
    1k Views
    V
    Ok, I believe that I have to subclasse QQuickPaintedItem or to use the Scene Graphe API. http://qt-project.org/doc/qt-5/qtquick-visualcanvas-scenegraph.html#custom-items-using-qpainter Hum. I go to use a GridView and a ListModel, it's easier ;-)
  • Calling functions with typedef arguments in qml

    4
    0 Votes
    4 Posts
    1k Views
    SGaistS
    Indeed, sorry I didn't state it explicitly, you have more information about the procedure "here":http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-definetypes.html
  • 0 Votes
    1 Posts
    518 Views
    No one has replied
  • Updating a background image

    1
    0 Votes
    1 Posts
    729 Views
    No one has replied
  • QML application crashing after update to 5.2.1 and 5.2.2

    8
    0 Votes
    8 Posts
    2k Views
    JKSHJ
    Hi, Sorry for the late reply. It looks like you found a bug indeed; the Qt devs are looking into it now. I hope the workaround works well with your app.
  • NewB wants to learn QML

    4
    0 Votes
    4 Posts
    1k Views
    J
    Thank you so very much. That information is EXACTLY what I was looking for. I now have so much to learn this weekend. Sweet, kids, just sweet.
  • QML Loader leaks memory

    28
    2 Votes
    28 Posts
    25k Views
    S
    We have had a lot of problems with unexplained memory loss running 4.8.2 on Wince 6.0. Using 4.8.5 reduced the problem significantly. As we have lots of Loaders in qml we also started to call gc() explicity for every onSourceChanged: call. The gc() was hardly ever called, it seemed. I've heard that this has improved in Qt5, but we're not in a position to test this now.
  • Add QQuickView to QWidget

    7
    0 Votes
    7 Posts
    7k Views
    J
    ansifpi: QDeclarativeView in Qt Quick 1.x is already a widget so no need to embed in a window container there.
  • TableView and items [solved]

    3
    0 Votes
    3 Posts
    972 Views
    Z
    Yeah that's it ! Ok I get it, i didn't think about putting the delegate directly into the TableViewColumn :) Thank for this !
  • Developing for different platforms

    1
    0 Votes
    1 Posts
    529 Views
    No one has replied
  • Is the memory leak in QQmlEngine::clearComponentCache() fixed ?

    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, You should look at the "bug report system":http://bureports.qt-project.org if you don't find the answer there then ask on the interest mailing list. You'll find Qt's developers/maintainers there (this forum is more user oriented)
  • How can I report a BUG of the QML Flickable ?

    2
    0 Votes
    2 Posts
    934 Views
    SGaistS
    Hi, On "the bug report system":http://bugreports.qt-project.org Don't forget a simple compilable example to reproduce the behavior
  • ListView Sections

    3
    0 Votes
    3 Posts
    834 Views
    M
    Ok, You have to use QtQuick ListView type for list in that order and Image type of placing image before the list. Here's the general code: @Rectangle { ListModel { id : newModel ListElement {name: "TextMate"} ListElement {name: "TextMate"} ListElement {name: "Activity Monitor"} } Component { id: newDelegate Text { // Define text property } } ListView { model: newModel delegate: newDelegate // It refers to delegate above width: parent.width height: parent.height } }@
  • Highlight property of ListView stretch

    2
    0 Votes
    2 Posts
    934 Views
    J
    The documentation states: "An instance of the highlight component is created for each list. The geometry of the resulting component instance is managed by the list so as to stay with the current item, unless the highlightFollowsCurrentItem property is false." The highlight will match the geometry (width/height) of the list delegate. If you want your highlight to fill the width of the view you can simply change the delegate like this: @ Component { id: nameDelegate Item { width: parent.width height: textItem.height Text { id: textItem text: name font.family: "Myriad Pro" font.pixelSize: 16 } } } @
  • How to put a particles(from ParticleSystem) in an custom user figure?

    3
    0 Votes
    3 Posts
    839 Views
    S
    [quote author="sletta" date="1393487129"][/quote] Thanks, but then I have to create a separate image for each screen resolution.. So, It's not suitable for me. Is there a way to create my own shape qml type(TriangleShape, PolygonShape)?
  • How to use qt quick and qml

    2
    0 Votes
    2 Posts
    572 Views
    sierdzioS
    See "this":http://qt-project.org/doc/qt-5/qml-tutorial.html, and "this":http://qmlbook.org/.