Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.6k Topics 75.8k Posts
  • QML Video Element crash

    2
    0 Votes
    2 Posts
    3k Views
    M

    Hi,

    It shouldn't be crashing. Could you add a bug report via "bugreports.qt.nokia.com":bugreports.qt.nokia.com for this?

    Thanks,
    Michael

  • 0 Votes
    8 Posts
    5k Views
    K

    I strongly agree with whatever Ashwin had said,even i needed multimedia package for QML but in order to get that i need to install QTMobility first,which was so painful (when errors appears while compiling, u dont knw wht to do) ,so many environmental variables need to be set, atleast QTcreator is better in tht ;)

  • [Solved] accessing file:/// outside the .QRC

    5
    0 Votes
    5 Posts
    5k Views
    H

    Ok, for people who are looking for a solution, it turns out it is pretty easy.

    Just explicitly prepend "file://" to files path outside the qrc.

  • Implementing States with QML

    4
    0 Votes
    4 Posts
    8k Views
    P

    Hi,

    thanks for these answers. Most of them makes sense. However, I am still convinced that transitions and states are not so closely related as it is enforced by QML. To me, states are more about logic, than about properties and assigned transitions. Thus the most important thing would not be transitions but onEnter, onLeave, onUpdate handlers and of course custom methods/actions. From these I could easily invoke any transition, which would more become a collection of Animations. This would nicely decouple the two things, and I could even reusing transitions for different states or objects or even refactor them into a separate file.

    I have to try your key-press example. I guess, I'm slowly understanding what you are doing there. :-)

    Powerful stuff, once you understood QML's potential...

  • Stopping all the animation at a time in QML ?

    3
    0 Votes
    3 Posts
    3k Views
    M

    Depending on the circumstance, you might also be able to bind the running property of each animation to the same property (e.g. property bool animationsEnabled). Stopping all the animations is then just a matter of setting that property to false.

  • 0 Votes
    2 Posts
    2k Views
    S

    Turned out that you can do this directly from the other component just by referring to the name of Flipable component. Awesome.

  • Recommended approach for displaying tooltips

    5
    0 Votes
    5 Posts
    7k Views
    A

    [quote author="korzhp" date="1289378399"]look at http://qt.gitorious.org/qt-components[/quote]

    As korzhp said, take a look at Qt-Components. There you'll find a QML implementation of the Mx toolkit; in src/Mx/ you find the implementation of a tooltip. Run examples/mx/test.qml to see it in action in the Mx widgets gallery :-)

  • XOverlay on a QDeclarativeItem

    5
    0 Votes
    5 Posts
    4k Views
    M

    If you build the QML app and run it, you will see a debug output like "Run ./overlay 12345" Go over to your overlay build, and run that command. The Qt app will be replaced with the test pattern, but you can still click the little Rectangle in the GUI.

    In the Qt app, I even try to lower the overlay QWidget at line 13, but still the XOverlay covers the entire window. I want the little red rectangle from main.qml to be on top of the overlay QWidget.

    For now, I am calling overlay->show() as an independent window, so I wind up with two windows for my app. That works, but it would be great to have the overlay inside Qt Quick so I could use state transitions and animations on its size and shape.

    Let me know if you figure something out!

    Regards,
    Matt

  • Qt controls in QML

    10
    0 Votes
    10 Posts
    7k Views
    D

    Tobias, yeah, something like that. Came from MFC or something near it.

    bq.
    Vincent Vega: "And you know what they call a ... a ... a Quarter Pounder with cheese in Paris?"
    Jules: "They don't call it a Quarter Pounder with cheese?"
    Vincent Vega: "No man, they got the metric system. They wouldn't know what a Quarter Pounder is."
    Jules: "Then what do they call it?"
    Vincent Vega: "They call it a "Royale" with cheese."

  • 0 Votes
    2 Posts
    2k Views
    S

    Nevermind, got it :D The problem was in nameSpaceDeclaration - it should be like this:

    @namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"@

  • 0 Votes
    8 Posts
    7k Views
    M

    I solved this with a little help from C++. Using rootContext->setContextProperty(), I created a C++ class with Q_INVOKABLE methods that:

    @setGrabCursor(bool doit) const
    {
    if(doit)
    QApplication::setOverrideCursor(QCursor(Qt::ClosedHandCursor));
    else
    QApplication::restoreOverrideCursor();
    }@

    From my app, when I detect a long press on my ListView delegate, I call setGrabCursor(true) and make a full screen mousearea active that marks mouse events as accepted. I tie the mouse y coordinate to the listview contentY inside of a onPositionChanged() handler. On single click of the mousearea, I call setGrabCursor(false).

  • Buttons in a Flickable item

    3
    0 Votes
    3 Posts
    3k Views
    J

    Thanks! This solved all of my issues!

  • 0 Votes
    5 Posts
    4k Views
    E

    Thanks a lot, it works. It was one of the variants of directory structure which I missed.

  • Regarding QML

    4
    0 Votes
    4 Posts
    3k Views
    ?

    krish, there is a "TV Tennis" example that ships with Qt 4.7.1, chk the sources ... that might help

  • Keyboard focus. Bug in the documentation?

    3
    0 Votes
    3 Posts
    2k Views
    B

    The reason for the duplicated ids is indicated in the text below the example:

    [quote]
    The right hand side of the example shows the expanded code - the equivalent QML without the use of the component MyWidget.
    [/quote]

    The code is a theoretical expansion of the code in the left column; it's not real, usable code.

    With regards to the focus being on the second rectangle, the docs above the example code states:

    [quote]
    Here we create two instances of our previously defined component, and set the second one to have focus.
    [/quote]

    so this seems ok.

    However if there are problems in the docs they should definitely be reported at http://bugreports.qt.nokia.com.

  • Font property styling

    6
    0 Votes
    6 Posts
    6k Views
    B

    You'll need to set the individual font properties like font.family, font.pointSize etc. instead of just setting 'font'.

    You may be interested in this: "http://developer.qt.nokia.com/wiki/QmlStyling":http://developer.qt.nokia.com/wiki/QmlStyling

  • Qt Mobility QML Video Element plugin example

    2
    0 Votes
    2 Posts
    2k Views
    2

    hi. You might be interested in this: "Multimedia QML Plugin":http://doc.trolltech.com/qtmobility-1.1.0-beta/qml-multimedia.html

  • Two line elided Text

    4
    0 Votes
    4 Posts
    5k Views
    B

    Thanks guys.

  • 0 Votes
    2 Posts
    4k Views
    M

    Hi,

    If the model is primarily going to be manipulated from C++, you could also consider writing a custom QAbstractListModel subclass (you'll need to handle the threading yourself though)

    Regards,
    Michael

  • ListView and onCurrentIndexChanged

    2
    0 Votes
    2 Posts
    8k Views
    M

    You could only set root.currentIndex once the view has stopped moving:

    @ onCurrentIndexChanged: if (!moving) root.currentIndex = currentIndex
    onMovingChanged: if (!moving) root.currentIndex = currentIndex@