Fix qml item behavior
The problem is that you are mixing the parent with the “parent” id. Try this: (oh and it is spelled “length” :) import QtQuick 2.0 Rectangle { width: 500 ...
View ArticleHow to pass QAbstractListModel derived class to QML using setProperty?
Hello! On QML side I have an element, that contains a ListView plus some additional elements like scroll bars, control buttons etc. On C++ side I have a QObjectList of some items that I’m passing to my...
View ArticleSave single Item as image
get the texture from QQuickItem::textureProvider()::texture() – textureProvider() always returns 0 Did you do “layer.enabled: true” on the item on the QML side? Otherwise as you note it won’t have a...
View ArticleQML ListView currentItem doesn't change after a sort
Hello. I have a ListView tied to a QAbstractListModel in C++ by way of a QSortFilterProxyModel so the list contents can be sorted (dynamic sorting is enabled). My problem is simple: Say the ListView...
View Article[Qt5] PathView flicks very very slow at some point
The code works well when Qt 4. It’s like an advertising column. import QtQuick 2.0 Rectangle { id: desktop width: 1258 height: 697...
View ArticleHow to pass QAbstractListModel derived class to QML using setProperty?
Thank you! I just also needed to add Q_DECLARE_METATYPE(CListModel* ) to .h file.
View ArticleQML ListView currentItem doesn't change after a sort
Really what this comes down to is this: if the ListView knew when an item was moved (e.g. sorted), I could run a function to loop through its children and make sure the right item (the models have IDs...
View ArticleQML Gradient Any Direction - SOLVED
Good day I leave here a way to gradients in any direction. I make a new component called “Gradiente” Code in qt 5.0.1 gradiente.h #ifndef GRADIENTE_H #define GRADIENTE_H #include...
View ArticleAudio jumps up system mixer (linux,Qt5)
I added Audio element from QtMultimedia 5.0. No settings, just id set. By this id with button i adding source and activating play(). Then play activates first time system mixer volume ups to 100% and i...
View ArticleQML/SceneGraph rendering performance on eglfs
Hi, I can’t really help with this, except to point to Gunnar’s blogs: http://blog.qt.digia.com/blog/author/gunnar/ One possibility: if something is happening in the animation which requires (every so...
View ArticleCan QtQuick1 and QtQuick2 be used in a same program?
Because QtQuick2 can’t display transparent window on Windows, so I plan to use QtQuick1 in part of my program. Meanwhile I want to use some feature of QtQuick2, so there are both QtQuick1 and QtQuick2...
View ArticleUpdating fontSize via function key call - calling functions in QML
Thought that was probably the case but did not know how to get round it. Property is an excellent idea thanks :-) Have a good weekend.
View ArticleMemory leak when passing data between C++ objects and QML
Hi, as I’m facing the same problem (QtQuick 2, QT 5.0.1) – did you ever get a solution for your problem? Thanks, Bruno
View ArticleUpdating fontSize via function key call - calling functions in QML
One last thing. Any thoughts on how I would use the same variable idea to sort the menuEntry width? When changing the font size I need the width of menuEntry to be the font width but all the strings...
View ArticleCustom C++ types and QJSEngine
Since there were no replies, and I don’t think such custom types are supported as of yet, I created a corresponding bug report: https://bugreports.qt-project.org/browse/QTBUG-29769
View ArticleQML ListView currentItem doesn't change after a sort
I figured this out… but my solution was pretty nasty. The only way to ensure the right delegate was selected was to re-check which one was selected every time the layout changed (since the layout...
View ArticlePerform movement across path
Hi all. I’m developing an app using QtQuick 2.0 and C++. In the C++ side, I have a class which inherits from QQuickPaintedItem and shows on the QML side some Bezier Curves or different lines. What I...
View ArticleQML & C++ : ReferenceError
Hi, I’m writing a QtQuick app, and I need to use some Qt C++ functions, but when I try to access to my class method I get this error:...
View Article