Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.9k Topics 77.0k Posts
QtWS25 Last Chance
  • Q: Loading colors from QML offline database ?

    3
    0 Votes
    3 Posts
    2k Views
    ?
    Hmm, I think you're right. I never thought it wouldn't work because I've been able to return the value on web projects for example. I tried this on my MainPage.qml: @Component.onCompleted: console.log(Database._Load_ColorTheme())@ And guess what... It gives me 'undefined'! So how I'm supposed to do this then? I got an idea, that I could use 'Label' or 'Text' components, and load the new color from a 'text' variable. But after all, this should work like a Javascript in any other situation, right .. ? So what's going wrong here?
  • 0 Votes
    3 Posts
    10k Views
    C
    Yes, the assignment form in your first post won't cause a binding. In QtQuick 1.x you can use a Binding element, and in QtQuick 2.0 you can either use a Binding element, or use the "initial property values" argument to the setSource function of the Loader, along with the Qt.binding() function, to generate a binding.
  • Qt3D

    3
    0 Votes
    3 Posts
    2k Views
    C
    Thanx sooooooooooooooooooo much I solved by your help of course
  • Why does QML Rectangle radius is only outside ? [Solved]

    11
    0 Votes
    11 Posts
    4k Views
    EddyE
    So, to have an inside radius, you'll have to make radius bigger than the border width. If this solves your question, could you please edit your first post and add [solved] to it? Thanks.
  • QtQuick Leak on setSource or API misuse by me?

    2
    0 Votes
    2 Posts
    2k Views
    A
    I tried using a "QML loader":http://doc.qt.nokia.com/4.7-snapshot/qml-loader.html instead of calling setSource from C++ but that also leaks.
  • Centering of GridView and wrap around

    3
    0 Votes
    3 Posts
    1k Views
    P
    You could use Repeater for each set of GridView 3x3
  • Performance issue of QQuickPaintedItem

    5
    0 Votes
    5 Posts
    3k Views
    D
    Thanks for your suggestion. I replace QQuickPaintedItem with QQuickItem and solve the performance issue now. And I found VideoOutput in QtMultimedia is a good solution, too.
  • 0 Votes
    2 Posts
    2k Views
    A
    For those who can be interested in that, I've resolved, but not in a elegant way! In myListView I've created a qml ListModel attached to ListView and then thru javascript functions they manipulate ListModel. But important, you cannot pass from within C++ to qml a flat QList<QObject*> because itsn't supported well, instead you need to pass the QList thru setContextProperty of QDecalarativeContext to use in qml Bye
  • [SOLVED] Create qml object in C++ setting a parent

    6
    0 Votes
    6 Posts
    4k Views
    A
    Sorry...i forgot it!
  • QML - extending an existing item

    8
    0 Votes
    8 Posts
    3k Views
    P
    Well, does anybody have a working files, that really works, could anybody leave working example here? ... documentation is quite mean on that...
  • Is it possible to modify header/footer of ListView.&#63;&#63;&#63;

    10
    0 Votes
    10 Posts
    8k Views
    B
    First I thought it is possible but it seems that header or footer element id is not recognized properly. Here's the modified code that worked for me. Main point is using a universal scoped variable @import QtQuick 1.1 import com.nokia.symbian 1.1 Page { property string buttonText : "OK" ListView { id: list_view1 anchors.fill: parent delegate: Item { x: 5 height: 40 Row { id: row1 spacing: 10 Rectangle { width: 40 height: 40 color: colorCode } Text { text: name anchors.verticalCenter: parent.verticalCenter font.bold: true color: "white" } Button { id: button1 x: 272 y: 0 text: "Button" onClicked : buttonText = model.name } } } model: ListModel { ListElement { name: "Grey" colorCode: "grey" } ListElement { name: "Red" colorCode: "red" } } header: ToolButton { id : button text: buttonText } Button { id: button1x x: 272 y: 0 text: "Button" onClicked: buttonText = "It works" } } } @
  • QTouchEvent::TouchPoint pressure information

    7
    0 Votes
    7 Posts
    4k Views
    A
    Implement a custom declarative item, reimplement event() and handle the touch events. This item can then have some signals to indicate a touch event has occured and a number of properties that provide the touch point data (position, etc.). This is exactly what QQuickMultiPointTouchArea (the implementation of MultiPointTouchArea) does in Qt 5. Alternatively, if a custom item is not desired, you could still install an event filter on the declarative view and expose the events/data to QML via a QObject.
  • [QTBUG-25999] QDeclarativeView bug...

    6
    0 Votes
    6 Posts
    3k Views
    P
    I have pushed it as a bug [QTBUG 25999]...
  • Getting current location on Symbian^3 (Anna, Belle) devices

    4
    0 Votes
    4 Posts
    3k Views
    C
    Hi all, Search for some posts - there is a specific bug in PositionSource which causes your device to look for GPS data and hanging up on it if no GPS signal is received (hence you see GPS icon). This means outside your code will work fine, but PositionSource won't automatically look for non-GPS sources... Best workaround is to go with Qt C++ and write custom nonGPS PositionSource. Problem will be again if you rely on GPS more - to code something to manage "blending" different sources...
  • 0 Votes
    3 Posts
    7k Views
    K
    Hi Chris, Thank you too much because of your reply. I did solve this typing: @ children:[ Text{ id:textDate anchors.centerIn: parent }, CommonHeader{ searchActive: false section: qsTr("MI CIUDAD") z:100 } ] @ instance of doing by default property. I don't know why it solved the problem. But I understood that you told me almost everything. I'm not sure from where it is accessing to the component. But doing explicit code, it doesn't happen. Best, Fernando.
  • Does Qt Quick Components are also suitable for embedded linux ?

    5
    0 Votes
    5 Posts
    3k Views
    C
    You probably want to use http://qt.gitorious.org/qt-components/desktop on desktop.
  • Transform slow?

    7
    0 Votes
    7 Posts
    2k Views
    C
    I'm not 100% certain, but I seem to recall someone saying that transform with QGV is much slower than with scenegraph rendering (ie, Qt 4.8 will be slower than Qt 5.0, in that QtQuick 1.1 will be slower than QtQuick 2.0, for transform operations) - although I can't remember why, now. Perhaps scenegraph allows partial-update and thus only the transformed element needs to be redrawn? Not sure.
  • [solved] QDeclarativeItem geometry

    6
    0 Votes
    6 Posts
    3k Views
    D
    Nope :) then you can put [solved] in in the title of the post :)
  • Image Gallery like bottom image gallery in android.

    5
    0 Votes
    5 Posts
    3k Views
    M
    Ravinder, What functionality do you want beyond scrolling?? If you look at the QML Flickr example in the QtSDK, you can take the flickable/scrollable GridView and make it one column horizontal. Or as minimoog77 suggests use a horizontal ListView and then add animation or transitions to get the functionality you want. http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html The Animation and Transitions section under QML Elements may help you find what you are thinking of: http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeelements.html
  • [solved] QDeclarativeItem does not repaint even when I call update()

    6
    0 Votes
    6 Posts
    3k Views
    X
    Hi, ok problem solved. The loops: Animation.Infinite caused the problem. I needed to change it to loops: 1 (which means I can leave it out because this is it's default value). After that onCompleted gets called when it should.