Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.8k Topics 76.5k Posts
  • App stoped working after `QTP0004 = NEW`

    Unsolved
    3
    0 Votes
    3 Posts
    52 Views
    F

    Hi, it's a bit hard to tell what is causing the issue without more information. Could you describe how the files stored in ${QML_FILES} are structured? Do you have QML files which are part of your module and which explicitly import the module itself?

    But generally, this sounds like a bug (in Qt itself) – if only to improve the warning message – and I'd be interested in a bug report.

    Lastly, as a workaround to avoid warnings, you could also set the "NO_GENERATE_EXTRA_QMLDIRS" option instead of setting the policy to old (if the Qt version is high enough).

  • exclude item inside QML Qt Quick Control from interaction

    Unsolved
    2
    0 Votes
    2 Posts
    32 Views
    GrecKoG

    Maybe using containmentMask can help.

    Try the following:

    contentItem: Column { containmentMask: label Text { id: label } Text { id: description } }
  • 0 Votes
    2 Posts
    38 Views
    B

    Probably either the modifications aren't being done correctly in the underlying tree model, or the arguments to the beginMoveRows/beginRemoveRows are not correct. I haven't had enough coffee yet to be sure whether the latter are correct but they look as if they are at least along the right lines.

    I would start off - if you haven't done so already - by checking that the state of the underlying tree is exactly as expected after each change.

  • 0 Votes
    9 Posts
    141 Views
    SGaistS

    You're welcome !

    You know, inverting lines can happen quickly and innocuously :-)
    Anyway, now you're back on track.

  • Shadow Mapping not working after porting to Qt 6,8

    Solved
    6
    0 Votes
    6 Posts
    270 Views
    SGaistS

    Thanks for the feedback and bug reports !

  • Ripple effect on material style

    Unsolved
    3
    0 Votes
    3 Posts
    490 Views
    N

    I am also facing the same issue. Have you found any solution for this?

  • Regarding dynamic graph creation using Shape qml component.

    Unsolved
    1
    0 Votes
    1 Posts
    34 Views
    No one has replied
  • 0 Votes
    12 Posts
    285 Views
    J

    @Bob64 Thank you, just using 'type' worked! I knew it would be something simple like this. And @GrecKo thanks for the tip, that looks like a better solution so ill definitely look into it.

  • 0 Votes
    2 Posts
    44 Views
    SGaistS

    Hi,

    AFAIK there's no such class. Qt Virtual Keyboard provides an on screen keyboard that is not tied to any hardware.
    What is your goal ?

  • Cura plugins + beginner Python + out dated QT= ishhh!

    Unsolved
    3
    0 Votes
    3 Posts
    98 Views
    F

    @SGaist

    Thanks for the reply. I forgot how qt was multi-platform/multi-os. But yeah you have right, I'm running on Windows 10. Now for the crash, it's pretty funny actually. After I've move qt/bin dll into Cura root folder and some Pyd/Pyi... I didn't remember which one, i've to create a kind of cura patch file for.. but anyway.... To say after i've modified cura, i've the same bug into PythonDemo and CuraPlugins.

    struct.png

    import os.path from UM.Application import Application from UM.PluginRegistry import PluginRegistry from cura.Stages.CuraStage import CuraStage from PyQt6.QtCore import QUrl #from PyQt6.QtWebEngineWidgets import QWebEngineView class FluiddStage(CuraStage): """Stage for web Interface""" #view = QWebEngineView() def __init__(self, parent = None): super().__init__(parent) Application.getInstance().engineCreatedSignal.connect(self._engineCreated) def _engineCreated(self): self.addDisplayComponent("menu", os.path.join(PluginRegistry.getInstance().getPluginPath("FluiddStage"), "FluiddMenu.qml")) self.addDisplayComponent("main", os.path.join(PluginRegistry.getInstance().getPluginPath("FluiddStage"), "FluiddMain.qml"))

    My first plugins crash was that I cannot import QWebEngineView and I cannot create QWebEngineView() class instance. Now with cura file patch, I can. Of course I cannot use view.show() it's crash the plugins.

    The second plugins crash was about QML file. I cannot import nothing, except maybe QtQuick/UM/Cura. And it's where is funny... I seem to have the same problem with my QML demo version since i try to QML the demo. I Cannot import QtWebEngine/QtWebView or whatever into QML file. it's crash demo and plugins.

    Does I miss something into init.py? Remark demo folder doesn't have.

  • QML Drag and Drop including reordering the C++ model

    Unsolved
    2
    0 Votes
    2 Posts
    64 Views
    M

    Here is a link to the full code: https://mega.nz/file/XQlQECqa#LxhaaqWAmvVyTEFLd3MtnMCnRcmU9glXgZWYC6yyrv4
    Based on the article: https://raymii.org/s/tutorials/Qml_Drag_and_Drop_example_including_reordering_the_Cpp_Model.html

  • 0 Votes
    2 Posts
    168 Views
    C

    I have the exact same issue. Were you able to fix it?

  • Why does `required` change the value of a property?

    Solved
    3
    0 Votes
    3 Posts
    73 Views
    GrecKoG

    and do fix it you should do:

    delegate: MyItem { required property var model mdl: model }

    (or rename mdl to model in MyItem.qml)

  • QtQuick.VectorImage is not installed

    Unsolved
    1
    0 Votes
    1 Posts
    26 Views
    No one has replied
  • View3D

    Unsolved
    1
    0 Votes
    1 Posts
    30 Views
    No one has replied
  • 1 Votes
    16 Posts
    376 Views
    B

    @Wertyus said in How to Display Frames in QML from C++ for Real-Time Applications:

    Did you experience any latency issues with the QQuickPaintedItem approach when handling high frame rates (e.g., 30 FPS)?

    I did some initial experiments to test the viability of the general approach and was able to get frame rates above 30fps. Since implementing the real thing, I have not explicitly measured this but it has been good enough for our purposes. In our case, the frames are provided not by a video stream but by a rendering of a 3D model provided by a back end server. Using QQuickPaintedItem was driven by our need to be able to react to mouse events and so on that are fed back to the server.

    It might be that for your case, treating it as a video stream and using the specialised support for that would be more appropriate.

    Also, how did you handle buffer updates efficiently when new frames arrived?

    This is a sketch of the code in the QQuickPaintedItem. Because it's a "pull" approach, it is possible that frames could arrive too quickly for this to display all of them and anything between the last image requested and the current one will have been dropped.

    void ViewerItem::checkForNewImage() { // Called on timer trigger // Note no significant copying here. // `imageProvider` works on separate thread; `currentImage()` is mutex protected internally std::pair<std::shared_ptr<Image>, int> image = imageProvider->currentImage(); if (image.second != m_currentIndex) { // New image - update the pixmap member m_pixmap.convertFromImage( QImage(image.first->pixelBuffer(), image.first->width, image.first->height, image.first->width*3, QImage::Format_RGB888 ) ); // New image so update index m_currentIndex = image.second; // update() is QQuickPaintedItem member - will call `paint(QPainter*)` on the present class // our implementation of paint() uses `drawPixmap(0, 0, m_pixmap)` update() } }
  • Duplicate items in ListView

    Unsolved
    6
    0 Votes
    6 Posts
    503 Views
    GrecKoG

    They are still visible but they shouldn't be displayed anymore. If not it warrants a bug report

  • How to Dynamically Load Candlesticks in QML

    Unsolved
    2
    0 Votes
    2 Posts
    61 Views
    B

    I wonder if there is a bug in Qt. In the debugger I see count go up on candleSeries each time a CandlestickSet is added, but like you I see nothing on the chart. (I am using Qt 5.15 - so this doesn't seem to be an issue with specific versions.)

  • QML TextArea performance with large data buffers

    Unsolved
    4
    0 Votes
    4 Posts
    223 Views
    B

    It is possible to do this - it's just that you have to code a lot of the selection logic yourself. I store selection information in my model, so that each item in the model comprises a "text" role as well as roles to capture "selected information" for that line. In the ListView delegate, where I use a read-only TextInput, I use the information to set selected the appropriate parts of each line. You then have all the mouse logic to identify an active selection, possibly spanning multiple lines, and update the model.

    In my case, I only implemented single selection - you can only select one block of text at a time - but in principle it could be extended to multi-selection.

  • 0 Votes
    2 Posts
    102 Views
    dheerendraD

    Try something like this. Use the data method of index.

    bool CustomProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
    {
    const QModelIndex sourceIndex = sourceModel()->index(source_row, 0, source_parent);
    // Some how get the the role you require.
    const QString filterElement = sourceIndex.data(role).toString();
    return(filterElement.toLower().startsWith(m_filterText));
    }