Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • Combobox and Menu doesn't work in Full Screen QML

    8
    0 Votes
    8 Posts
    3k Views
    p3c0P
    @EmulationQt Well then you should update that bug report or add a new bug with these details and a small example.
  • [SOLVED] Define states into separate QML file

    2
    0 Votes
    2 Posts
    534 Views
    F
    Meanwhile I found a solution by myself as follows: main.qml States { id: states } states: states.myStates States.qml Item { property list<State> myStates: [ State {}, State {}, State {} } } Is this already the best way to achieve what I want or are there any better solutions? Thanks and best regards, Markus
  • Import JavaScript library into "WorkerScript"

    4
    0 Votes
    4 Posts
    1k Views
    p3c0P
    @sk2212 But it seems that another new instance of this library is created although the first line in "test.js" is ".pragma library". Therefore I cannot use this approach for saving a global setting. Yes it ignores pragmas and imports. See including-a-javascript-resource-from-another-javascript-resource for more info. import will only work in QML so you can go with your solution.
  • 0 Votes
    1 Posts
    401 Views
    No one has replied
  • Why do some apps run properly w/wo visible property?

    2
    0 Votes
    2 Posts
    484 Views
    p3c0P
    @sosun Which are the components which you think run with or without visible: true ? If it is Window then it has to be set true explicitly.
  • (Sloved) Change tab title in TabView

    3
    0 Votes
    3 Posts
    2k Views
    ?
    @p3c0 said: @EmulationQt Use getTab to get tab at particular index and then access its title mytab.getTab(0).title = "New tab Title" Thank you @p3c0 :-)
  • [SOLVED]Qml changes in version 5.5

    4
    0 Votes
    4 Posts
    1k Views
    p3c0P
    @ealione I noticed that some things have changed for Qt Quick on version 5.5, like not having the option to create a purely qml project. It is still there. You have to enable it in Qt Creator. Go to Help > About Plugins > Qt Quick > QmlProjectManager > check it
  • 0 Votes
    3 Posts
    1k Views
    SGaistS
    Hi, To add to @koahnig , this article explains very well how to setup dependencies efficiently
  • How to apply frost-Effect (blur and transparency) to parent?

    1
    0 Votes
    1 Posts
    896 Views
    No one has replied
  • Interacting with QML Objects from C++

    qml qt signal p
    22
    0 Votes
    22 Posts
    7k Views
    K
    @p3c0 That is exactly what I need. Thank you :)
  • Creating "matrix-look-like" graphics

    1
    0 Votes
    1 Posts
    393 Views
    No one has replied
  • QGraphicsProxyWidget equivalent for QtWebEngine

    qtwebengine
    1
    0 Votes
    1 Posts
    665 Views
    No one has replied
  • Qt Quick GridLayout how to set item to column and row like qt widgets?

    2
    0 Votes
    2 Posts
    765 Views
    p3c0P
    @glararan IMO it would be better to use a ListView with a custom delegate consisting of those items i.e Image on left side with Text items anchored to its right.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • QQuickItem breaks batching

    3
    0 Votes
    3 Posts
    830 Views
    Z
    Thanks for the reply. Is there a way I can set the background of the QQuickItem to a fully opaque colour? I'd like to try it to see if it helps at all. I tried wrapping it inside an opaque Rectangle but that didn't work. At the moment the QQuickItem itself basically draws a grid on top of the parent item, but it doesn't fill its own background in.
  • Restore anchors.verticalCenter

    6
    0 Votes
    6 Posts
    5k Views
    F
    Awesome. Thanks for the hint!
  • Static linking of QT standard library

    static linking qt5core.dll not
    4
    0 Votes
    4 Posts
    2k Views
    K
    Basically no, there is always some type of license for Qt libs in place. Either you use LPGL for no cost or a commercial license. However, this is the same as with any other SW around. Please check out the different options for licenses.
  • QML AbstractItemModel access by Row and Role

    qabstractitemmo role
    4
    0 Votes
    4 Posts
    8k Views
    R
    @t3685 As stated in the OP, I know I can write specific getter/setter methods into my QAbstractItemModel subclasses. However, if that really was the only option then QML would be effectively useless for nontrivial data-driven applications as the data models cease to be a standard interface. @p3c0 Thanks, I hadn't thought of doing it that way. In Qt 5.4 you can do this if you set Q_INVOKABLE on QAbstractItemModel::index(int row, int column, const QModelIndex &parent) and QAbstractItemModel::data(const QModelIndex &index, int role) methods. I'm guessing this has been done for you in Qt 5.5. I have also found that in Qt 5.4 (and presumably 5.5) it's also possible to get there via a DelegateModel (often called a VisualDataModel in the documentation), as the DelegateModelGroup within that has a get(row) function that returns an Object through which you can access the data in the same way as in a QML Delegate. http://doc.qt.io/qt-5.4/qml-qtqml-models-delegatemodelgroup.html#get-method However, I haven't yet figured out when it reads the data from the underlying model. Thus, if the DelegateModel has only the default DelegateModelGroup: myDelegateModel.items.get(%row%).model.%role_name% In this, myDelegateModel is a DelegateModel object (which may also be used as the model in a ListView, GridView or PathView), %row% is the row number and %role_name% is the role. Set myDelegateModel.rootIndex to the appropriate parent QModelIndex. PS: $Deity the documentation is beyond awful. So many links straight back to exactly where you are masquerading as a link to what the thing is.
  • How to add scrollbar or scrollview QML ComboBox 's dropdown menus

    3
    0 Votes
    3 Posts
    3k Views
    jiancaiyangJ
    In my memory, the scroll bar automatically shows when the candidate items are more than the screen could visualize.
  • [resolved]Open file dialog in webView

    webview filedialog open
    12
    0 Votes
    12 Posts
    7k Views
    M
    Problem resolved, link to the solution