Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.7k Topics 76.2k Posts
  • QML Graphs using dynamic data (from C++)

    Unsolved
    1
    0 Votes
    1 Posts
    19 Views
    No one has replied
  • Combobox dropdown text not showing

    Unsolved
    6
    0 Votes
    6 Posts
    68 Views
    JonBJ

    @ltlnx
    Me again, who knows nothing about QML :) Wouldn't have thought that theme would go as far as suppressing display of combo dropdown items completely. Are you able to quickly try your thing in something other than your "KDE desktop", like GNOME or whatever?

  • 0 Votes
    4 Posts
    45 Views
    J

    @Bob64

    Thanks for your reply.

    Not only does the closing strategy require the mouse to click outside to disappear, but also a button to control closing and showing. Clicking on the button triggers the closing strategy at the same time, which will cause the window to close and then open again.

  • dynamic margin according to wrapped text

    Solved
    5
    0 Votes
    5 Posts
    59 Views
    O

    Yes great, thank you.
    I add another thing which is to take into consideration the number of lines once the component is completed, because if I manage the margin directly during initialization, it does not work:

    anchors.leftMargin: contentWidth > width ? 12 : 4
    anchors.rightMargin: contentWidth > width ? 12 : 4

    ... Component.onCompleted: { anchors.leftMargin = (lineCount > 1 ? 12 : 4) anchors.rightMargin = (lineCount > 1 ? 12 : 4) }
  • How to communicate between components

    Unsolved
    5
    0 Votes
    5 Posts
    81 Views
    dheerendraD

    Make the topic as "Solved" as well.

  • Help structuring code with QML modules

    Moved Unsolved
    5
    0 Votes
    5 Posts
    97 Views
    L

    And as a bonus question, I fail to understand why modules are sometimes built as plain modules and sometime as libraries, by adding this (and then linking as a plugin):

    qt_add_library( StyleModule STATIC )

    In that case, also, is this needed in the main.cpp:

    Q_IMPORT_QML_PLUGIN( StyleModulePlugin );

    It works with and without, so I'm missing the point.
    There are a lot of examples circulating online, for various versions of Qt and all of this has changed quite a lot. The documentation being pretty thick, it's not easy to find up-to-date basic guidelines.

    Explanation or examples of use cases welcome! Thanks!

  • Qt nested ListView or can I use TreeView

    Unsolved
    6
    0 Votes
    6 Posts
    5k Views
    C

    bro ur the goat ive been stuck on this for hours, i think the key was wrappping the whole delegate in a component on the qml side

  • ListView not displaying results of a QSortFilterProxyModel.

    Unsolved
    7
    0 Votes
    7 Posts
    107 Views
    mzimmersM

    @GrecKo said in ListView not displaying results of a QSortFilterProxyModel.:

    In your debug output, it displays "NOT found" then "found", does that mean that the proxy model eventually returns true and your line is displayed in the ListView or does the ListView still doesn't display the delegate even thought the proxy model returns true?

    It's the latter. The "NOT found" occurs at application startup (I'm not sure why; I guess the QML engine pre-loads some stuff), but the "found" occurs when I navigate to the screen containing the ListView.

    Also your code is incorrect, I don't think it should matter here but better safe than sorry. You are using a QModelIndex from your proxy model when calling your source model data method, you are not meant to do that.
    Instead use a QModelIndex from the source model:

    QModelIndex qmi = m_equipmentModel->index(sourceRow, 0);

    OK, fixed that. Thanks.

    Also are you invalidating your filter at the right time? (when spaceContainsEquipment result is suspected to change)

    This may be the problem. I'm not explicitly invalidating the filter, because I'm not sure where to do it. The space model contains a list of spaces, each of which in turn contain a list of equipment. Do I need to send a signal from my space model to my equipment proxy model when that list of equipment changes?

    Thanks...

    EDIT:

    I just noticed that upon closing and reopening the screen with the ListView, I get another confirmation from the proxy model that the equipment is in the space list, and...the delegate now shows up! I don't know what to make of this, but it's certainly interesting.

  • Warnings in default `Constants.qml`

    Moved Unsolved
    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • Efficient way to draw 2D complicated shape in Qt QML?

    Unsolved
    5
    0 Votes
    5 Posts
    205 Views
    R

    @Asperamanca Sorry for late response, and thanks for your answer, it's helpful, I will try that!

  • fonts not loading in my app

    Moved Unsolved
    4
    0 Votes
    4 Posts
    63 Views
    JonBJ

    @MaximBozek
    Bear in mind that I don't know anything about QML, only non-QML/widgets Qt. There I would expect to be able to go qDebug() << QFile::exists(":/fonts/Onest-....ttf") (I think that is right for non-QML, you could try on "qrc:/fonts/Onest-....ttf" but I believe the qrc is for QML only) and see it confirm that it can find that resource file at least. Can you do something similar from QML? I don't know that you can use any C++ code so I have to leave it to you).

    I don't know anything about whether fonts actually have to be installed or not. One would have thought not, they would work from the resource file, but I don't know.

  • Overlay QML View on QOpenGLWindow

    Unsolved
    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • Flickable Drag&Zoom

    Unsolved
    1
    0 Votes
    1 Posts
    27 Views
    No one has replied
  • 0 Votes
    2 Posts
    34 Views
    SGaistS

    Hi,

    Did you follow the suggestions @Pl45m4 made on this thread ?

  • "Simple" masking

    Unsolved
    1
    0 Votes
    1 Posts
    20 Views
    No one has replied
  • Embedding external application on QML screen in Linux

    Unsolved
    5
    0 Votes
    5 Posts
    158 Views
    Pl45m4P

    @Vermithor said in Embedding external application on QML screen in Linux:

    These things are helping to bring a new window but unable to run the VS code within the window

    I don't see the reason why you want to do this... but apparently you haven't read the whole thing.
    How to embed foreign windows is indeeed described there.

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Qmlls.exe not find C++ Custom Types

    Unsolved
    3
    0 Votes
    3 Posts
    75 Views
    K

    @chids
    This doesn't work for me。

    I have restarted qmls.exe and cleared CmakeCache。

    dab4ef0f-d534-4781-a9f1-bc09388309e4-1733118107337.png

  • Cannot load pdf in the app works only for the single file

    Unsolved
    7
    0 Votes
    7 Posts
    216 Views
    Axel SpoerlA

    Yeah, report a bug, please.

  • 0 Votes
    1 Posts
    475 Views
    No one has replied