Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • QML WebView in iOS can not receive cookieAdded signal

    Unsolved
    4
    0 Votes
    4 Posts
    280 Views
    SGaistS
    Are you in the case described in the second note of the signal documentation ?
  • Rename buttons in FileDialog

    Unsolved
    2
    0 Votes
    2 Posts
    157 Views
    Gojir4G
    Hi @Mihaill, I would say with the acceptLabel property This property holds the label text shown on the button that accepts the dialog. When set to an empty string, the default label of the underlying platform is used. The default label is typically Open or Save depending on which fileMode the dialog is used in.
  • Setting a QML property to undefined via JavaScript

    Unsolved
    2
    0 Votes
    2 Posts
    214 Views
    B
    After poking around some more, I think the error message may be referring to the vert[i] object as being undefined, not the value I'm trying to feed it. But my vert object works otherwise, and I can change the color on it using similar syntax, so it should be valid. Also, when I do a typeof(vert[i]), I get something along the lines of Vertex_QMLTYPE_3(0x6000003b82a0) I get the same thing if I say console.log(vert[i]). That suggests to me that my object is valid. The verts are created dynamically, and they are created from the following .qml file, using these commands: var component = Qt.createComponent("Vertex.qml"); var vertex = component.createObject(parent, {x: xPos, y: yPos, width: size, color:"yellow"}); import QtQuick Rectangle { width: 8 height: 8 color: yellow property string tag: "" MouseArea { anchors.fill: parent drag.target: undefined drag.smoothed: false onReleased: { polyCanvas.requestPaint() } } } Please let me know if you've got something... bc
  • Add column header to TreeView

    Unsolved
    4
    1 Votes
    4 Posts
    746 Views
    C
    I think this is solved. GrecKo's suggestion is works well. you can start from the example 'QT Quick Controls - table of contents'. modify Main.qml like below Item{ // added component anchors.fill: parent HorizontalHeaderView { // added component id: horizontalHeader anchors.top: parent.top anchors.left: treeView.left syncView: treeView model: ["title", "content"] clip: true } TreeView { id: treeView //anchors.fill: parent // anchoring is modified anchors.top: horizontalHeader.bottom anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: 10 clip: true
  • Disable specific qml compiler warnings (f.e. [import]) or mark an area in .qml file

    Unsolved
    3
    0 Votes
    3 Posts
    268 Views
    M
    @KH-219Design Thanks i will try that. I also saw that in another thread you mentioned, that its possible to write your own QtMessageHandler and filter qml warnings. https://forum.qt.io/topic/151653/is-there-any-way-to-suppress-qml-warnings I will try that too, but i guess there is nothing like this for compiler warnings.
  • Strategy for handling exceptions in property accessors

    Unsolved
    4
    0 Votes
    4 Posts
    365 Views
    SGaistS
    I was about to suggest adding an explicit decorator to the functions that "misbehave". I would however not decorate all properties blindly so it can also serve as documentation to avoid getting the same issues in the future.
  • QML app freezes for a bit after deactivating Loader3D

    Unsolved
    1
    0 Votes
    1 Posts
    118 Views
    No one has replied
  • QML TreeView

    Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    JonBJ
    @chapayev I know nothing about QML. Your code looks to me as though it handles expansion/contraction, and subitems? Are you saying this addresses the OP's question The representation requires that rows have to be displayed differently - for example some rows have a checkbox some dont. ?
  • how to make water ripple (circles)

    Unsolved
    2
    0 Votes
    2 Posts
    186 Views
    S
    Here How You Can Do With Animation Method Rectangle { width: radius * 2 height: radius * 2 color: "rgba(255, 255, 255, 0.4)" radius: width / 2 anchors.centerIn: parent // Animation to expand the ripple NumberAnimation { target: parent property: "radius" from: 0 to: 100 duration: 1000 loops: Animation.Infinite easing.type: Easing.OutElastic } }
  • How to fix height and width of filedailog in qml.

    Unsolved
    4
    0 Votes
    4 Posts
    327 Views
    S
    You're right — my earlier response was focused on QFileDialog from Qt Widgets, but the OP is indeed asking about QML's FileDialog. If the OP needs full control over the size or wants to add a background overlay, the alternative would be to create a custom file browser UI in QML using FolderListModel, ListView, and other controls instead of relying on FileDialog. Thanks again for pointing this out!
  • import marble in qml qt

    Unsolved
    2
    0 Votes
    2 Posts
    267 Views
    R
    Step 1: Verify Marble Installation ls /usr/lib/qml/org/kde/marble Step 2: Check Where Marble Installed Its QML Module find /usr -type d -name "org.kde.marble" find /usr/local -type d -name "org.kde.marble" Step 3: Manually Add QML Import Path // Set additional import path for QML modules engine.addImportPath("/usr/local/lib/qml"); // Adjust if necessary in main.cpp Step 4: Verify Installed Marble Libraries ldd /usr/local/lib/libmarblewidget-qt5.so If any dependencies are "not found", you might need to add /usr/local/lib to your library path: sh Copy Edit export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH Step 5: Try Importing Again in QML import org.kde.marble 0.20 // Change version based on installed version
  • How to place inside flickable other components

    Unsolved
    2
    0 Votes
    2 Posts
    245 Views
    S
    There’s nothing wrong with your current code — you are already doing it right. The documentation is just warning you not to accidentally anchor to flick.
  • Could i bind my QSharedPoint<QObject> to QtQuick Item property?

    Unsolved
    1
    0 Votes
    1 Posts
    87 Views
    No one has replied
  • macdeployqt dmg references with links

    Unsolved
    1
    0 Votes
    1 Posts
    89 Views
    No one has replied
  • How to get aggregated scaling factor for QML items?

    Unsolved
    3
    0 Votes
    3 Posts
    213 Views
    A
    Thanks for your reply. I should have been more specific in my question: I know how to write it myself, I was looking for an existing function that already gives the that, akin to QGraphicsItem::sceneTransform. Because how would you expose such a function to QML, so you have it available globally, for all items? I guess that would mean something like a singleton object.
  • Introducing 'Toastify' for QML

    3
    1 Votes
    3 Posts
    291 Views
    aeriqueA
    About the zero dependencies: it is indeed really nice that I just have to drop two files in my project to get nice toast functionality.
  • qml type annotation with local enum

    Unsolved
    3
    0 Votes
    3 Posts
    221 Views
    M
    @Shrishashank thank you very much.
  • custom style for virtual keyboard

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    mzimmersM
    OK, so here's what I needed to do: create a resource file for the custom style. add a prefix: <qresource prefix="/VKeyboardStyles/QtQuick/VirtualKeyboard/Styles/mydefault"> create a folder with the name "mydefault" place my custom style.qml in this folder (along with any custom images I wanted) add this to my main.cpp: qputenv("QT_VIRTUALKEYBOARD_STYLE","mydefault"); I really don't see why this has to be so complicated, but maybe this will help anyone else who's trying to do the same thing. Thanks to everyone who looked.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    131 Views
  • FontLoader not loading woff2 format

    Unsolved
    8
    0 Votes
    8 Posts
    536 Views
    SGaistS
    Use forward slashes for your paths. Backslashes are for escape sequences. AFAIR, it's the file:// scheme to grab stuff from your local drive