Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • TableView does't update, but list into model is full

    Unsolved tableview qml empty table
    5
    0 Votes
    5 Posts
    948 Views
    fcarneyF
    Make a role for Qt::DisplayRole and call it "display". Then return data by column like you are doing to support tables. If I remember correctly TableViews are stuck on using the display role. ListViews seem to be more flexible. I don't know why though. I had to use 2 methods to support both listviews and tableviews if I remember corrrectly. You should only have to use the word "display" to support this role in your delegates. You can add it as another case to your role case so you can support both types of views.
  • Accessing QAbstractListModel's Data Through Properties In QML

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    fcarneyF
    @qtyler said in Accessing QAbstractListModel's Data Through Properties In QML: Could the DelegateModel type be used in some way to get an object with property bindings to an item in a model without using a view? It might. You can specify the index for the item, but I am not sure if it would look for children of the index or not. So it might not work as expected. How big is your list? Can you filter it to a sublist? If you try the ListView route you could track what it accesses out of the data() function by printing something to console. You could also delay load things using a loader keyed off selection criteria. Not sure how well it would see the roles from the model. Might be tricky.
  • Is it possible to change the animation duration after the animation starts?

    Unsolved
    2
    0 Votes
    2 Posts
    223 Views
    MarkkyboyM
    @QTLeearn -there may be plenty of ways to do this, I would start with trying Timer; PathAnimation { id: pathAnimation target: null // changed to 'null' so I can run the code duration: 5000 running: true path: null // changed to 'null' so I can run the code } // for notifying initial duration rate Timer { interval: 500 running: true repeat: false onTriggered: { console.log("duration is 5 seconds") } } // for notifying changed duration rate Timer { interval: 2500 running: true repeat: true onTriggered: { pathAnimation.duration = 2500 console.log("duration is now 2.5 seconds") } } }
  • multiple ListViews that include Delegates in a ListView - Scolling Issue

    Unsolved
    1
    1 Votes
    1 Posts
    120 Views
    No one has replied
  • Long GUI Thread Sync causes stuttering

    Unsolved
    1
    0 Votes
    1 Posts
    341 Views
    No one has replied
  • TcpSocket stateChanged signal is not emit

    Unsolved
    7
    0 Votes
    7 Posts
    756 Views
    W
    @jsulm Its status is not described because it is not particularly necessary. I try qDebug() << m_pTcpSocket->state(). in fnTcpStateChanged().but, console don't show debug string
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • accessing aggregates (QVector of a struct)

    Solved
    52
    0 Votes
    52 Posts
    8k Views
    mzimmersM
    @kshegunov thanks. I have some follow-on questions, but as they don't focus on the original intent of this thread, and as this thread has gotten fairly long already, I'm going to mark this as solved, and open a new thread. Thanks to everyone for the assistance on this.
  • Can't get WebView goForward() to work

    Unsolved
    1
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • Project ERROR: Unknown module(s) in QT: studio3D

    Solved
    7
    0 Votes
    7 Posts
    4k Views
    ShailendraS
    @kshegunov I am also facing the same issue in Qt5.15.2 for windows system. The 3D Studio is available in installed package[ under Tools] but if I try to include the studio3d module in my .pro file. It gives error. It was working fine previously. I installed the components via online installer. Please see below image for reference. The OpenGL runtime lib for 3D Studio are present in different directory. Can you recommend any solution for this. [image: 023580c7-b8c9-466e-a060-a905d960f507.PNG] [image: bdc45b85-b130-4766-9973-59e3768c930d.PNG] [image: fe137eb6-8ec2-42c6-88d9-34c54567d72e.PNG]
  • QML ComboBox and a C++ enum list

    Unsolved
    5
    1 Votes
    5 Posts
    4k Views
    adaitabeheraA
    enum class Color { Red, Green, Blue }; Q_ENUM(Color) QMetaEnum metaEnum = QMetaEnum::fromType<Color>(); QStringList enumStrings; for(int i = 0; i < metaEnum.keyCount(); ++i) { enumStrings.append(metaEnum.key(i)); }
  • Qt Quick3D model in model reflection

    Unsolved
    1
    0 Votes
    1 Posts
    219 Views
    No one has replied
  • Display 3D point cloud into QML

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    oria66O
    @Levicio Hi. I do not know what is the main purpose of your application, but you can use QtQuick3D with the new feature of custom geometry. Take a look at this basic example: https://github.com/oria66/test-qml-3dquickpc. It was developed based in https://www.qt.io/blog/what-is-new-in-qt-quick-3d-6.0 Version Qt 5.15.2
  • QML android webview error

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    C
    @Djeff said in QML android webview error: "ERR_UNKNOWN_URL_SCHEME This error is appeared because the WebView can’t recognize the URL Scheme,for example, the WebView will usually recognize only http and https, anything other than these. So WebView cannot parse it to right place, we should use intent to redirect the url. for example – intent://,market://,app://,mail:// etc will not be recognized by webview unless we add a handler to handle these url scheme or by disabling these schemes and only load http and https schemes. This error has no any specific solution till now. Android user and PC user all are facing this error which needs to be sought out. There's a long-standing bug in Chromium regarding how links without protocols are handled. It occasionally is patched, but seems to keep resurfacing. In some cases, prefixing your links with http:// (or https://) should resolve the issue for you. Also, in some cases, try to add target="_blank" in your URL Scheme/Code. for example: <a href="mailto:my@email.com" target="_blank">Link Text</a>
  • QML errors on objects exposed to QML via root setContextProperty in 5.15.2

    Solved
    8
    0 Votes
    8 Posts
    637 Views
    VStevenPV
    I am not able to recreate the problem as described so I will mark the topic as Solved. Thanks for your input.
  • QQuickPaintedItem calling both updatePaintNode and paint

    Unsolved
    2
    0 Votes
    2 Posts
    332 Views
    oria66O
    Did you check out the Nano painter Library? It uses the best of both approaches...
  • setContextProperty : integrating c++ with qml

    Unsolved
    4
    0 Votes
    4 Posts
    694 Views
    D
    @Anas_Deshmukh If your reason for not creating them in QML is that you want a handle to the objects. You could always pass them back to your C++ code though an Q_INVOCABLE method. Consider: Controller : public QObject { Q_INVOKABLE void addGuage(TempGauge *); private: QVector<TemperatureGauge *> m_gauges; };
  • TS-like syntax for QML types

    Solved
    3
    0 Votes
    3 Posts
    576 Views
    K
    @kenneth-fernandez Thanks!
  • artifacts using QtQuick.Shapes

    Solved
    2
    0 Votes
    2 Posts
    315 Views
    A
    @ABest2 I found a solution. If I limit the height of the rectangle which contains the elements to size increments of 100, the artifacts are not present (The items with artifacts are scaled to the height of the rectangle.). implicitHeight: appWin.height - (appWin.height % 100)
  • Changing the Audio Output Device?

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    kenneth.fernandezK
    @respect88 said in Changing the Audio Output Device?: (https://doc.qt.io/qt-5/qml-qtmultimedia-audio.html) Hi @respect88, You must make those changes directly in Python, because the QML element does not have such feature. On the other side of the coin, QML has the ability to use JavaScript functions, you could force it, but still that is not a good practice, it is better to do things in the way they were designed and respecting the main objective of each layer. So, Python is the place, as it is more natural to make a class in the lower layers to talk with the devices controllers/drives/API. Here are some references: C++ https://doc.qt.io/qt-5/qtmultimedia-multimedia-audiooutput-example.html https://doc.qt.io/qt-5/qaudiooutput.html Python https://doc.qt.io/archives/qtforpython-5.12/PySide2/QtMultimedia/QAudioOutput.html https://doc-snapshots.qt.io/qtforpython-5.15/overviews/qtmultimedia-multimedia-audiooutput-example.html I hope this would be useful,