Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • 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."
  • [Solved] Simple Flickr viewer - no pictures displayed

    2
    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
    8k 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!
  • How should I deploy an application that uses Qt.labs.particles?

    5
    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
    4k 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
    3k 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@
  • [Solved] preserve original aspect ratio on Image

    10
    0 Votes
    10 Posts
    8k Views
    ?
    2 beers and cheers to u 2beers :p glad it worked :)
  • Qt components questions

    2
    0 Votes
    2 Posts
    3k Views
    A
    [quote author="2beers" date="1288996077"] With other words, I can create my own PushButton using QML Elements, but it will be better to use an official pre-defined PushButton? [/quote] Yes, you can create your own PushButton (this is the way to go today). In the future, there will be the option to use the "official" one or keep using yours. Advantages of a "official" component: you won't need to maintain this code by yourself, probably more features, etc. [quote author="2beers" date="1288996077"] I found that qt components depends on meego touch library, may I ask why? [/quote] If you build the MeeGo configuration, yes, it depends on libmeegotouch. However, if you take a look at the Mx components you'll find a set of components with the look & feel of the Mx toolkit without any external dependency. More details are in the README file located in the root of the project. [quote author="2beers" date="1288996077"] aren't qt components build using qml elements? isn't qml cross-platform? Qt components will be meego specific or they will be used on other platforms? if yes will they look the same as on meego or they'll have the same look as native widgets? [/quote] The components may have a part of code in C++, it is expected. The point is: You are assuming "MeeGo Touch integration == Qt-Components", what is not true. The MeeGo touch integration aims to provide an API to allow the development of applications with QML integrated with MeeGo. It is at the same time an initial implementation of how the general components would be and an example of platform integration. Remember, Qt-Components is still work in progress, there are plans to separate the repository to make it easier to understand and to make clear the difference between what is Qt Components and what is a platform integration. (Maybe my answer wasn't clear enough, I'm sleepy...)
  • FolderListModel example showing just one file

    2
    0 Votes
    2 Posts
    2k Views
    L
    Forget it, my view delegate was producing items that filled the view port, this is why only one item was visible.
  • Error with QML demo minehunt on OS X

    9
    0 Votes
    9 Posts
    4k Views
    2
    Yes that's right, I have forget that QML is after all just a QWidget (if I'm right) so I can put it in my Qt desktop project. For that I will need an exemple ... like minehunt ;) At least I can read the source code :D
  • Qt.multimedia 1.0 package

    2
    0 Votes
    2 Posts
    3k Views
    ?
    is "this ":http://doc.qt.nokia.com/qt-mobility-snapshot/installation.html what you are looking for ?
  • QML Linux library dependences

    5
    0 Votes
    5 Posts
    4k Views
    M
    Hi, If they are working fine from Creator, but not from qtdemo, running with "-graphicssystem raster" may help (this is set by default when running qmlviewer/qmlobserver, but not when running qtdemo). Regards, Michael
  • A few questions/issues related to Qt Declarative in Qt 4.7.0

    4
    0 Votes
    4 Posts
    6k Views
    K
    Kim informed me that the include order issue above has been addressed and is fixed in Qt 4.7.1