Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • QML assert_imports created by QT Design Studio is not installed in QT Creator

    Unsolved
    3
    0 Votes
    3 Posts
    335 Views
    C
    I solved it in other way. I create a QML project by qt design studio rather than qt creator frist. Then, I added some 3D assets in the project by qds. After that, I used qt creator opened this project and those 3D assets were represented successfully. By the way, if you want to create a QML project by qt design studio, you need click File -> Export Project -> Enable Automate Generation after build a qds project, and then you will find a qml project organized by cmake file.
  • importing QtQuick.Dialogs gives many ambiguous type warnings

    Unsolved
    2
    2 Votes
    2 Posts
    398 Views
    C
    Some additional info or more like a warning. This crashes the qml language server and if the server is not running, every ctrl+click on your own qml files opens them from the build folder instead of the source folder. And then you basically edit a temp file.
  • ChartView with multiple selectable LineSeries

    Unsolved
    2
    0 Votes
    2 Posts
    411 Views
    T
    Hello, Sorry I could not answer your question! But btw, I new to PySide and QML, could you share me how to visible LineSeries to the chart, when I set 'useOpenGL: true', it could not render to GUI. Could you share me your code above?
  • Qt Quick default window, using the mouse to stretch the window size with black borders

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    johngodJ
    Just check my qml apps in windows 11, they do the same black borders, but also other programs like chrome do the same. Maybe it's a OS limitation / bug. Personally I dont think it's a big issue
  • QML Text's render error

    Unsolved
    5
    0 Votes
    5 Posts
    511 Views
    GrecKoG
    Are you graphics drivers up to date?
  • Get filename of OneDrive file from Android

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • Why did "useOpenGL" not work?

    Unsolved
    2
    0 Votes
    2 Posts
    362 Views
    T
    I'm getting the same issue. Have you solved this problem yet? If true, could you share me how to fix it? Thanks!
  • Accessing properties of 2D QML object in a 3DView via C++

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • Please help me with states in Qt Design Studio

    Unsolved
    1
    0 Votes
    1 Posts
    163 Views
    No one has replied
  • Enter key on Android Keyboard

    Solved
    3
    1 Votes
    3 Posts
    479 Views
    M
    Cool. Is that new in Qt6.8? So that will change the button to a search button. How will I get the event from the button press? In Qt6.6.3 I tried using Keys.onReleased and then check for the Qt.Key_Return event. That does work on Linux, but not on Android.
  • 0 Votes
    5 Posts
    536 Views
    W
    Thanks sierdzio, things are clearer now. I removed the part where I delete the texture and let the note manage it with setOwnsTexture and it's perfect! QSGNode* QuickImage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*) { QSGSimpleTextureNode* node = static_cast<QSGSimpleTextureNode*>(oldNode); if(_img == nullptr){ return node; } if (_img.isNull()){ return node; } if (node == nullptr) { node = new QSGSimpleTextureNode(); node->setOwnsTexture(true); } setSize(_img.size()); QSGTexture* texture = window()->createTextureFromImage(_img); node->setTexture(texture); node->setRect(boundingRect()); return node; }
  • How to customize the attached ToolTip?

    Unsolved tooltip
    2
    0 Votes
    2 Posts
    381 Views
    A
    It seems that my custom tooltip gets used when doing ToolTip {} inside a control, but not when using the attached ToolTip properties. I guess it's just not implemented yet, regardless what the docs suggest? Has anyone successfully styled the attached ToolTip?
  • updating to 6.8 from 6.5.3 broke qml type registration

    Unsolved
    4
    0 Votes
    4 Posts
    413 Views
    S
    in my qtcreator .pro file to the source files I added: ... tm_common/geocode/County.cpp $$OUT_PWD/trakkamap_qmltyperegistrations.cpp now Makefile.release looks like: ....\tm_common\LicenseManager.cpp ....\tm_common\geocode\County.cpp trakkamap_qmltyperegistrations.cpp trakkamap_qmltyperegistrations.cpp release\qmlcache_loader.cpp release\qrc_qml_qmlcache.cpp \ The weird thing is the linker still complains about the file being linked twice but it obviously was NOT linking it in when the single trakkamap_qmltyperegistrations.cpp was appended without a \ (in the first case). However, the app no longer crashes and qml is able to find the types. This is clearly a build chain bug for 6.8 I would think (or some version past 6.5.3) ?
  • Button Hover States

    Unsolved
    2
    0 Votes
    2 Posts
    250 Views
    W
    It's working as expected on both linux debian 12 & windows 11 with Qt6.8.0 I tried this code : import QtQuick import QtQuick.Controls Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Button { id: button hoverEnabled: true height: 26 width: 140 background: Rectangle { color: parent.hovered ? "red" : "green" } onClicked: { dialogWindow.open() } } Popup { id: dialogWindow x: 100 y: 100 width: 200 height: 300 modal: true focus: true closePolicy: Popup.CloseOnEscape } }
  • trying to use Qt6GLVideoItem

    Unsolved
    6
    0 Votes
    6 Posts
    956 Views
    SGaistS
    The one I cited in my previous message. @SGaist said in trying to use Qt6GLVideoItem: Hi and welcome to devnet, From the look of it, your system provided GStreamer is too old to contain Qt6's items and AFAIK, it's available through the gst-plugins-good package.
  • VTK integration issue in QML at runtime on Windows

    Solved
    2
    0 Votes
    2 Posts
    327 Views
    W
    This error appears because I was running a Debug target with a Release version of VTK. No problem if you link a Debug app with a Debug VTK or Release app with a Release VTK.
  • Quick3d Material dynamic Texture with ImageProvider - not possible

    Unsolved
    1
    0 Votes
    1 Posts
    123 Views
    No one has replied
  • Rotate QtQuick.Controls 2.x Dialog

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    L
    @jpnurmi-0 said in Rotate QtQuick.Controls 2.x Dialog: Popups follow Window::contentOrientation that you can set to match the rotation that is applied on the content: import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 ApplicationWindow { id: window width: 640 height: 480 visible: true contentOrientation: listModel.get(comboBox.currentIndex).orientation contentItem.rotation: listModel.get(comboBox.currentIndex).rotation ComboBox { id: comboBox textRole: "text" anchors.centerIn: parent model: ListModel { id: listModel ListElement { text: "Portrait"; orientation: Qt.PortraitOrientation; rotation: 0 } ListElement { text: "Landscape"; orientation: Qt.LandscapeOrientation; rotation: 90 } ListElement { text: "Inverted Portrait"; orientation: Qt.InvertedPortraitOrientation; rotation: 180 } ListElement { text: "Inverted Landscape"; orientation: Qt.InvertedLandscapeOrientation; rotation: 270 } } } } This gets me really close, but I have two problems with the QML Drawer component. 1. When setting the edge property, the position is incorrect; 2. the "drag" directions are not rotated. Are there any solutions to these issues?
  • How to set paddings/indent for GridLayout

    Unsolved
    2
    0 Votes
    2 Posts
    198 Views
    SGaistS
    Hi and welcome to devnet, Are you thinking about setSpacing ? Or maybe setContentMargins ?
  • CMake 3.20.6 : missing dependency file

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