Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.5k Posts
  • Set heigth in itemDelegate in TreeView

    Solved
    2
    0 Votes
    2 Posts
    155 Views
    M
    need use rowDelegate
  • Undefined Symbol: "qInitResources_materialsystem()"

    Unsolved ios cmake undefinedsymbol xcode14 qml ios
    2
    0 Votes
    2 Posts
    421 Views
    I
    @Paul-Colby if you have any insights, can you please help me with this
  • QtQml Doubt

    Unsolved
    2
    0 Votes
    2 Posts
    148 Views
    dheerendraD
    Too difficult help here. What is your virtual machine. What is it running ? What is your device. What does it run. How are you compiling on VM ? How are you compiling for device ?
  • QML Circular slider

    Solved
    14
    0 Votes
    14 Posts
    6k Views
    MarkkyboyM
    @Ratataplam - You can glean much info from this github account. I have used this for purposes of creating speedometers; https://github.com/arunpkqt/CircularSlider
  • Read the qtvirtualkeyboard current locale

    Solved
    2
    0 Votes
    2 Posts
    481 Views
    L
    set virtual keyboard language: Component.onCompleted: { VirtualKeyboardSettings.locale = "en_UK" } detect new locale when changing the keyboard language: Connections { target: InputContext onLocaleChanged: { console.debug("new locale:", InputContext.locale) } } limit the language selection list of the keyboard language button: Component.onCompleted: { VirtualKeyboardSettings.activeLocales = ["de_DE", "es_ES", "en_UK"] }
  • Dynamically create Rectangles grid for Maze-like structure

    Unsolved
    1
    0 Votes
    1 Posts
    183 Views
    No one has replied
  • Resize rectangle without mouse

    Unsolved
    1
    0 Votes
    1 Posts
    121 Views
    No one has replied
  • C++ Communication with QML

    Solved
    3
    0 Votes
    3 Posts
    297 Views
    serkan_trS
    @sierdzio this worked
  • keyPressEvent in QQuickPaintedItem has stopped working after moving file to StackView

    Unsolved
    2
    0 Votes
    2 Posts
    135 Views
    jeremy_kJ
    StackView is a focusc scope. The view must have focus == true for the current item to have active focus.
  • Qt6 Proper way to use C++ in QML

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    R
    As if it weren't confusing enough I found this article https://web.archive.org/web/20211003125109/https://www.qt.io/blog/qml-type-registration-in-qt-5.15 which says we don't need qmlRegisterType but simplyh add QML_ELEMENT to my C++ class which I have done but still no luck when I do the import of Dataprocess, the URI defined in CMakeLIsts.txt. Main.cpp #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QtQml/QQmlExtensionPlugin.h> Q_IMPORT_QML_PLUGIN(DataprocessPlugin) Q_IMPORT_QML_PLUGIN(UtilitiesPlugin) int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(u"qrc:/FlightSimDataAnalyzer/main.qml"_qs); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); } Main projects CMakeLists.txt cmake_minimum_required(VERSION 3.16) project(FlightSimDataAnalyzer VERSION 0.1 LANGUAGES CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 REQUIRED COMPONENTS Quick Qml Core ) qt_add_executable(appFlightSimDataAnalyzer main.cpp ) qt_add_qml_module(appFlightSimDataAnalyzer URI FlightSimDataAnalyzer VERSION 1.0 QML_FILES main.qml ) add_subdirectory(Dataprocess) add_subdirectory(Utilities) set_target_properties(appFlightSimDataAnalyzer PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appFlightSimDataAnalyzer PRIVATE Qt6::Quick data_processplugin utilitiesplugin ) install(TARGETS appFlightSimDataAnalyzer BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) CMakeLists.txt for QML and C++ files in the subdirectory. qt_add_library(data_process STATIC) qt_add_qml_module(data_process URI "Dataprocess" VERSION 1.0 QML_FILES GetRawData.qml SOURCES dataprocess.h dataprocess.cpp ) The header file. #ifndef DATAPROCESS_H #define DATAPROCESS_H #include <QObject> #include <QDebug> #include "qqmlintegration.h" class DataProcess : public QObject { Q_OBJECT QML_ELEMENT public: explicit DataProcess(QObject *parent = nullptr); Q_INVOKABLE void rawdataprocess(QString sim, QString rawfile); signals: public slots: private: QString m_datafile; }; #endif // DATAPROCESS_H The C++ file #include "dataprocess.h" DataProcess::DataProcess(QObject *parent) : QObject{parent} { } void DataProcess::rawdataprocess(QString sim, QString rawfile) { qDebug() << "I am in processing."; }
  • Loader type as it should be

    Unsolved
    1
    0 Votes
    1 Posts
    152 Views
    No one has replied
  • Possible to get style name in QML?

    Solved
    3
    0 Votes
    3 Posts
    743 Views
    mzimmersM
    @J-Hilk yeah, that is cleaner for sure...thanks. Can you see a better way to assign the accent based on the style than what I'm doing?
  • ColumnLayout adding borders

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    YunusY
    In my case, adding a rectangle parent to this ColumnLayout is not an option. So I have found a solution like this and solved my problem. By the way, all I need was that adding a border around a ColumnLayout. ColumnLayout { spacing: 0 //top line border Rectangle{ Layout.fillWidth: true height: 1 color: "black" } //create row layout for each element inside column layout RowLayout{ Rectangle{ Layout.fillHeight: true width: 1 color: "black" } // YOUR ELEMENTS HERE Rectangle{ Layout.fillHeight: true width: 1 color: "black" } } . . . //bottom line border Rectangle{ Layout.fillWidth: true height: 1 color: "black" } }
  • How to implement SMPT Server in Qt/Qml

    Unsolved
    9
    0 Votes
    9 Posts
    646 Views
    naveendraKumarN
    @GrecKo may i know the what is transactional email service
  • what is benefits of using qmlRegisterSingletonType ?

    Solved
    4
    1 Votes
    4 Posts
    406 Views
    sierdzioS
    qmlRegisterUncreatableType Use it if you need to expose type information but your don't need to instantiate it. For example, you can use it to expose an enum to QML. qmlRegisterType This fully registers a Q_OBJECT to be used in QML. You can instantiate it in QML, modify it's properties etc.
  • Best practice for adding qml to resources (on mac (MACOSX_BUNDLE TRUE)

    Unsolved
    1
    0 Votes
    1 Posts
    268 Views
    No one has replied
  • QTMultimedia FFMPEG backend preview

    Unsolved
    13
    0 Votes
    13 Posts
    3k Views
    S
    I read on an ffmpeg forum that people make the use of dxva2 and d3d11va through a command line argument for video... "ffmpeg -hwaccel dxva2 -threads 1 -i INPUT -f null - -benchmark" but this is completely unrelated to QT. I attempted to use an envar for hwaccel and using command line arg and no difference.
  • Can't import QML component using QRC

    qml import qqmlapplication qrc components
    8
    0 Votes
    8 Posts
    13k Views
    H
    @Jason-Wright Thanks for your solution. Help me solve the same problem. You can also remove 'as Components', then don't care this alias when use your 'Navigation'.
  • Imagine style automotive example

    Unsolved
    2
    0 Votes
    2 Posts
    206 Views
    SGaistS
    Hi, Sorry, I don't have access to the automotive framework to replicate your issue.
  • 0 Votes
    2 Posts
    162 Views
    SGaistS
    Hi, There's an old QtSolution helper named QtSingleApplication that would fit your case. You should check it.