Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • MouseArea: making it stop capturing mouse events

    1
    0 Votes
    1 Posts
    827 Views
    No one has replied
  • [SOLVED] QML Qt.createQmlObject how to refer variable

    3
    0 Votes
    3 Posts
    2k Views
    M
    Thanks:)
  • How does QTreeWidget parse SQL tables?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Speeding up Rendering of Repeater Item containing ShaderEffects

    1
    0 Votes
    1 Posts
    673 Views
    No one has replied
  • Register QTreeView To Qml using QGraphicsProxyWidget (QtQuick 2.0)

    2
    0 Votes
    2 Posts
    3k Views
    J
    No, I'm afraid that is exactly what it means. QGraphicsProxyWidget is a QGraphicsItem and not a QQuickItem. Since QtQuick 2 is not built on top of QGraphicsView like QtQuick 1 was, it is no longer possible to add widgets this way. One possible solution would be to port QTreeView into a QQuickPaintedItem yourself. The other option you have is to embed QtQuick 2 into a widget application, which will be supported in 5.1.
  • [SOLVED] Layout (ColumnLayout) margins doesn't work in SplitView

    8
    0 Votes
    8 Posts
    15k Views
    J
    Yes, the alignment was added after "columns" and "rows" was added, so that makes sense.
  • Calculating bounding shape of group of elements without corners

    1
    0 Votes
    1 Posts
    858 Views
    No one has replied
  • Can C++ totally replace Javascript?

    4
    0 Votes
    4 Posts
    3k Views
    Z
    You cant go wrong with C++. Python and JavaScript. Having these three languages under your belt, equips you for just about any programming related task, System, Desktop, Network, Game, Web, ...
  • Slow qml animation on linux

    2
    0 Votes
    2 Posts
    2k Views
    D
    Everything is connected to the drivers from intel and opengl. And tunning systems. After testing on pure gentoo linux performance equaled the windows 7 - the animation runs smoothly, although the CPU load. Do I right, that this is partially software rendering? Does it make sense to try to rebuild without qt opengl or not (and, indeed, how it can be done)?
  • QtQuick 2.0, read a QList<QString> from C++

    3
    0 Votes
    3 Posts
    1k Views
    O
    [quote author="DRAX" date="1368091405"]Have you tried: @egcView.allfiles.length@[/quote] Thank you for your reply. I don't know where is the index iterator o which property. In the tutorial seems this task is made by QQmlListProperty. But in my gridview I don't know how to make this index or iterator.
  • 0 Votes
    3 Posts
    3k Views
    R
    Thank you, JapieKrekel, I did it and now it works fine! Program starts faster than before (but unfortunately slower than Qt Widgets application) and after changes I have to only press “Run”. I have one problem: I used Qt Fusion Style, not system style. How can I do this with qmlscene? I created "separate thread":https://qt-project.org/forums/viewthread/27602/ for this question.
  • 0 Votes
    1 Posts
    822 Views
    No one has replied
  • [SOLVED] Loading pure QML plugin from shared library and Qt Creator

    2
    0 Votes
    2 Posts
    2k Views
    D
    This is little old post, but can you please give some code example how did you made it? I am having same problem, but I am unable to solve it yet... This is thread: "http://qt-project.org/forums/viewthread/27538/":http://qt-project.org/forums/viewthread/27538/
  • How to install QtQuickControls on Qt 5.0.2?

    5
    0 Votes
    5 Posts
    2k Views
    sierdzioS
    PS. Qt 5.1 beta1 test builds are already online: "link":http://download.qt-project.org/snapshots/qt/5.1/5.1.0-beta1/backups/.
  • Create built-in quick component in C++

    2
    0 Votes
    2 Posts
    1k Views
    sierdzioS
    See "this":http://qt-project.org/doc/qt-4.8/qtbinding.html#loading-qml-components-from-c guide (it's for QtQuick 1, but it works the same in QML2, you just need to change class names).
  • 0 Votes
    2 Posts
    1k Views
    T
    Never mind :), my suggestion was the same as yours.
  • 0 Votes
    3 Posts
    1k Views
    O
    Trying this: @ Rectangle { x: 50 y: 50 width: 100 height: 100 color: "#FFFF0000" Node { x: 80 y: 80 radius: 20 color: "#FFFFCC00" } } @ Still renders Node behind the rectangle... Edit: I just submitted the problem to the QT Bug Tracker: https://bugreports.qt-project.org/browse/QTBUG-31043 Hopefully this will get a high priority and will get fixed soon... -Nik.
  • QML / Cpp plugin

    11
    0 Votes
    11 Posts
    8k Views
    W
    Ok, fine. Thanks a lot !
  • About rendering a QML Item into pixmap

    2
    0 Votes
    2 Posts
    3k Views
    M
    In case someone's interested, here's how I ended up doing this. It was only tested in my own special case where it works, it might not work properly elsewhere. The draw order is important.. anyway: @ void renderItem(QGraphicsItem* item, QPainter* painter, QStyleOptionGraphicsItem* option, const QTransform& baseTransform) { QTransform itemTransform = item->sceneTransform(); itemTransform *= baseTransform; painter->setWorldTransform(itemTransform, false); item->paint(painter, option, NULL); // Recurse into children //TODO this should be breadth-first not depth-first! foreach ( QGraphicsItem* child, item->childItems() ) { renderItem(child, painter, option, baseTransform); } } void Capture::save(QDeclarativeItem* item) { delete m_pixmap; m_pixmap = NULL; m_pixmap = new QPixmap(item->width(), item->height()); QPainter painter(m_pixmap); QStyleOptionGraphicsItem option; // Get the inverse transform of the root item's scene transform; all the // children's transforms will be transformed by this in order to bring // their coordinate systems from the scene space to the root item space QTransform inverse = item->sceneTransform().inverted(); // Recursively render the item and all its children renderItem(item, &painter, &option, inverse); } @ So the beef is that we're grabbing the scene transforms (which indicated how the items are positioned / oriented in relation to the root window/"scene") of each item and setting that to the painter. We're also transforming those transforms by the inverse transform of the root item we're drawing to bring the coordinate systems from the "scene space" into the root item's coordinate space. Matti ps. EDIT: could we please have the annotated code block to always (independent of the browser window width) allow for at least 80 characters per line without wrapping the lines? Would make the code whole lot more readable.
  • QtGraphicalEffects qml files into qrc?

    1
    0 Votes
    1 Posts
    982 Views
    No one has replied