跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k 主題 77.8k 貼文
  • Create new Element on demand

    6
    0 評價
    6 貼文
    2k 瀏覽
    S
    Thanks for you answer!
  • QtGui.QIcon("filename.png") results in blank button, version PyQt4.4.4

    1
    0 評價
    1 貼文
    3k 瀏覽
    尚無回覆
  • Zetcode tutorial vs what works for me. Version difference?

    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • Drawing a graph in Qt Quick 2.0

    4
    0 評價
    4 貼文
    3k 瀏覽
    Q
    Hello, thanks for the answers. chrisadams , I didn't know about beginCreateObject, I'll try it! Maybe I could use the C++ side of the animation engine, or maybe use a QtObject for each line just to handle state and position, and do the drawing in a shared item... Jens, this was "option three": using an QSGItem directly. Unfortunately this approach works, but requires to generate a low level tessellation of the geometry. This means that you cannot use all the QPainter goods, and you need to generate the vertexs, color coordinates, textures (line caps, joins,effects,gradients, etc...). This will be much faster but requires a good amout of work. And even in this case I "suspect" that I'll have to share vertex buffers, I don't think creating a number of small nodes/buffers will be so good in terms of performance...
  • Dynamic QML object question

    5
    0 評價
    5 貼文
    2k 瀏覽
    cmessineoC
    I'm using 4.8.4. I don't think it can be done. There doesn't seem to be a way I can trap that event when I create the keyboard dynamically.
  • Confused about keypress event

    2
    0 評價
    2 貼文
    2k 瀏覽
    L
    Perhaps you can upload your files somewhere so other people can try it on their local machine.
  • Smoothly rotate a Rectangle in QML

    6
    0 評價
    6 貼文
    4k 瀏覽
    U
    Ah, you are using Qt4... it seems there is no such property in QtQuick 1...
  • Get/Set cookies from qml

    6
    0 評價
    6 貼文
    4k 瀏覽
    D
    Exactly. While there is no reason why that shouldn't be possible using pure QML. P.S. Maybe that's possible using webkit but that's different topic.
  • Rectangles & padding

    4
    1 評價
    4 貼文
    25k 瀏覽
    C
    It is the anchors which define how the child rectangle fills the parent rectangle. Remember, in QML, just because an object instance is declared within another one does NOT mean that it is visually located inside that other one. The positioning (either via anchors, or some other positioning method) define where it "appears" and thus the positioning also defines the spacing / padding. So, to implement what you want, just add an "anchors.margins: 10" to your anchors declaration. Note that the margin can also be specified separately for each edge; see http://doc-snapshot.qt-project.org/qt5-stable/qtquick/qtquick-positioning-anchors.html for more information. Cheers, Chris.
  • Updating fontSize via function key call - calling functions in QML

    6
    0 評價
    6 貼文
    3k 瀏覽
    D
    Thank you. That was what I was doing but there was a typo blush
  • QML Drag Outside of Window

    7
    0 評價
    7 貼文
    3k 瀏覽
    R
    Just cloned it. Thanks a lot
  • <Resolved> Convert QHash <long long int, QList<long long int>> into a QVariant

    9
    0 評價
    9 貼文
    6k 瀏覽
    T
    Done! Thanks:)
  • UI Designer for Qml

    6
    0 評價
    6 貼文
    9k 瀏覽
    M
    Unfortunately the available plugin for Photoshop does not generate clean code and its much easier to write everything from scratch (besides Adobe Fieworks in my opinion its much better at UI). I design professional interfaces, and QML is by far my favorite language. He simply outclasses HTML5 with hisanchor based layout and and performance. Feel free to write me: "www.userinterfacedesigner.pl":http://www.userinterfacedesigner.pl/
  • Is QQmlListProperty(QObject * object, QList<T *> & list) safe to use?

    2
    0 評價
    2 貼文
    3k 瀏覽
    C
    Hi, This is actually a really interesting question, and one I didn't know the answer to - I had to ask Andrew den Exter who explained it to me. Basically, it means that because (with this ctor) the type doesn't have a chance to define the append / clear / whatever functions, anyone who modifies the content of the list does so "without informing the owner of the list". This means that if the content of list is owned by the owner of the list property, that content will be leaked if it is cleared. Similarly, if content is appended to the list and it has no owner (and thus the list property owner "should" take ownership via QObject parenting), that will not happen either. In short: "it allows the content of the QList to be modified without any notification to the owner of that list". Aside from that issue, QDeclarativeListProperty is a tricky beast which (imo) needs careful consideration when writing new code, even when the "safe" API is used. For example: @ // imagine TWDLP is a "type with declarative list property" which has a DLP called "filters". // the "filters" property takes a list of Filter instances, say. // and imagine that TWDLP offers a Q_INVOKABLE QString matches(const QVariantMap &trie) const; // which uses the filters property to return a concat string of things which match the filters. TWDLP { id: root property var trie: { "a": ["abcde", "abdef"], "d": ["defab", "deabf"] } Filter { id: filterOne criteria: "abc" } Filter { id: filterTwo criteria: "def" } Text { text: root.matches(trie) } Button { id: toggleFilter property int whichFilter: 2 onClicked: { if (whichFilter == 1) { root.filters = [ filterTwo ] whichFilter = 2 } else { root.filters = [ filterOne ] whichFilter = 1 } } } } @ In this instance, the assignment is an interesting one, since you definitely do not want to delete the existing contents of the list if it had a QObject parent when it was originally assigned - even if that parent is the owner of the list property (as in this case). I hit this issue a while ago in an API I was writing, which is why it stuck in my memory. See https://github.com/nemomobile/nemo-qml-plugins/commit/fe175e122294b0c0f98396b239353b91d0bb4bd9 for that one ;-) Cheers, Chris.
  • Starting out with QML, looking to get some recommendations

    4
    0 評價
    4 貼文
    3k 瀏覽
    S
    Excellent thanks, I think we started off with with pulling QML into qt widgets because it was easier, but we are separating the UI with our back end now, we might swap it for the distinction.
  • Qt Quick 1.1 ScrollBar

    5
    0 評價
    5 貼文
    2k 瀏覽
    H
    thanx utcenter for providing me the link...i'll try this...
  • QML component assignation

    7
    0 評價
    7 貼文
    2k 瀏覽
    A
    thanks mutaphysis I'll try your approach
  • 0 評價
    1 貼文
    838 瀏覽
    尚無回覆
  • QML, QtQuick2 performance, How to get the best of OpenGL?

    13
    0 評價
    13 貼文
    9k 瀏覽
    S
    Here are video taken from the following example: "QmlTestLag.zip":http://www.filehosting.org/file/details/425271/TEstLagQtQuick2.zip My graphic cards are Nvidia Quadro NVS 450, Mosaic Is activated, though Widows See only one big screen in its setup: "Video Qt4Quick1":http://www.youtube.com/watch?v=p9le7cVfQug Qt4, Quick1, 1 HD Screen qmlviewer: ~12%CPU Animation is smooth Qt4, Quick1, 4 HD Screen qmlviewer : ~12%CPU Animation is smooth "Video Qt5Quick2":http://www.youtube.com/watch?v=VNEfkWkjDPE Qt5, Quick2, 1 HD Screen qmlscene : ~4%CPU Animation is very smooth Qt5, Quick2, 4 HD Screen qmlscene : ~12%CPU Animation is really lagging I have the same behavior when I use our custom main to display the QPML Application, so I think it is a good example. What I would Conclude: Quick2 is more CPU consumption friendly CPU is no the limit Qt Render even the part which does not need to be updated
  • How to RUN MAPViewer example from qtlocation

    4
    0 評價
    4 貼文
    2k 瀏覽
    A
    Qt Location does not currently support 3D maps.