Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.1k Posts
  • How to add QML widgets in QGraphicsScene version QtQuick 2.0

    4
    0 Votes
    4 Posts
    2k Views
    sierdzioS
    I don't know why are you using QGraphicsScene, so I don't know which of the alternatives to offer. To combine QtWidgets with QtQuick module, you need to take a look at "createWindowContainer":http://qt-project.org/doc/qt-5.1/qtwidgets/qwidget.html#createWindowContainer() function.
  • This Flickable won't flick or drag

    2
    0 Votes
    2 Posts
    688 Views
    Q
    I found the issue. Because I hard-coded the height of the Flickable's child, the Text element, there was no content larger than the Flickable to scroll through.
  • 0 Votes
    3 Posts
    2k Views
    4
    The order of creation is not guaranteed. In cases where the asynchronous loading does not take the same time per delegate, you could see any random order happening. The difference between qmlscene and qtquick2viewer is odd though, and could be caused by QTBUG-31203. If you prefer the qmlscene like behavior, try using this as your C++ application: @ int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); QQuickView v; v.setSource("main.qml"); v.show(); return app.exec(); } @
  • [SOLVED] Resize an Image after rotation to fill it's parent

    5
    0 Votes
    5 Posts
    2k Views
    GianlucaG
    I used the second solution.
  • Memory usage with QtQuick 2.0

    3
    0 Votes
    3 Posts
    1k Views
    O
    Hi Qurx, Don't you think that it could be a memory fragmentation issue ? I'll take a look to find a workaround but... you'll probably need to change your OS version. Bye
  • Own window frame for the application

    4
    0 Votes
    4 Posts
    916 Views
    T
    QWindow has setFlags(), see "the documentation here":http://qt-project.org/doc/qt-5.1/qtgui/qwindow.html#flags-prop
  • QAbstractListModel with QML

    3
    0 Votes
    3 Posts
    7k Views
    S
    hey yudjin, thanks for that example. Yesterday I stumbled upon this one https://qt.gitorious.org/qt/qtdeclarative/source/87d0c02fab03b7d3bf2094af22465f029bcdd096:examples/quick/models/abstractitemmodel . Both examples are pretty helpful in this case.
  • Accessing Image inside a Tab

    2
    0 Votes
    2 Posts
    743 Views
    R
    well, I solved the issue by setting an alias property for image in ScrollView and accessing the ScrollView using the item property of Tab.
  • Setting property based on role

    5
    0 Votes
    5 Posts
    2k Views
    B
    Sort of. I got around the problem by creating custom delegates that I then let handle input. So the table @ TableView { ... TableViewColumn { role: "value"; title: "Value"; delegate: selectDelegate } @ The delegate @ Component { id: selectDelegate Item { function select(model) { switch(model.definition.type) .... // this is just an enum defined in my code return aComponent } Component { id: aComponent // Something that can handle clicking and so forth } Loader { property var localModel sourceComponent: select(model[styleData.row]) Binding on localModel { when: status == Loader.Ready value: model[styleData.row] } } } @ Since I end up with a delegate of my own I get to choose explicitly how localModel maps to my controls. In my case its a property editor so I have multiple types of components to handle color, text, date, etc so you could simplify this down.
  • QML to EXE/without DLL

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Rich Text Link Active Color

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    6 Posts
    5k Views
    P
    Please post additional information about the issues you are facing, specifically as described in - http://gpupowered.org/node/27
  • QProcess not running command correctly & freezing gui

    5
    0 Votes
    5 Posts
    2k Views
    M
    Still only launches easystroke and freezes :(.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    4 Posts
    1k Views
    D
    Thanks, seems it is ok
  • 0 Votes
    5 Posts
    2k Views
    A
    Thanks fonzi337, yours is a nice solution but unfortunately doesn't solve all my problems. [quote author="fonzi337" date="1386355198"] The if check in commitExposure() also ensures you avoid an infinite loop when the user modifies the exposure value using the SpinBox. [/quote] In commitExposure i can't check the current value because the camera code is running on another thread connected through signals. Maybe i can keep a copy of the state of the camera on the GUI thread and/or expose a camera object directly to QML. It sound like a lot of unneeded complications. It's the spinbox that knows the cause of the valueChange event, it's so strange this information is discarded and now i must guess it studying the variation of the values. Update: I'm continuing testing possible solutions so i update the post just in case someone else have a similar problem. I was trying to connect the camera object directly to QML to avoid too many signal/slot connections. This is the result: @QQmlEngine: Illegal attempt to connect to Camera(0x22fd88) that is in a different thread than the QML engine QQmlApplicationEngine(0x22fe70).@ So I think this option is not viable.
  • [solved] Image with rounded corner

    4
    0 Votes
    4 Posts
    1k Views
    p3c0P
    That's great :) You can mark the post as solved. Just edit the title and prepend [solved]
  • Is QML Guaranteed to be Processed serially?

    2
    0 Votes
    2 Posts
    906 Views
    sierdzioS
    QML is read first, then it's being processed in an event loop. You can't depend on that being sequential. But if your model is done properly, the engine will detect that "rectangles" has hanged and will be updated once the changes are done.
  • Is it possible to set the root object of an QQuickView?

    1
    0 Votes
    1 Posts
    688 Views
    No one has replied
  • PropagateComposedEvents to ComboBox not work

    1
    0 Votes
    1 Posts
    964 Views
    No one has replied