Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Signing Certificate And Key In Symbian

    3
    0 Votes
    3 Posts
    2k Views
    D
    If you plan to publish the app to Nokia Store and you have a Nokia Publisher account, you can send a email to developer.support@nokia.com with your phone IMEI and Nokia Publisher account username. They will give you some protected UIDs with signing certificate. more info "here":http://www.developer.nokia.com/Distribute/Packaging_and_signing.xhtml
  • Create a pixmap from a QQuickItem (in Qt5)

    3
    0 Votes
    3 Posts
    3k Views
    S
    Nice, thanks, I will definitely check that
  • Flickable, ListView work with touch

    5
    0 Votes
    5 Posts
    3k Views
    G
    if i create a qt project with qt widgets, and set the touchEvent flag, the touch work very good. But it does'nt work the same with the qml element(listView,Flickabe,...)
  • [solved] Combine Listitem, Column and Row... What am I doing wrong? :S

    9
    0 Votes
    9 Posts
    5k Views
    I
    Finally I manage to sort out this layout, by taking reed of the Row, it seems they are a bit painful in some cases :P an using just anchored items and some defined heights. Here the code, in case it could be of any help to someone else :) @ Component { id: newsItem Item { width: parent.width height: childrenRect.height ListItem { id: newsListItem width: parent.width subItemIndicator: true height: itemDesc.height + 10 Column { id: itemDesc anchors { left: parent.left right: parent.right leftMargin: 10 rightMargin: 30 verticalCenter: parent.verticalCenter } spacing: 5 Item { id: itemMainInfos width: parent.width height: Math.max(thumbnailImage.height, newsTitle.height) Image { id: thumbnailImage anchors { left: parent.left verticalCenter: parent.verticalCenter } width: 70 fillMode: Image.PreserveAspectFit source: thumb } Text { id: newsTitle anchors { left: thumbnailImage.right leftMargin: 10 right: parent.right } verticalAlignment: Text.AlignVCenter .... text: title } } Item { id: itemSecInfos width: parent.width anchors { left: parent.left right: parent.right } height: 20 Text { id: newsAuthor anchors { top: parent.top bottom: parent.bottom left: parent.left } width: (parent.width / 2) verticalAlignment: Text.AlignVCenter .... text: author } Text { id: newsDate anchors { top: parent.top bottom: parent.bottom left: newsAuthor.left right: parent.right } verticalAlignment: Text.AlignVCenter ... text: pubDate } } } } } }@
  • Is there a automatic repaint in QML?

    2
    0 Votes
    2 Posts
    3k Views
    M
    Hi, As long as QML knows about the bounding rectangle of your custom component (if it is QDeclarativeItem derived and has a width/height, then it should, otherwise if it is QGraphicsObject derived you may need to re-implement QGraphicsItem::boundingRect()), and it only paints within its bounding rectangle, then repaints should automatically occur for regular usage (i.e. whenever the view detects that it needs a repaint). To force a full repaint every time anything is detected dirty, you can also try the QGraphicsView::FullViewportUpdate flag. Regards, Michael
  • QML file question

    2
    0 Votes
    2 Posts
    1k Views
    cmessineoC
    The only way I could get my qml components to show up in the designer library item pane was to use relative path something like import "../../../../workspace/components/" Which is too bad.
  • How to use qml to implement a navigation pad?

    5
    0 Votes
    5 Posts
    3k Views
    B
    Well, I guess it wont work with just QML. You have to write your own extension Plugin in C++ if you want to be able to determine if the exact shape of a button is selected. A MouseArea in QML does unfortunately only support a rectangular region. I would however just place 4 rectangular MouseAreas over it, the result will not be perfect but I think it will be good enough for most use cases.
  • QML flipable messes up my opacity

    1
    0 Votes
    1 Posts
    931 Views
    No one has replied
  • Rotation of an image (in a loop) is not smooth although the fps is 60

    4
    0 Votes
    4 Posts
    3k Views
    ?
    Thank You for your answers, I forget to say that i tried it with QtQuick 2.0, too. There is the same Problem.
  • 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.