Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • How to dynamically change GridView column count?

    2
    0 Votes
    2 Posts
    2k Views
    V
    hi Allopen QWidget::resizeEvent() which you can reimplement in your widget.In this you can change the grid.celwidth.
  • How to access two frame buffers by single application.?

    2
    0 Votes
    2 Posts
    1k Views
    B
    @QWSServer *server = QWSServer::instance(); QScreen *screen = QScreen::instance(); server->enablePainting(false); screen->shutdownDevice(); screen->disconnect(); screen->connect("/dev/fb2"); screen->initDevice(); server->enablePainting(true); server->refresh(); @ default is /dev/fb0. This code will start to use /dev/fb2.
  • Comboboxes are drawn wrong.

    1
    0 Votes
    1 Posts
    707 Views
    No one has replied
  • Can't display custom c++ based Item

    6
    0 Votes
    6 Posts
    2k Views
    sierdzioS
    You can take a look at my CCF project. It is rather large, but I do a lot of tricky QML stuff, including custom painting. It should work out of the box in Qt Creator. "Link to custom-painted class":https://github.com/sierdzio/closecombatfree/blob/master/src/qmlBase/ccfqmlbasemap.h.
  • 0 Votes
    4 Posts
    2k Views
    J
    I'm missing big parts of your code. Next time please place your code between at-sign characters (most right icon on the top) I do not quite understand what your trying to do, but as far as I know putting JavaScript code in the component does not work. You may put them in the attached property Component.onCompleted. @ Loader { id: cmpntLoader Component{ id: dialogComponent property int slotNum // I expect you have something like this too Component.onCompleted: { var component = Qt.createComponent("BrandPopup.qml"); if (component.status === Component.Ready) { component.createObject(main, {"slot":slotNum}); } } } @ Maybe it would help if you give a more complete example of your code to show what you try to do.
  • How does the "Getting Started" tutorial code actually launch?

    3
    0 Votes
    3 Posts
    1k Views
    U
    I'm using Qt 5.1.0 and the following process works for me. Copy an example directory to somewhere. $ cd ~/src $ cp -r /usr/local/Qt-5.1.0/examples/quick/tutorials/gettingStartedQml/parts/part5 ./ Make plugins of the example (if any). $ cd filedialog $ qmake $ make When you see .pro file, you can execute qmake and make to build .cpp files. Run the example $ cd ~/src/part5 $ qmlscene TextEditor.qml
  • Public API for creating user defined basic types

    2
    0 Votes
    2 Posts
    792 Views
    SGaistS
    Hi, Since it's getting to private API, you should rather ask this question on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)
  • 0 Votes
    6 Posts
    5k Views
    sierdzioS
    I don't think they are in any way related.
  • Help with this simple property change

    6
    0 Votes
    6 Posts
    1k Views
    Q
    In the gradient stop, I should have used testrect.gradcolor. I forgot to reference where the property came from.
  • 0 Votes
    8 Posts
    10k Views
    C
    Oh! Sorry, I clearly wasn't paying attention. My bad. You get the same error? If you #include <qqml.h> does it fix the issue? I expect not, since I assume that the QQmlEngine header would include that, but clearly there's some header in the module which is included by the module include (QtQml) but not from QQmlEngine or QQmlView... Strange. Cheers, Chris.
  • Problems with Gridview

    5
    0 Votes
    5 Posts
    2k Views
    D
    Thanks for your response and explanations Jens. I've definately learnt a bit more about Qml.
  • Cannot set an image background in a Button (qt quick controls)

    3
    0 Votes
    3 Posts
    2k Views
    M
    Thank you, I've work around it with the Image child solution ;)
  • [Solved] ComboBoxStyle: QtQuick.Controls and QtQuick.Controls.Styles

    8
    0 Votes
    8 Posts
    5k Views
    H
    I've recreated the files (luckily in the bin) and reopened the project. It now works. I have no idea of what happened, and why I cannot reproduce the error. In the meantime I have also rebooted Qt Creator (it hang - otherwise I would not have done this). Maybe the issue was related to that as well? (Qt Creator was not rebooted before I got it working in the new project, so it was not the reboot only that did it) Again, thanks for your help.
  • Import Qt Quick Components

    5
    0 Votes
    5 Posts
    2k Views
    I
    ah ok very nice thank you
  • How to change the Screen coordinates to bottom left corner

    3
    0 Votes
    3 Posts
    1k Views
    ?
    [quote author="sierdzio" date="1375952043"]This is the standard in TV and graphics: the root is top left corner. You can rotate the whole scene using Transform element, that would simulate a different coordinate system.[/quote] Hi, I Will try this. Thank you
  • How to use console.log in this case

    3
    0 Votes
    3 Posts
    946 Views
    Q
    I see, so the brackets basically act like an anonymous function in place.
  • Tree View on QML

    4
    0 Votes
    4 Posts
    10k Views
    U
    :) Wow this post was unanswered for a long time which had me post a simplified version of the code I used in my project at http://www.codeproject.com/Articles/632795/QML-TreeModel-and-TreeView a few days back. Component recursion and apropriate javascript object for the model can build trees (etc.) of any complexity. The code is dynamic and can add / nest subnodes to any depth.
  • Who takes care of deleting QImage returned from QQuickImageProvider?

    4
    0 Votes
    4 Posts
    2k Views
    C
    It's a cache of QQuickPixmap rather than QPixmap. I should have been clearer. Probably best to read the code I linked at gitorious. To create a texture from a QPixmap, it is first converted to a QImage. The rest of the code is basically identical, and it's cached the same way (what is cached is QQuickPixmapData which consists of a texture factory for the image data). In short, two requests for the same QQuickPixmap (ie, see QQuickImage for an example) won't need to go through the provider->requestImage() or provider->requestPixmap() codepath; instead, the data will be returned directly from the cache. Performance should be mostly identical, I guess. Benchmark it to find out for yourself though, as I may be wrong about that. Certainly pixmap.toImage() must have some overhead. What is eventually rendered is a texture, not a pixmap or an image, of course. Cheers, Chris.
  • The model data in the model data

    2
    0 Votes
    2 Posts
    815 Views
    JKSHJ
    Hi, You probably want a tree model, not a list model. Let your top-level model have 1 column, and m rows for m people. Let each top-level item contain a child model with n rows for n phones. The child model should have 4 columns, one for each property of the phone (name, colour, model, image).
  • 0 Votes
    8 Posts
    3k Views
    SGaistS
    Read this "followup":http://woboq.com/blog/qthread-you-were-not-doing-so-wrong.html article. Most of the time you don't need to subclass but in some cases you have to