Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • How to generate a surface3D of image gray height ?

    Unsolved
    1
    0 Votes
    1 Posts
    92 Views
    No one has replied
  • Application crashes after fast load using ```Qt.createComponent```

    Moved Unsolved
    5
    0 Votes
    5 Posts
    368 Views
    K
    @piervalli I am currently on macOS
  • QQmlComponent::Error "Type xxx cannot declare new members."

    Solved
    3
    0 Votes
    3 Posts
    438 Views
    Q
    I found a solution to my own problem. The problem was actually not the class Body, but another class that is a parent to Body in the qml-file. I had a forward declared class here that I had missed. This used to work in Qt5 but now in Qt6 they have to be replaced with Q_MOC_INCLUDE.
  • Best way to change the color of Qt Quick Controls

    Unsolved color change controls 2 qt quick qml
    3
    0 Votes
    3 Posts
    574 Views
    SavizS
    @costasjames479 I am aware that other styles are available for Qt Quick Controls. However, according to the documentation, the Basic Style is the most performant and platform-compatible, which is why I prefer to use it. With this in mind, how can I figure out what to place as the attribute or property name instead of ? in the following code: TextField { palette { ?: "blue" ?: "white" } } ComboBox { palette { ?: "blue" ?: "white" } } In other words, is there a detailed list in the documentation that specifies the name of each attribute, which I might have overlooked?
  • This topic is deleted!

    Unsolved
    5
    0 Votes
    5 Posts
    93 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Reduce the right space in a context menu

    Solved
    3
    0 Votes
    3 Posts
    247 Views
    franco.amatoF
    @GrecKo below the code showing how the LogoMenuItem is used: Menu { id: logoMenu x: parent.width - logoMenu.width y: parent.height LogoMenuItem { text: qsTr("General Settings") defaultIconSource: "qrc:/Resources/images/Launcher/ContextMenu/settings_default.png" hoverIconSource: "qrc:/Resources/images/Launcher/ContextMenu/settings_hover.png" iconWidth: 21 iconHeight: 23 } LogoMenuItem { text: qsTr("Support") defaultIconSource: "qrc:/Resources/images/Launcher/ContextMenu/support_default.png" hoverIconSource: "qrc:/Resources/images/Launcher/ContextMenu/support_hover.png" iconWidth: 21 iconHeight: 16 } LogoMenuItem { text: qsTr("Log Out") defaultIconSource: "qrc:/Resources/images/Launcher/ContextMenu/logout_default.png" hoverIconSource: "qrc:/Resources/images/Launcher/ContextMenu/logout_hover.png" iconWidth: 21 iconHeight: 19 } LogoMenuItem { text: qsTr("Mobile App") defaultIconSource: "qrc:/Resources/images/Launcher/ContextMenu/mobile_default.png" hoverIconSource: "qrc:/Resources/images/Launcher/ContextMenu/mobile_hover.png" iconWidth: 17 iconHeight: 24 } LogoMenuItem { text: qsTr("Exit") defaultIconSource: "qrc:/Resources/images/Launcher/ContextMenu/exit_default.png" hoverIconSource: "qrc:/Resources/images/Launcher/ContextMenu/exit_hover.png" iconWidth: 21 iconHeight: 22 onTriggered: Qt.quit() } background: Rectangle { implicitWidth: 220 // Changing this value has no effect color: "#21212D" } } onClicked: logoMenu.open() The parent is Menu {}
  • qmlsc compilation fails for qmlRegisterSingletonInstance

    Solved
    3
    0 Votes
    3 Posts
    420 Views
    R
    Yes and no. No: I did not solve it the way I have imagined it. Yes: I changed DummyData to be QML_SINGLETON and use QQmlEngine::singletonInstance to get the pointer to the instance in the C++ code.
  • Qt6.7 (QML) breaks Dialog rotation.

    Unsolved
    2
    0 Votes
    2 Posts
    263 Views
    C
    Hi ! Same issue for me after upgrading from 6.4.2 to 6.8.1. In my case, I'm setting orientation in "main.cpp".
  • material theme custom effect

    Unsolved
    1
    0 Votes
    1 Posts
    764 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    SavizS
    I did some more research and it seems this is the way to do it: // This code must be placed directly in the ListView WheelHandler { acceptedDevices: PointerDevice.Mouse property int speed: 2 property Flickable flickable: parent.parent onWheel: (event) => { let scroll_flick = event.angleDelta.y * speed; if(flickable.verticalOvershoot != 0.0 || (scroll_flick>0 && (flickable.verticalVelocity<=0)) || (scroll_flick<0 && (flickable.verticalVelocity>=0))) { flickable.flick(0, (scroll_flick - flickable.verticalVelocity)); return; } else { flickable.cancelFlick(); return; } } } Hope this helps someone.
  • Qt android reports generator

    Unsolved
    2
    0 Votes
    2 Posts
    330 Views
    jsulmJ
    @Victor-Manuel said in Qt android reports generator: but their libraries are not compatible with armelf_linux_eabi You can build them by yourself for armelf_linux_eabi
  • how to off ShaderEffectSource animation qt

    Unsolved
    1
    0 Votes
    1 Posts
    99 Views
    No one has replied
  • Onscreen keyboard scrolling w/ TextField

    Solved
    2
    0 Votes
    2 Posts
    344 Views
    S
    Nevermind this behavior already seems to happen
  • Creating a new Qt Quick Application with cmake already has errors

    Solved
    4
    0 Votes
    4 Posts
    549 Views
    dheerendraD
    @pillexyz_z. Good news. Move the ticket to solved as well.
  • Moving data in QML Listview using QSortFilterProxyModel

    Unsolved
    1
    0 Votes
    1 Posts
    113 Views
    No one has replied
  • How to create a FlickablePage ?

    Unsolved
    1
    0 Votes
    1 Posts
    113 Views
    No one has replied
  • Template how to use with SplitView ?

    Solved
    3
    0 Votes
    3 Posts
    235 Views
    L
    @SGaist Using import QtQuick.Controls.Material auto in qmldir, I found that there is no need to use template for SplitView.
  • how to transferred QLineSeries from c++ to qml

    Unsolved
    1
    0 Votes
    1 Posts
    117 Views
    No one has replied
  • QML Automotive Cluster Interface

    Unsolved
    8
    0 Votes
    8 Posts
    570 Views
    T
    Hi @crimson1023 I have leaved a comment with the new updated project you can see that in the link. My problem now is that I can't rotate the dials correctly.. Also thank you @JoeCFD but I don't understand how to set the connection between my C++ class and my QML code. I must use the connections but I can't write the code properly