Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • Retrieve the text of a QML TextField when the editingFinished() signal is emitted

    Moved Unsolved
    1
    0 Votes
    1 Posts
    228 Views
    No one has replied
  • Embed plugin with .so

    Unsolved
    3
    0 Votes
    3 Posts
    280 Views
    jsulmJ
    @tzmotional said in Embed plugin with .so: Is there a way around this? I don't think you can directly load libs from resource files. You will need to store them somewhere first.
  • Qml implement my own changable contentItem property

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    IntruderExcluderI
    If I understand you correctly - default property is what you need. You can see this example for more info.
  • Error: Unknown method return type

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    IntruderExcluderI
    MyType* and MyType are different types and must be registered separately. Also it may be better/easier just to return QObject* instead of MyType*, properties/stots will be visible in QML.
  • MediaPlayer metaData undefined when playing mp3 stream

    Unsolved
    2
    0 Votes
    2 Posts
    283 Views
    S
    Anyone??
  • Attach QMLComponent to QQuickWindow in PySide2

    Solved pyside2 qml qqmlengine parent
    3
    0 Votes
    3 Posts
    579 Views
    J
    Hey @ndias, I am trying to attach to a QQuickWindow. After some more try & error I finally managed to get it working by using createWithInitialProperties like so: initialProperties = {"parent": window.contentItem()} object = component.createWithInitialProperties(initialProperties, engine.rootContext())
  • threading strategy question

    Unsolved
    2
    0 Votes
    2 Posts
    235 Views
    dheerendraD
    You are trying to create the MIDI objects in separate thread & trying to push the data using the signal/slot to model. This approach can be taken.
  • TextField

    Unsolved
    2
    0 Votes
    2 Posts
    206 Views
    dheerendraD
    What is controller.text here ? Complete example would help to help you.
  • There has a plan to support qml javascript Destructuring assignment

    Unsolved
    4
    0 Votes
    4 Posts
    414 Views
    JKSHJ
    @jsulm said in There has a plan to support qml javascript Destructuring assignment: This is more a question for Qt developers on their mailing list. To clarify, here is a link to the Development mailing list: https://lists.qt-project.org/listinfo/development After you subscribe, you can email the list to ask your question.
  • QML QDoc: inheritance, import statement and qmlmodule

    Solved crea
    10
    0 Votes
    10 Posts
    790 Views
    T
    Ok I see, I will take a closer look on this. Thank you for all your help. I will mark this discussion as resolved
  • ListView with TapHandler

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    B
    Thanks. I see there is a whole family of controls designed to be used in a delegate: https://doc.qt.io/qt-5/qtquickcontrols2-delegates.html It is not very clear what the difference between these controls and the regular controls is, but I'm guessing it is something to do with the way mouse/touch events are processed by the enclosing Flickable. Anyway I have had improved response with touch in the TableView and the TreeView (marketplace version) using these.
  • ms paint in qml

    Unsolved
    5
    0 Votes
    5 Posts
    503 Views
    fcarneyF
    You could launch ms paint to edit a file from within your application (or any paint program). Then when it closes you can load the edited file into your app. This makes a lot of assumptions about what the user does with the paint application though. You would need a way to monitor the paint app (QProcess).
  • Table of elements using ColumnLayout and RowLayout

    Solved table rowlayout columnlayout alignment
    4
    0 Votes
    4 Posts
    1k Views
    ndiasN
    Hi @Kyeiv , I didn't realize that you wanted the elements of each line to line up with each other. In this case you can use GridLayout: import QtQuick import QtQuick.Window import QtQuick.Controls import QtQuick.Layouts Window { GridLayout { anchors.fill: parent columns: 3 //rows: 5 Text { Layout.fillWidth: true text: "Text1a Looooooooog" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Text { Layout.fillWidth: true text: "Text1b" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Text { Layout.fillWidth: true text: "Text1c" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Item { Layout.columnSpan: 3 Layout.fillWidth: true height: 10 Rectangle { height: 1 width: parent.width anchors.centerIn: parent color: "grey" } } Text { Layout.fillWidth: true text: "Text2a" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Text { Layout.fillWidth: true text: "Text2b Looooooooog" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Text { Layout.fillWidth: true text: "Text2c" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } ´ Item { Layout.columnSpan: 3 Layout.fillWidth: true height: 10 Rectangle { height: 1 width: parent.width anchors.centerIn: parent color: "grey" } } Text { Layout.fillWidth: true text: "Text3a" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Text { Layout.fillWidth: true text: "Text3b" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } Text { Layout.fillWidth: true text: "Text3c Looooooooog" horizontalAlignment : Text.AlignHCenter elide: Text.ElideRight } } } [image: 0b3cd8d6-2c52-40b8-af61-96a93000ca55.png] [image: 460c2b36-ce52-4b8a-bc58-32630a1b634b.png]
  • Help with QML code

    Unsolved
    3
    0 Votes
    3 Posts
    321 Views
    C
    @J-Hilk is right. It's printing on the console. However, if you want to move the container by pressing the left key try the following code. import QtQuick 2.6 import QtQuick.Window 2.2 Window { width: 640 height: 480 visible: true title: qsTr("Key Handling") Item { id: mainContainer Rectangle{ x:100; y:10 height: 100; width:100 radius: 20 color: "red" } focus : true Keys.onPressed: { if(event.key===Qt.Key_Left) { console.log("move left"); event.accepted= true; mainContainer.x-- } } Keys.onSelectPressed: console.log("Selected"); } }
  • QML Rectangle:Possible anchor loop detected on horizontal anchor.

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    Swati777999S
    @Markkyboy Just a doubt , whatever width or height was written inside the window, doesn't it define the dimension of the window?
  • Delegate not aligning Child without Anchors

    Unsolved
    7
    0 Votes
    7 Posts
    658 Views
    jeremy_kJ
    @SocketSackett said in Delegate not aligning Child without Anchors: @jeremy_k Yes. It is a sibling. Above you can see it is below the scrollbars of the TableView. I don't see any scrollbars. In the initial post, the HorizontalHeaderView is a child of the TableView. If that has been changed and it still doesn't work, post the updated code.
  • Instantiating QML Dialog from c++, "cannot find any window to open popup in"

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    SeDiS
    Solved. The error message, speaking about a "window", is a bit misleading, as we need to set not the window itself, but the window's contentItem() as a parent. For posterity, my working code: QQuickWindow *mainWindow = qobject_cast<QQuickWindow*>(m_engine->rootObjects().value(0)); QQmlComponent boxComp( m_engine, QUrl( "qrc:/UserInteractionBox.qml" ) ); QVariantMap initialProperties; initialProperties["parent"] = QVariant::fromValue(mainWindow->contentItem()); initialProperties["title"] = m_title; initialProperties["text"] = m_text; QQmlContext *ctxt = m_view->rootContext(); auto obj = boxComp.createWithInitialProperties(initialProperties,ctxt); QMetaObject::invokeMethod(obj, "open"); As for the Dialog, my starting point is simply: import QtQuick 2.0 import QtQuick.Controls 2.15 Dialog { id: userInteractionBox property string text: "" TextArea { anchors.fill: parent text: userInteractionBox.text } }
  • qmake Maximum statement or expression depth exceeded

    Solved
    3
    0 Votes
    3 Posts
    279 Views
    kkoehneK
    A quick fix for you might be to disable the Qt Quick Compiler / qmlcachegen. That is , if your application is based on qmake, do not pass or set the "qtquickcompiler" CONFIG option.
  • Redirect component to another container

    Solved
    3
    0 Votes
    3 Posts
    189 Views
    P
    This actually works! Thank you very much!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied