Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • 0 Votes
    6 Posts
    2k Views
    V
    @VFCraig I would add that the Liberation Sans font we are using displays the zero character much narrower in width on my system than on the others, and on the character set sample images available on the net. I have installed the same font files as are used on the other systems. One additional note, I am using 5.15. The others are using 5.14. Though this does not seem the sort of thing impacted by such a minor version change.
  • Automatically incrementing unique ID for a QML items

    Unsolved
    1
    0 Votes
    1 Posts
    203 Views
    No one has replied
  • Undesired object behaviour on LCD display

    Solved
    1
    0 Votes
    1 Posts
    137 Views
    No one has replied
  • I want to create a scene like in 3D builder

    Unsolved 3d canvas scene3d
    1
    0 Votes
    1 Posts
    297 Views
    No one has replied
  • change footer position in qml

    Unsolved
    2
    0 Votes
    2 Posts
    338 Views
    raven-worxR
    @qAminzzz i assume you are talking about the footer of the ApplicationWindow type? If so wrap your footer item in a plain Item and animate the y position relative to this container parent.
  • Accessing the ApplicationWindow from other QML files

    Unsolved
    4
    0 Votes
    4 Posts
    688 Views
    GrecKoG
    Declare a property pointing to your mainView in your ApplicationWindow : ApplicationWindow { property alias mainView: mainView Rectangle { id: mainView } // ... } And then access it through the ApplicationWindow.window attached property in other files: ApplicationWindow.window.mainView
  • Custom QML component using QAbstractTableModel

    Unsolved qml components qtquick2 qml types
    4
    0 Votes
    4 Posts
    941 Views
    M
    Would switching to a QAbstractListModel (you'll get roles instead of columns to define your data) and using a Repeater with a custom delegate work in your usecase? Whether it's a list or a table model doesn't matter much. The number of columns is fixed, so a list model (using roles instead of columns) is fine. This is actually a separate question I wanted to ask in another thread... I don't really understand the concept of "roles." I keep googling it to find more explanations but none of them make sense to me for some reason. The bigger issue is that I don't think I understand how to use a Repeater for this, if what I really need to do is draw something on a canvas for each of the items in the list (or for each row in the table). Can a repeater be used that way? That's because *Views already have the basic plumbing to connect to a model in place [...] just design a component that react to those signals. I think that's the part I was having trouble verbalizing, thank you for attaching the right words to it! Just to make sure I actually understand the methodology, let me type out a scenario and make sure it passes a sanity check. Let's say that I have my subclass of QAbstractTableModel, which, like all descendants of QAbstractItemModel, emits those signals. What I need to do is develop a QML component that connects to those signals. Here's where I'm a little weak in my understanding... It seems to me that there are two things I need to do: Somehow declare a model for the component, where the model is some QAbstractItemModel object in the context of my QQmlApplicationEngine Declare onDataChanged for my custom component, and it will automatically be connected to the dataChanged signal that gets emitted from that QAbstractItemModel object Is that correct, and if so, how do I declare the model object for my custom component? ListView and TableView do this through a delegate model, which, as I mentioned above, I'm not sure I know how to use to draw things on a canvas. Thanks for the help, @GrecKo and @VRonin!
  • How to add line number for TableView?

    Unsolved
    4
    0 Votes
    4 Posts
    370 Views
    S
    I encapsulated a vertical table header myself.
  • Hello World "pixelSize is not a member of QFont" (similar w/ "family")

    Unsolved
    7
    0 Votes
    7 Posts
    836 Views
    KroMignonK
    @veryqtperson said in Hello World "pixelSize is not a member of QFont" (similar w/ "family"): Yet, one would expect a Qt-specific IDE such as Qt Creator not to have such errors when it doesn't know about documented properties of standard Qt/QML types. It depends on what kind of error you are talking about. Qt creator has nothing to do with JavaScript Engine used to run the QML code. What I said, is that even if you QML code is not totally correct, you can run it as long as you are not going through the wrong code part. This is the way JavaScript / interpreted languages works, so nothing direct link with Qt Creator. But, yes, Qt-Creator is far away from being bug free and the 'M16' error messages are very annoying
  • Application Window inactive while Busy Indicator Running

    Unsolved
    1
    0 Votes
    1 Posts
    112 Views
    No one has replied
  • get metadata from video qml

    Unsolved
    1
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • Using barcode scanner causes disappearing of GUI of application

    Unsolved
    2
    0 Votes
    2 Posts
    255 Views
    SGaistS
    Hi, @MHermann said in Using barcode scanner causes disappearing of GUI of application: What is this and what can I do to prevent it? Not knowing anything about the implementation, it's hard to tell anything about what is going on.
  • qml video metadata: undefined

    Unsolved
    1
    0 Votes
    1 Posts
    190 Views
    No one has replied
  • Round the Corner of Map

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    MarkkyboyM
    @tacdin - no idea, sorry, never used slider in a project before.
  • 0 Votes
    22 Posts
    6k Views
    veryqtpersonV
    I've gotten the same problem with my static build of Qt 5.15.2. The solution in my case (using CMake) was to call qt5_import_qml_plugins: get_target_property(QT_TARGET_TYPE Qt5::Core TYPE) if(${QT_TARGET_TYPE} STREQUAL "STATIC_LIBRARY") find_package(Qt5QmlImportScanner REQUIRED) qt5_import_qml_plugins(${CMAKE_PROJECT_NAME}) endif() Not sure what is the equivalent in Qt 6, haven't tested it myself and can't find qt6_import_qml_plugins in documentation. Anyway, qt5_import_qml_plugins is available only from Qt 5.14(?), so for older versions the alternative would be this external module.
  • Found interesting way to crash QML app.

    Solved
    4
    2 Votes
    4 Posts
    766 Views
    fcarneyF
    @JKSH said in Found interesting way to crash QML app.: Would you be willing to submit a bug report to https://bugreports.qt.io/ ? Yeah, I can do that. Edit: https://bugreports.qt.io/browse/QTBUG-98032
  • SQLite db doesn't populate QML ComboBox

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    V
    Would you please tell how do you solve the problem?
  • javascript type annotations do not work in code-behind .js files

    Unsolved javascript qml type safety
    1
    0 Votes
    1 Posts
    460 Views
    No one has replied
  • MediaPlayer often does not play video

    Unsolved
    5
    0 Votes
    5 Posts
    533 Views
    JoeCFDJ
    @Mark81 Multimedia is reworked in Qt 6.2 from the recent talk of Lars Knoll and could have a lot of issues. I would not use it now. I do not use it and still apply gstreamer for playing videos.
  • 0 Votes
    6 Posts
    683 Views
    V
    Got it working. Initially tried to inherit QApplication and incorporate the eventFilter and the signal to be sent in there. That didn't work. Then sorted through Grecko's suggestion, which BTW, qmlRegisterSingletonInstance appears nowhere in the link provided, initially trying to make the QApplication object accessible from QML. That didn't work. Finally got it to work by making the custom object containing the eventFilter and signal accessible from QML (you would think that, installEventFilter, would reparent the object, but then again a custom QApplication that incorporated one didn't work either) and that allowed it to work.