Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.7k Topics 76.2k Posts
  • QtQuick3D rendering issue

    Unsolved
    3
    0 Votes
    3 Posts
    32 Views
    T

    @Jonas-Karlsson Thank you a lot, I will try it out.

  • serialnmea plugin in Qt6

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Issue with Array.IsArray in Qt6.5

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • 0 Votes
    3 Posts
    32 Views
    K

    Thank you for your reply. Yes, I'm currently running the example(simplerhiwidget) for testing purposes and I am sure that my app started and running normally. Is there any parameter I need to modify to enable RenderDoc to inject its DLL into the executable? Also, in the remote host manager, there's nothing I can select; is this normal behavior?
    rhi2.PNG

  • Weird shadow map with texture

    Unsolved
    2
    0 Votes
    2 Posts
    109 Views
    J

    If you are trying to create a cube then it looks like your cube data is wrong as you can see from this picture:
    image.png

  • How to load a umd js ?

    Unsolved
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • What is the problem in this qml file?

    Unsolved
    4
    0 Votes
    4 Posts
    49 Views
    SGaistS

    You did not answer all of my questions.

  • Custom document layout for QML Text Edit

    Unsolved
    1
    0 Votes
    1 Posts
    21 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Binding Loop Width/Height

    Solved
    3
    0 Votes
    3 Posts
    62 Views
    R

    After removing anchors.centerIn: parent from the Label and changed it to anchors.fill: parent the problem was fixed.

  • Reverse the path of PathInterpolator

    Solved
    2
    0 Votes
    2 Posts
    43 Views
    MarkkyboyM

    I solved this after a few attempts using ChatGPT, not what I wanted ultimately, but manually I really struggled with this.

  • Precompiling QML. Can't find modules error

    Unsolved
    3
    0 Votes
    3 Posts
    64 Views
    K

    Okay for debugging purposes, I realized I could just use ENABLE_TYPE_COMPILER on the single module only and try to debug it

    For one of my pure QML only text modules, it complains

    This is my QML file BodyTextBase

    import QtQuick import QtQuick.Layouts Text { readonly property font bodyTextFont: Qt.font({ "family": "Helvetica", "weight": Font.Normal, "italic": false, "pointSize": 16 }) readonly property color bodyTextFontColor: "black" font: bodyTextFont color: bodyTextFontColor wrapMode: Text.Wrap Layout.fillWidth: true }

    This was the Cmake file for this child module

    # File: import/qml_module/TextModule/CMakeLists.txt # Define the static library for the QML module qt_add_library(text_module STATIC) set_target_properties(text_module PROPERTIES AUTOMOC ON) target_link_libraries(text_module PRIVATE Qt6::Quick ) list(APPEND MODULE_QML_FILES BodyTextBase.qml ClickableLinkBase.qml Header1Base.qml Header2Base.qml Header3Base.qml Header4Base.qml Header5Base.qml Header6Base.qml ProgramTitleBase.qml ) # Define the QML module qt_add_qml_module(text_module URI TextModule VERSION 1.0 RESOURCE_PREFIX / ENABLE_TYPE_COMPILER QML_FILES ${MODULE_QML_FILES} )

    It can't find some stuff from the auto-generated code

    7048545b-2d3a-4cdb-93f6-0f9e922aaa1c-image.png

    a34aa817-4a63-49e0-99ee-922c6e3501c2-image.png

    4124311d-8219-46d0-9e00-fd9fd20182dc-image.png

    Issues I see

    ChatGPT summary of the the warnings

    ### Errors in the `TextModule` build process: 1. **Missing Header Files:** Several errors are caused by missing files. The following files cannot be found: - `private/qquickevents_p_p.h` - `private/qquicklayout_p.h` - `private/qquickcolorgroup_p.h` 2. **Undeclared Identifiers:** In the following files, there are instances of undeclared identifiers: - `QQuickText`: This identifier is used but not declared in `bodytextbase.h`. - `QQuickLayoutAttached`: The error suggests this might be a typo and should be `QQuickWindowAttached`. 3. **Expected Class Name:** In `bodytextbase.h`, there's an issue where the compiler expects a class name, but something else is provided, resulting in an error. 4. **Build Stopped:** The build was stopped by `ninja` due to the errors encountered during compilation. --- These issues suggest that certain required Qt internal files are missing, and there are some coding or configuration issues related to undeclared or mistyped identifiers. You may need to check the configuration of your Qt environment, verify that all necessary Qt modules are included, and review the mentioned source files for the correct usage of identifiers and header files.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • 0 Votes
    2 Posts
    34 Views
    GrecKoG

    You could add this margin in the header component itself.
    ListView leftMargin can't be used here since it puts the margin on the left of header.

    If using a Control as the header you could use rightPadding or rightInset to easily add a inside margin.

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

    Unsolved
    4
    0 Votes
    4 Posts
    122 Views
    J

    So there seems to actually be two bugs in one in this example. 1) The shadow mapping is invalid when using an orthographic camera and 2) When using two Directional lights the shadow seems to get painted over. I'll made two bug reports for them here: https://bugreports.qt.io/browse/QTBUG-132080 and https://bugreports.qt.io/browse/QTBUG-132081

  • 0 Votes
    1 Posts
    25 Views
    No one has replied
  • Detec U-Disk Insert and Remove

    Unsolved
    11
    0 Votes
    11 Posts
    196 Views
    Z

    @J-Hilk
    Thank you for your reply,
    Indeed, after I discovered that the "nativeEvent" inherits from the "QWidget", I tried something else, as you said, using the "NativeEventFilter" that inherits from the "QCoreApplication ", but the problem remained. How can I modify and adjust it

  • Creating custom modules

    Solved
    8
    0 Votes
    8 Posts
    227 Views
    K

    Thanks for the help, I appreciate it. First time using modules and I'm learning a lot

    What I've learnt so far:

    Using qt_add_qml_module automatically makes a qmldir and QResources file Cmake file for our project needs this to include a module with our library add_subdirectory(<FolderOfModule>) target_link_libraries(<applicationLibrary> PRIVATE <UriOfModule>plugin) Our module needs to be in it's own folder. Put CMake file, QML files, and resource files we're using for that module Cmake file for our QML module needs this qt_add_qml_module(<NameOfModule>) URI <ImportNameOfModule> VERSION <VersionNumber> RESOURCE_PREFIX <Prefix> QML_FILES <QML_Files> RESOURCES <Resource_Files> Perhaps it also needs this qt_add_library(<NameOfModule> STATIC) set_target_properties(<NameOfModule> PROPERTIES AUTOMOC ON) target_link_libraries(<NameOfModule> PRIVATE Qt6::Quick )

    Can optionally specify an output directory too it seems

    QML file where we include our module needs this

    import <ImportNameOfModule> <VersionNumber>

    Then if we want to use a custom QML element from our module, we refer to it by it's like filename without the extension

    Will also need to make this addition to our main.cpp file

    engine.addImportPath("qrc:/");

    Without this, we'll get a "is not a type" error

    If there's anything else I might not know about modules, let me know and I'll check it out. Think I've made some progress with them now at least. Was using import paths before but modules are what I'm trying to replace all of that with

    Got a module in one's actual project to work as opposed to a project consisting merely of a test module. So many things to get right between the cpp, qml, cmakelists, auto generated QResourceFile, and sci file too in this case

    My module was a text input module. It has a text input base QML file and email text input QML file that inherits from this base. And it uses a border image so that's why there's a .sci resource for that

    3a53f14c-ef31-44a7-aa3d-a8f8b5469bf9-image.png

    Now I'll have to do all of the other modules too

  • 0 Votes
    1 Posts
    33 Views
    No one has replied
  • ListView not displaying results of a QSortFilterProxyModel.

    Unsolved
    14
    0 Votes
    14 Posts
    256 Views
    mzimmersM

    Both of my models properly implement the setData() function as far as I can tell.

    Maybe I'm doing my proxy model incorrectly. The proxy model is set on an EquipmentModel (derived from a QAbstractListModel), but it's my SpaceModel (another QAbstractListModel) that actually sends the dataChanged() signal (hence the connection I show above). Does the signal need to come from the model that the proxy model is set on?

    The SpaceModel also emits a equipmentListChanged() signal when the list changes, and I connect that signal to my proxy model in its constructor (as shown above). Is this not sufficient to provoke the screen update?