Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • Type not defined after registering with qmlRegisterSingletonInstance

    Solved
    5
    0 Votes
    5 Posts
    446 Views
    dheerendraD
    @Mewo Also move the ticket solved
  • populate() not working Repeater

    Unsolved
    9
    0 Votes
    9 Posts
    677 Views
    T
    Hello everybody, I'm overlucky: I found the error for myself (-: The correct code line is now: emit dataChanged(index(0),index(nparticles-1)); instead of emit dataChanged(index(0),index(nparticles)); Now I can start working! Thanks to all! Tobias
  • Qt 6.8 - VectorImage and color/colorization issues (with MultiEffect)

    Solved
    2
    0 Votes
    2 Posts
    418 Views
    nicwainwrightN
    SOLVED thanks to a previous forum post regarding using MultiEffect on Image{} type component All that's required is to set VectorImage's visible to false, since the compositor seems to be double rendering, I suppose, creating the unwanted outline of the SVG Thanks to 6.5 article: https://forum.qt.io/topic/144070/qt6-color-svg-using-multieffect/3 and member: https://forum.qt.io/user/mzimmers New graphics: [image: 3914746d-1cc6-44c3-9a9c-23789cae360a.png] WORKING CODE: Item { id: root color: <input from higher level> source: <input from higher> VectorImage { id: mySVG ~~~~ same lines from above ~~~~~ visible: false <======== DONT FORGET THIS } MultiEffect { id: colorOverlay source: mySVG anchors.fill: mySVG colorization: 1.0 // opacity equivalent colorizationColor: root.color } }
  • QML module Imports Not Found by IDE

    Solved qml import ide warning module
    18
    0 Votes
    18 Posts
    5k Views
    L
    @SimpleY i ve got same problem as your, try to go to preferences->Qt Quick->QML/JS editing-> QML Language server and remove tick on Tun on (leave all unchecked) it worked for me.
  • how to deal with InputPanel (keyboard) covering input fields?

    Solved
    9
    0 Votes
    9 Posts
    892 Views
    S
    QScrollArea has a method ensureWidgetVisible() which seems to be missing from Flickable. StackOverflow had a discussion on this: https://stackoverflow.com/questions/45946637/how-to-make-flickable-ensure-the-visibility-of-an-item-inside-of-it. (I'm not a user of QML, but this might provide a different way of tackling the problem.)
  • Multiple device application in QML

    Unsolved qt quick qml
    7
    0 Votes
    7 Posts
    864 Views
    R
    @johngod This is a great reference. I will check the code and compare what I am doing wrrong here. Thank you so much.
  • Image centering in QML TextArea not working

    Unsolved
    6
    0 Votes
    6 Posts
    473 Views
    mzimmersM
    It isn't that TextArea isn't able to "handle" Images; you can indeed place images within a TextArea and control their location. The problem is, your image is embedded in the text property of the TextArea. I've never seen this done before, but I think you'd have to use HTML/CSS constructs within the <img> in order to do anything (and I'm not sure this will work).
  • IMPORT_PATH has zero practical effect on qmlls

    Solved
    2
    0 Votes
    2 Posts
    318 Views
    J
    Turns out it wasn't me doing something wrong. It was a Qt bug: https://bugreports.qt.io/browse/QTCREATORBUG-31949
  • TableView with QSqlRelationalTableModel cells are all "2"

    Solved
    12
    0 Votes
    12 Posts
    882 Views
    Y
    @GrecKo Thank you very much! You really help me solve this problem!
  • 0 Votes
    2 Posts
    167 Views
    J.HilkJ
    https://bugreports.qt.io/browse/QTCREATORBUG-31897
  • tabbing between TextFields defined by a Repeater

    Solved
    8
    0 Votes
    8 Posts
    589 Views
    mzimmersM
    @Mesrine I tried your example. See what happens if you press the tab key after the dialog appears. Not working quite correctly.
  • HorizontalHeaderView ColumnWidthProvider confusion

    Solved
    4
    0 Votes
    4 Posts
    309 Views
    GrecKoG
    @dheerendra said in HorizontalHeaderView ColumnWidthProvider confusion: ColumnWidthProvider This property can hold a function that returns the column width for each column in the model Based on the above documentation, I did the following: [...] columnWidthProvider: root.columnWidth(column) When you are doing this you are not passing a function to the columnWidthProvider. This code instead tries to execute the root.colummWidth function by passing column as the parameter (most likely undefined here and pass the return value to columnWidthProvider. Did this produces a warning? What you wanted to do is: columnWidthProvider: root.columnWidth (or what afalsa wrote). I agree that an example or 2 in the documentation won't hurt.
  • HorizontalHeaderView - textRole & custom delegate

    Unsolved
    3
    1 Votes
    3 Posts
    277 Views
    dheerendraD
    Thanks @afalsa. Yes. Output is not an issue. If you specify both delegate & textRole, textRole has no impact. Delegate takes priority. If you remove the delegate, then textRole kicks in. There is no bug also. Need to docs clear about this.
  • QML MultiEffect garbled error message

    Solved
    2
    0 Votes
    2 Posts
    171 Views
    Y
    Fixed by modifying arrowIcon
  • PathView + Flickable Issues on the device but works fine on desktop

    Unsolved
    3
    0 Votes
    3 Posts
    257 Views
    MarkkyboyM
    Rather than using Rectangle as a "page", use Page QML https://doc.qt.io/qt-6/qml-qtquick-controls-page.html and build/write your code within that page. What's the idea behind using PathView?, just use Page. I couldn't do much with your code, I did try, but there were too many errors and other data missing. A working code snippet often helps.
  • Qt Quick Test and enums- Compare actual enums instead of enum values

    Unsolved
    1
    0 Votes
    1 Posts
    117 Views
    No one has replied
  • help

    Locked Unsolved
    2
    0 Votes
    2 Posts
    186 Views
    SGaistS
    Hi, Please don't open the same question multiple times. Duplicate Closing this one
  • guys can u help me with these problems

    Unsolved
    5
    0 Votes
    5 Posts
    423 Views
    Pl45m4P
    @QtWorld said in guys can u help me with these problems: i have so little info about this web site What website? receive data from there using udb with python code and send it to qt creator in windows I don't know what UDB is and you don't send anything "to QtCreator", since it's an IDE like Eclipse or Visual Studio. Isn't PX4 software for drones? Unless you are lucky and find somebody who had used this before, I doubt that we can help with that. Here's a general guide on how to use QML in a Qt Python app. https://doc.qt.io/qtforpython-6/tutorials/qmlapp/qmlapplication.html
  • Creating a QAbstractListModel on the stack and passing to QML

    Unsolved qml listmodel qsharedpointer c++
    4
    0 Votes
    4 Posts
    1k Views
    C
    I don't know how to prevent the qml from deleting the shared pointer. So I return a new classs to qml, it works well. Hope anyone can tell me if it corrected. } else if(role == modeRole) { if(deviceVariable.modeModelPtr.isNull()) return QVariant(); //return QVariant::fromValue(deviceVariable.modeModelPtr.data()); return QVariant::fromValue(new ModeModel(*deviceVariable.modeModelPtr)); } }; DeviceVariables { // .... QSharedPointer<ModeModel> modeModelPtr; } class ModeModel : public QAbstractListModel { public: //.... ModeModel(const ModeModel &other) : QAbstractListModel(other.parent()) { modeList = other.modeList; } private: QList<ModeData> modeList; }; I debug the ~ModeModel() and found the qml will auto delete the new ModeModel() which I provide in the cpp.
  • This topic is deleted!

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