Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • retranslate not updating dynamically in Qt6.2, but ok in Qt5.15

    Unsolved
    2
    0 Votes
    2 Posts
    454 Views
    L
    I always do the translation switch from C++ like this: Translator::Translator(QQmlEngine *engine) { _translator = new QTranslator(this); _engine = engine; } void Translator::selectLanguage(QString language) { QString path = ":/i18n"; if (!_translator->load(language, "AppName", "_", path, ".qm")) { qDebug() << "Failed to load translation file, falling back to English"; } qApp->installTranslator(_translator); // change default e.g. for dates | decimals QLocale::setDefault(language); // no QML reload required, handled automatically by engine _engine->retranslate(); // if you want to do anything else onLanguageChanged emit languageChanged(); }
  • QML slot to static signal ?

    Solved
    2
    0 Votes
    2 Posts
    228 Views
    SPlattenS
    @SPlatten , Sorted, added static instance of the class then emitted from that member.
  • Qt Creator Item Delegate

    Unsolved
    1
    0 Votes
    1 Posts
    137 Views
    No one has replied
  • Adding Component dynamically to stacklayout at specific index

    Unsolved
    2
    0 Votes
    2 Posts
    710 Views
    F
    When you call this line: var object = calibraScreen.createObject(layout) You are already added new object as a parent of the StackLayout, and it's automatically add to the end of the children. You can modify the order only change of the parent. For example: StackOrder { id: stack Item { id: a } Item { id: b } Item { id: c } } Component.onCompleted: { a.parent = null // it can be null, or other visible/non visible temp element b.parent = null c.parent = null // and then add order what you want c.parent = stack // now it's first element a.parent = stack // now it's second element b.parent = stack // now it's third element } But it is a bay way, and you are doing something wrong.
  • 0 Votes
    3 Posts
    793 Views
    F
    There are many ways to do this, one of is: Notifier{ id : notifierId rectColor: "yellowgreen" target: receiverId visible: true onNotify: receiverId.receiveInfo(param) } Receiver { id : receiverId rectColor: "dodgerblue" anchors.right: parent.right visible: right }
  • How pass text form QML to Qt

    Solved
    7
    0 Votes
    7 Posts
    640 Views
    F
    @Damian7546 said in How pass text form QML to Qt: Can you help me with below error, How can I remove this? Instead of Connections { onAccepted: ... you need to write Connections { function onAccepted(..) { }
  • QT Quick 2: TableView - resizable column width

    Unsolved
    2
    0 Votes
    2 Posts
    358 Views
    P
    Hello, Did you find some solution? Thanks
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    2 Posts
    228 Views
    MarkkyboyM
    Add a small margin to the left of the text element?, perhaps I misunderstand what you're asking.....?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    22 Views
    No one has replied
  • How to use an id an of a file.qml in the main file.qml?

    Solved
    3
    0 Votes
    3 Posts
    290 Views
    N
    @sierdzio thanks you, that work well
  • Criate different numbers images in different points

    Solved
    2
    0 Votes
    2 Posts
    200 Views
    M
    It's work https://doc.qt.io/qt-6/qtquick-modelviewsdata-modelview.html
  • QML ListView - open file by selected Elemnt

    Solved
    3
    0 Votes
    3 Posts
    365 Views
    JoeCFDJ
    @Damian7546 said in QML ListView - open file by selected Elemnt: settingsListView MouseArea { anchors.fill: parent onClicked: { /* here you need to set */ settingsListView.currentIndex = index openPicture(index) } }
  • WebEngineView - Fill input with virtual keyboard.

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

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Loading QML files inside QmlElement

    Unsolved
    1
    0 Votes
    1 Posts
    172 Views
    No one has replied
  • increase map zoom level

    Unsolved
    1
    0 Votes
    1 Posts
    210 Views
    No one has replied
  • No ui.qml in templates new files

    Unsolved
    12
    0 Votes
    12 Posts
    968 Views
    M
    But I install all this: [image: 8047cf26-bbb4-46bc-bbd0-0a7fa5ea7bb0.png]
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • Ask help about Mysql query in QML

    Unsolved
    3
    0 Votes
    3 Posts
    228 Views
    Y
    @JonB. Thank you very much. I am very glad you can give me help. I can get the result of: console.log("========", main_coal_SQLquery.rowCount()) but I can not the the result of console.log("========", main_coal_SQLquery.record(0)) The mistake is "TypeError: Property 'record' of object MySQLQuery(0x18692474a90) is not a function"