Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Common banner on top a PageStackWindows

    7
    0 Votes
    7 Posts
    2k Views
    I
    [quote author="Andre" date="1340717853"]The clipping is about making sure the items from your list view don't start to overlap with your other items. Nothing more. Sorry I was being too short. [/quote] It's not your falt, it's just me being too much newbie on this... :P I will try this, let's see :P UPDATE: new thing learned, and it works! :P So the solution is to put the banner inside each page and then if needed clip the other contents :D Thanks!!! :D
  • Why does TouchArea is not in use anymore in QML ?

    12
    0 Votes
    12 Posts
    3k Views
    sierdzioS
    Could be. I combine Flickables, GridViews and MouseAreas a lot in the linked projects, and sometimes there are problems, too. You can try filling a bug report if you have an easily-reproducible case.
  • QML "infinite" ListView

    12
    0 Votes
    12 Posts
    9k Views
    I
    I think I manage to make all work like I want :P Advice or comment are really appreciated :) @ UpdatableXmlListModel.qml import QtQuick 1.1 ListModel { id: root default property alias roles: xmlListModel.roles property alias source: xmlListModel.source property alias query: xmlListModel.query property alias namespaceDeclarations: xmlListModel.namespaceDeclarations property alias status: xmlListModel.status function push(item) { append(item); } property variant __xmlListModel: XmlListModel { id: xmlListModel property variant keys: [] onSourceChanged: { console.debug(source) } function appendItem(index, count) { for (var i = 0; i < count; i++) { var item = get(i + index); push(item); } } onItemsInserted: appendItem(index, count) } Component.onCompleted: { var keys = new Array() for (var i = 0; i < roles.length; ++i) { if (roles[i].isKey) { keys.push(roles[i].name); } } xmlListModel.keys = keys; } }@ @NewsList.qml .... UpdatableXmlListModel { id: newsModel query: "/root/item" XmlRole { name: "id" query: "id/string()" } XmlRole { name: "title" query: "title/string()" } XmlRole { name: "thumb" query: "thumb/string()" } XmlRole { name: "pubDate" query: "pubDate/string()" } onStatusChanged: { .... } }@ :D
  • ListModel and onChanged signals

    4
    0 Votes
    4 Posts
    4k Views
    C
    Just confirming that the warning you see is coming from the custom parser for ListModel elements. It seems that change signals aren't supported for that type. Regarding the model, you can still use a ListModel, but maybe use an intermediate Item element which has the various properties, and in the change signal handlers, set the appropriate source etc on the ListModel. Other things which can be used as a model for a view are listed in the docs at http://doc-snapshot.qt-project.org/5.0/qtquick-modelview.html (including object instances, etc). Cheers, Chris.
  • QML only connect to mySQL

    4
    0 Votes
    4 Posts
    5k Views
    A
    I see, didn't get that from your question at first. The linked example only works with a local database, in your case you probably can write your own QML item in C++ and reuse that every time you need QML SQL access. If this doesn't meet your needs I'm out of ideas, sorry.
  • More GridViews drag and drop

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Where can I fint the source files of QML MouseArea element ?

    4
    0 Votes
    4 Posts
    2k Views
    A
    This code is used for all platforms using the MouseArea QML item, probably you meant the initial sending of MouseEvents themselves? In this case the (platform-specific) QApplication class would probably be a place to look for (at least it's the case for Win, s60, ...). Alex
  • PressDelay on QML Flickable doesn't work

    2
    0 Votes
    2 Posts
    2k Views
    M
    This works for me, both QtQuick 1 and 2: @ Flickable { id: root width: 200; height: 200 contentHeight: 600 pressDelay: 500 Rectangle { width: 50; height: 50 color: ma.pressed ? "blue" : "green" MouseArea { id: ma anchors.fill: parent } } } @
  • QML Component Components Properties not-existing

    4
    0 Votes
    4 Posts
    3k Views
    C
    This is a bug. I've filed QTBUG-26290 to track this issue.
  • Qtcomponentsplugin_1_0 question

    2
    0 Votes
    2 Posts
    1k Views
    C
    See http://qt-project.org/wiki/QtDesktopComponents instead.
  • Weird binding behaviour: Unable to assign QObject* to XYZ_QMLTYPE_123

    4
    0 Votes
    4 Posts
    4k Views
    C
    Yes, the typed version is definitely better in my opinion too. I'd say that you're right, and that QTBUG-15641 is related (although I can't remember enough of the QtQuick1.x code to say why the cached typedata resolution could fail for inline components, or how that might be reproduced in your use-case). Unfortunately, we're focusing purely on Qt 5 at the moment, and that bug in QtQuick1.x is unlikely to get fixed soon. Another possibility is to use "property QtObject propname", instead of "property variant propname" -- at least then you get the typechecking for QObject-derivedness, so attempting to assign integers or strings etc will fail. It's not perfect, but it's better than nothing, I guess. Cheers, Chris.
  • Qt Designer - QML file creation

    6
    0 Votes
    6 Posts
    3k Views
    cmessineoC
    Thanks for answering my question. I also found template files that can be updated in QtCreator/share/qtcreator/templates/qtquickapp/qml/
  • [SOLVED] Qt Quick Components for Symbian via SmartInstaller

    4
    0 Votes
    4 Posts
    7k Views
    W
    hi thanks but it's still unclear for me : I have those depencies in ${package}_template.pkg but not ${package}_installer.pkg @ grep -i components *.pkg redak_installer.pkg:; Dependency to Symbian Qt Quick components redak_installer.pkg:; Default dependency to Qt Quick Components for Symbian library redak_stub.pkg:; Dependency to Symbian Qt Quick components redak_stub.pkg:; Default dependency to Qt Quick Components for Symbian library redak_template.pkg:; Dependency to Symbian Qt Quick components redak_template.pkg:(0x200346DE), 1, 0, 0, {"Qt Quick components"} redak_template.pkg:; Default dependency to Qt Quick Components for Symbian library redak_template.pkg:(0x200346DE), 1, 1, 0, {"Qt Quick components for Symbian"} @ More infos : https://bugreports.qt-project.org/browse/QTCREATORBUG-6338 https://bugreports.qt-project.org/browse/QTSDK-1283?focusedCommentId=180330#comment-180330 -- http:/rzr.online.fr/q/symbian
  • [solved] I have an idea to develop particles in qml

    7
    0 Votes
    7 Posts
    2k Views
    C
    OK... thanks
  • [Solved] Best practices to hide context menus?

    4
    0 Votes
    4 Posts
    4k Views
    D
    Have you tried explicitly setting accepted to false? I don't know if that would work, but logically it should... Glad you got it figured out, though. :) I know the feeling; I spent hours trying to figure out how I could make a scrolling ListView not show list items that have scrolled outside of the view, and finally found that wonderful clip property. Pfft. :)
  • Problem in detection of special keys...

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    Probably you need to use OS-specific APIs... or test with Qt5 - there might have been a change there (definitely was for mouse buttons).
  • QML Timer is blocked?

    4
    0 Votes
    4 Posts
    4k Views
    M
    Hi, The issue in this case is that Loader loads the QML on the main thread (effectively blocking it), which the Timer is also running on. This has been addressed in QtQuick 2.0 via the asynchronous property added to Loader (which allows animations to run while the loading happens). Regards, Michael
  • Qtonpi + qtnetwork + phonon + qtquick

    2
    0 Votes
    2 Posts
    2k Views
    T
    Of course. You should to talk about it in QtonPI group.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • QDeclarativeDebugtrace API documentation

    1
    0 Votes
    1 Posts
    819 Views
    No one has replied