Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.9k Topics 76.9k Posts
QtWS25 Last Chance
  • 0 Votes
    6 Posts
    513 Views
    Hello anybody please help me on this ?
  • 0 Votes
    2 Posts
    45 Views
    Hi and welcome to devnet, Where are you using Qt in your system ? As per your code, I would say never so it would be better if you explained exactly what runs where and what exactly are you using.
  • qmlRegisterType still usable?

    Unsolved 12 Feb 2024, 03:08
    1 Votes
    5 Posts
    1k Views
    So what is the answer? I totally lost the plot with the QT academy tutorial, others do the same. I want to do one thing, why tell me about other stuff? How do you connect C++ and QML? I have come to the conclusion that the QT company want to ditch C++ going forward as this one essential topic is never discussed in any meaningful way. Any information on QML says that it will not talk about C++, well Stroustrop will not exactly be telling you how to do it either as this is a QML thing not a C++ one. QT decided to go down the javascript/custom new language path, well now tell us how to use it in the context of reality. Reality is that we write our backends in C++!!
  • 0 Votes
    2 Posts
    91 Views
    Solution was mostly there and fix appeared very simple: move anchors margins from _fillHeight property calculations to readonly property bool _fillHeight: { let bottom = mapToItem(applicationWindow.contentItem, 0, implicitHeight).y; return bottom > applicationWindow.height } frame.implicitHeight property: implicitHeight: frameColumn.implicitHeight + defaultPixelHeight * 4 Now everything works and looks fine! No errors or binding loops.
  • How do the "QML" and "QMLScene" tools differ?

    Solved 2 days ago
    0 Votes
    2 Posts
    33 Views
    @RokeJulianLockhart, interest.qt-project.narkive.com/p4tyYKC9 states: The QML tool is a bit more flexible, makes fewer assumptions (e.g. it doesn’t use a QApplication by default, so you don’t end up loading the widgets module into memory if you don’t need it) and is meant as the long-term replacement for qmlscene. QML can be used for non-graphical purposes if your root object is a plain QObject, not an Item or Window; that’s only practical with the qml tool, not qmlscene. It is more directly analogous to other language interpreters like python and perl (which also do not load graphical libraries unless you import the relevant modules in your script), and you can even use the shebang mechanism, so that qml files can be marked executable and run from the command line. You can configure your window system to use it as the default application with which to run any file with the qml extension (e.g. when double-clicking a qml file in your file manager/finder), if you like. (QTBUG-33659 is a request to set up that association when you install the SDK, but that never got done AFAIK. It requires someone with Qt Installer expertise, I think.) So you could nearly forget about qmlscene, except that it has a few handy command-line options that qml still doesn’t.
  • 0 Votes
    1 Posts
    20 Views
    No one has replied
  • 0 Votes
    3 Posts
    57 Views
    Thanks, but: @Rangantha-B-V said in Custom TextField existing required property not initialized, but it is: implicitWidth exists on Item and is read-only (computed internally based on content/layout hints). I disagree. The doc does not write that the property is read-only. It says that "however some items have an inherent implicit size which cannot be overridden, for example, Image and Text", which I assume is the case of the TextInput, but is not really mentioned precisely in the doc... As a counter-example to read-only, you can set an implicitWidth with a ComboBox and with a TextField. The ComboBox can have a required on implicitWidth without any problems, which is not the case of TextField, why that ? @Rangantha-B-V said in Custom TextField existing required property not initialized, but it is: bind to width or implicitWidth internally So it's read-only from the outside but editable within the object ? In this case, why could I set it from the outside by simply removing the required line ?
  • Dialog input form validation

    Unsolved 4 days ago
    0 Votes
    1 Posts
    37 Views
    No one has replied
  • Bring Window to the 2nd Monitor

    Unsolved 5 days ago
    1 Votes
    1 Posts
    37 Views
    No one has replied
  • GStreamer Qt6GLVideoItem cannot be imported by QML with PySide6

    Unsolved 15 days ago
    1 Votes
    3 Posts
    116 Views
    https://forum.qt.io/topic/161751/qt6-gstreamer-cmake/2?_=1744802661208
  • Make Image Round

    Unsolved 5 days ago
    0 Votes
    7 Posts
    127 Views
    @J.Hilk yes I am sure, but apparently android is not rendering the images when I apply it, however this workaround that I mention worked for me finally.
  • Qt6 color SVG using MultiEffect

    Solved 2 Apr 2023, 19:25
    0 Votes
    13 Posts
    3k Views
    @srce said in Qt6 color SVG using MultiEffect: Rather than converting pngs from black to white, setting brightness to 1 (in addition to colorize) should have a similar effect. Yep, this works for me, thanks, however Qt 5 solution more flexible: with ColorOverlay I can set color: "transparent" to fully keep original icon where necessary, here icon becomes white for some reason, even if MultiEffect item or layer is not visible/enabled. So still forced to stay on ColorOverlay.
  • 1 Votes
    11 Posts
    229 Views
    @Aleksey_K said in QML runtime error: module "Qt5Compat.QtGraphicalEffects" is not installed: Unfortunate MultiEffect is buggy comparing to ColorOverlay - it does not color my icon in some cases, so forced to rollback to Qt5Compat.GraphicalEffects. Found solution for the full replacement: https://forum.qt.io/post/807844 Need to set brightness: 1.0, however now "transparent" color does not work if I need to keep original color unchanged, Probably need to add more complex logic to hide MultiEffect and show original Image. So still on ColorOverlay.
  • Recommendations for Well-Written Open-Source QML Projects to Study

    Unsolved 9 days ago
    0 Votes
    8 Posts
    171 Views
    There's also Slate - Pixel Art Editor Scrite - Screenwriting app
  • qml TableView top left corner

    Unsolved 6 days ago
    0 Votes
    1 Posts
    28 Views
    No one has replied
  • Getting error vector subscript out of Range

    Unsolved 10 days ago
    0 Votes
    3 Posts
    68 Views
    @SGaist said in Getting error vector subscript out of Range: Use the debugger to see exactly where it is happening. To do that, click on "Retry".
  • Installing a reusable QML module

    Unsolved 8 days ago
    0 Votes
    1 Posts
    32 Views
    No one has replied
  • Listview Populate Transition Interrupted

    Solved 12 days ago
    0 Votes
    2 Posts
    134 Views
    Hello again! After some digging, I’ve found an "elegant" solution. First, setting the NumberAnimation with a duration of 500 (population animation) was interfering with the hover animation duration (Delegate), which is 300. That was causing some weird behavior. The second part is that I added the property change in the "" state, which fixed the issue and now the element returns to its original position even if the animation gets interrupted. states: [ State { name: "zoomed" PropertyChanges { target: test_delegate scale: zoomedScale rotation: zoomedRotation } }, State { name: "" PropertyChanges { target: test_delegate scale: normalScale rotation: normalRotation } } ]
  • 0 Votes
    4 Posts
    80 Views
    @IamSumit what if you add to your code visibility: Window.FullScreen
  • QtGraphs Bug

    Unsolved qtgraphs pyside6 10 days ago
    0 Votes
    5 Posts
    131 Views
    @jsulm @jsulm said in QtGraphs Bug: Look at these numbers. I doubt this is what you added. Yes, I agree the numbers are output strangely. @jsulm said in QtGraphs Bug: run the app in a terminal, then you should see the Python exception. Perhaps I don't have enough knowledge, I would be glad if you could explain how a regular terminal differs from a terminal in VS Code. I don't understand what new things I'll be able to see. I also see python exceptions in the VS Code terminal, but they were not noticed in this code. In any case, how can you explain that the same code works without problems when replacing QSplineSeries with QLineSeries, I attach a screenshot of an example of the work. [image: 33a49b14-9ee0-4b70-94c0-553c878b7d13.png]