Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • BoxPlotSeries QML model in C++

    Solved
    5
    0 Votes
    5 Posts
    408 Views
    D
    Does anyone know how to set labels for BoxPlotSeries using VBoxPlotModelMapper? In the documentation the following is written: Each box-and-whiskers item contains data starting from row 1. The name of an item is defined by the column header. However, it is unclear to me what "column header" refers to in this context. I attempted to implement the headerData method, but it wasn't called. Any insights would be appreciated!
  • Qml 6 Bug on Window Restore from Task Bar

    Unsolved
    10
    0 Votes
    10 Posts
    938 Views
    J
    For info, and for people arriving from a web search, the Qt bug that was filed is here: https://bugreports.qt.io/browse/QTBUG-125037
  • Cannot assign to property of unknown type "QString".

    Unsolved
    3
    0 Votes
    3 Posts
    899 Views
    dheerendraD
    In addition what @Axel-Spoerl has already said, avoid using title, data as your properties. data is already as property in item. So confusing. Better use some other names.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    122 Views
  • 0 Votes
    6 Posts
    2k Views
    S
    For audio playlist management and cross-platform transfers, I highly recommend using MuzConvtool, which makes it easy to move playlists between these services without losing track of your favorite songs.
  • how to click on a 3D object?

    Unsolved
    3
    1 Votes
    3 Posts
    276 Views
    Anton1978A
    doesn't anyone know? it's sad
  • Drag and Drop support for TreeView

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

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

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • What is the meaning of res in qrc path like res:/xxx.png?

    Unsolved
    2
    0 Votes
    2 Posts
    324 Views
    S
    resource?
  • QML Loader, passing arguments to source

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    mzimmersM
    @GrecKo said in QML Loader, passing arguments to source: required properties can't work in Loader's components unless you call setSource Well, that's that. Looks like I'll be using setSource() after all; a Loader is better for my use case than a StackView. Thanks to all who looked at this.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Missing types in QtQml even if I have imported QtQuick in Qt5.15.11 for Android

    Unsolved
    1
    0 Votes
    1 Posts
    142 Views
    No one has replied
  • Upgrading from Qt6.3.2 to Qt6.7.3 using Maintenance Tool not working for QML projects

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    J
    Pl45m4, So, I created a new version of my project named: qml6_4_20_customcomps in a folder: Qt6.6.3 Quick Projects on my Desktop. It now has two errors, the first one is: C:\Users\JohnTrites\Desktop\Qt6.6.3 Quick Projects\qml6_4_20_customcomps\build\Desktop_Qt_6_6_3_MinGW_64_bit-Debug_deps\ds-build\src\imports\components\QuickStudioComponentsplugin_init_autogen\mocs_compilation.cpp:3: error: opening dependency file _deps\ds-build\src\imports\components\CMakeFiles\QuickStudioComponentsplugin_init.dir\9d777f3e334334a54a3cc379beec2ab9\mocs_compilation.cpp.obj.d: No such file or directory C:/Users/JohnTrites/Desktop/Qt6.6.3 Quick Projects/qml6_4_20_customcomps/build/Desktop_Qt_6_6_3_MinGW_64_bit-Debug/_deps/ds-build/src/imports/components/QuickStudioComponentsplugin_init_autogen/mocs_compilation.cpp:3:47: fatal error: opening dependency file _deps\ds-build\src\imports\components\CMakeFiles\QuickStudioComponentsplugin_init.dir\9d777f3e334334a54a3cc379beec2ab9\mocs_compilation.cpp.obj.d: No such file or directory 3 | enum some_compilers { need_more_than_nothing }; | ^ So, I think it's looking for the QuickStudioComponentsplugin_init_autogen in the mocs compilation and can't find it. Is this plugin available in the Qt Maintenance Tool or is it a separate download to install from the Qt website? Or is there something else I'm missing? Btw, the demo Qt6.6.3 Quick examples run fine. An example of the calclatr example vs qml6_4_20_customcomps CMakeLists.txt files may provide more insight to the problem: qml6_4_20_customcomps CMakeLists.txt file: cmake_minimum_required(VERSION 3.21.1) option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) option(BUILD_QDS_COMPONENTS "Build design studio components" ON) project(qml6_4_20_customcompsApp LANGUAGES CXX) set(CMAKE_AUTOMOC ON) find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Quick) if (Qt6_VERSION VERSION_GREATER_EQUAL 6.3) qt_standard_project_setup() endif() qt_add_executable(qml6_4_20_customcompsApp src/main.cpp) qt_add_resources(qml6_4_20_customcompsApp "configuration" PREFIX "/" FILES qtquickcontrols2.conf ) target_link_libraries(qml6_4_20_customcompsApp PRIVATE Qt6::Core Qt6::Gui Qt6::Qml Qt6::Quick ) set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} CACHE STRING "Import paths for Qt Creator's code model" FORCE ) if (BUILD_QDS_COMPONENTS) include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) endif() include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) if (LINK_INSIGHT) include(${CMAKE_CURRENT_SOURCE_DIR}/insight) endif () include(GNUInstallDirs) install(TARGETS qml6_4_20_customcompsApp BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) make IDEs aware of the QML import path set(QML_IMPORT_PATH ${PROJECT_BINARY_DIR}/qml CACHE PATH "Path to the custom QML components defined by the project") calclatr CMakeLists.txt file cmake_minimum_required(VERSION 3.16) project(calqlatr LANGUAGES CXX) set(CMAKE_AUTOMOC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/demos/calqlatr") find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2) qt_add_executable(calqlatrexample WIN32 MACOSX_BUNDLE main.cpp ) target_link_libraries(calqlatrexample PRIVATE Qt6::Core Qt6::Gui Qt6::Qml Qt6::Quick Qt6::QuickControls2 ) qt_add_qml_module(calqlatrexample URI demos.calqlatr VERSION 1.0 QML_FILES "calqlatr.qml" "content/Display.qml" "content/NumberPad.qml" "content/CalculatorButton.qml" "content/calculator.js" RESOURCES "content/images/paper-edge-left.png" "content/images/paper-edge-right.png" "content/images/paper-grip.png" RESOURCE_PREFIX / ) if(ANDROID) set_target_properties(calqlatrexample PROPERTIES QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android QT_ANDROID_TARGET_SDK_VERSION "33") endif() if(IOS) set(asset_catalog_path "ios/Assets.xcassets") target_sources(calqlatrexample PRIVATE "${asset_catalog_path}") set_source_files_properties(${asset_catalog_path} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_target_properties(calqlatrexample PROPERTIES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon) endif() install(TARGETS calqlatrexample RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) Any recommendations? Thank you, JT
  • QML project crashes in debug build, but not in release build.

    Unsolved
    1
    0 Votes
    1 Posts
    120 Views
    No one has replied
  • MapItemView and resizing

    Unsolved
    1
    0 Votes
    1 Posts
    137 Views
    No one has replied
  • Dynamically add point to LineSeries of QML Qt Graphs

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    W
    It's okay, it fixed itself ! The move to Qt6.8 has taken QtGraphs out of Technology Preview status, and functions like append(x,y) that weren't accessible in QML now are.
  • scintilla

    Unsolved
    6
    0 Votes
    6 Posts
    614 Views
    SGaistS
    I found a simpler way to do it, see the following: import pathlib import sys from PyQt5.QtGui import QFont, QFontMetrics, QColor from PyQt5.QtWidgets import QApplication from PyQt5.Qsci import QsciScintilla, QsciLexerPython class SimplePythonEditor(QsciScintilla): def __init__(self, parent=None): super().__init__(parent) # Set the default font font = QFont() font.setFamily("Courier") font.setFixedPitch(True) font.setPointSize(10) self.setFont(font) # Margin 0 is used for line numbers fontmetrics = QFontMetrics(font) self.setMarginsFont(font) self.setMarginWidth(0, fontmetrics.width("00000") + 6) self.setMarginLineNumbers(0, True) self.setMarginsBackgroundColor(QColor("#cccccc")) lexer = QsciLexerPython() lexer.setDefaultFont(font) self.setLexer(lexer) if __name__ == "__main__": app = QApplication(sys.argv) editor = SimplePythonEditor() editor.show() editor.setText(pathlib.Path(sys.argv[0]).read_text()) sys.exit(app.exec())
  • Two USB camera sessions not loading simultaneously - QT 6, Camera (QTMultimedia)

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