跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • Implementation of the electricity circulation in wires and electrical components

    Solved
    12
    0 評價
    12 貼文
    3k 瀏覽
    ibiaI
    @Leonardo @JeTSpice @6thC I finally managed to create a first version of the application in QML. It's not super elaborate but it works! https://play.google.com/store/apps/details?id=com.saki.logico
  • QML textedit/textarea style a text (bold, italic) without highlighting

    Unsolved
    2
    0 評價
    2 貼文
    417 瀏覽
    sierdzioS
    Use QSyntaxHighlighter (you need to expose it to QML through a custom subclass). It will handle the highlighting part automatically, you just need to set up the rules.
  • how to make first row constant in dynamic table model in qml?

    Unsolved qml tableview qml tablemodel delegate model
    1
    0 評價
    1 貼文
    234 瀏覽
    尚無回覆
  • Can the signal slot connection method in Cpp && Qml be used in Qt5?

    Unsolved
    6
    0 評價
    6 貼文
    561 瀏覽
    GrecKoG
    @JKSH No it doesn't really allow good decoupling, to connect to a QML object from C++, you have to be aware of it. The example in the first link is specifically about connecting a QML signal to a c++ slot. If your C++ object is a helper for QML to which you pass the QML object reference from QML and is not related to your business logic it's fine. Using findChild or traversing the QML object hierarchy from c++ is almost always not fine.
  • Qt 5.15 QML PDF viewer cannot open password protected PDFs

    Unsolved
    9
    0 評價
    9 貼文
    1k 瀏覽
    S
    If you enter the correct password, the viewer can open the PDF file. As for your question, I suggest you delete the password on the PDF first, so that you can open the PDF directly on the viewer.
  • QML TextArea/TexteEdit map the index of string from formatted to basic form

    Unsolved
    1
    0 評價
    1 貼文
    157 瀏覽
    尚無回覆
  • How to get handle to QQmlApplicationEngine from inside c++ to call retranslate for QML

    Solved
    8
    0 評價
    8 貼文
    935 瀏覽
    F
    @jeremy_k said in How to get handle to QQmlApplicationEngine from inside c++ to call retranslate for QML: if (QQmlEngine *engine = qmlEngine(this)) { engine->retranslate(); } Just need to refactor now, thanks
  • 0 評價
    3 貼文
    453 瀏覽
    V
    QML 5.15. Target is Linux, but I am working on Windows 10. Still, I'm working in QtCreator and this is a build error generated by the QtCreator build process. And the build is being done with minGW. Would expect consistency in this regard across platforms. There is a ListView in this component/module, which from working through it and the many comments/posts I have seen is a problematic component with a host of quirks.
  • Animate PieSlice/PieSeries from old to new value

    Solved
    2
    0 評價
    2 貼文
    221 瀏覽
    S
    hello i post solutions if other need i have fix size of the repeater else anim restart from 0 import QtQuick 2.15 import QtQuick.Controls 2.5 import QtCharts 2.15 import QtQuick.Layouts 1.15 GridLayout { id: omsDetail property int omsImageSize: 70 property variant model columnSpacing: 70 rowSpacing: 4 columns: 2 Layout.alignment: Qt.AlignHCenter Repeater { model: 6 RowLayout { Layout.preferredWidth: omsDetail.omsImageSize Layout.preferredHeight: omsDetail.omsImageSize Image { id: imOms2 Layout.alignment: Qt.AlignRight Layout.preferredWidth: omsDetail.omsImageSize Layout.preferredHeight: omsDetail.omsImageSize source: "qrc:/oms/picture/oms"+model.omsNumber+".png" } ChartView { height: omsDetail.omsImageSize width: omsDetail.omsImageSize plotArea: Qt.rect(0, 0, width, height) id: pieOms2 plotAreaColor: "#00000000" backgroundColor: "#00000000" titleColor: "#00000000" Layout.alignment: Qt.AlignLeft Layout.preferredWidth: omsDetail.omsImageSize Layout.preferredHeight: omsDetail.omsImageSize legend.visible: false property double nextOk: omsDetail.model[index].okCleaning property double nextBad: omsDetail.model[index].badCleaning onNextOkChanged:PropertyAnimation { target: pieOms2; property: "ok"; to: pieOms2.nextOk; easing.type:Easing.InOutQuad; easing.amplitude: 2.0; duration: 300 } onNextBadChanged:PropertyAnimation { target: pieOms2; property: "bad"; to: pieOms2.nextBad; easing.type:Easing.InOutQuad; easing.amplitude: 2.0; duration: 300 } property double ok: 0 property double bad: 1 PieSeries { size: 0.98 PieSlice { id:pieOk value: pieOms2.ok color: "#00FF00" } PieSlice { value: pieOms2.bad color: "#ff8800" } } } } } }
  • error: No rule to make target 'install'. Stop.

    Solved
    6
    0 評價
    6 貼文
    2k 瀏覽
    N
    Hello all I have solved the problem, the make install in build setting was showing "D:<project_name>\bin\android_build" which should be "D:<project_name>\android_build" dont know how but it was inserting "bin" folder in between hence was not able to get the proper folder and make file, so by doing some changes in my destination address I was able to solve it, at last the path for make install was wrong hence it was giving error note: still dont know why exactly the QT was taking wrong path because I was using the same project without any change. I have never changed my script file even my friends are still running the same. Thank you all
  • QML ListView and QAbstractListModel and prefetch part of the data from 10000 records

    Solved
    24
    0 評價
    24 貼文
    4k 瀏覽
    jeremy_kJ
    @Frenk21 said in QML ListView and QAbstractListModel and prefetch part of the data from 10000 records: There is one observation that I found out. Sometimes when I scroll one object with the same index is apparently created, destroyed and immediate after that created once more. Even if the object/item is always visible. The view management sometimes exhibits unexpected behavior. reuseItems is particular source of surprises. Will try to put some rough example, very similar to yours, but it does not use QtNetwork.. I wouldn't bother going into the communication details, unless it's a point of concern and deserves its own question. Good examples should be a useful illustration for a wide audience, with documented public APIs. Nobody needs Hello, World for its own sake.
  • XMLListModel inside a repeater (nested models)

    Solved
    2
    0 評價
    2 貼文
    228 瀏覽
    C
    The problem is solved making the height of the "listNotes" explicit, like ListView { anchors.top: title.bottom id: listNotes height: 50 model: innerModel delegate: Text { height: 25; text: day } onCountChanged: console.log("ListView count: ", count) } or similarly with anchors.fill, Layout, etc...
  • Using QML FileDialog leads to "Binding loop" in ToolBar.qml

    Unsolved
    3
    0 評價
    3 貼文
    654 瀏覽
    R
    @J-Hilk Thanks for the advice! I tried with 5.15.2 and it works faster, but it still throw these messages.
  • QT virtualkeyboard size

    Unsolved
    3
    0 評價
    3 貼文
    822 瀏覽
    ?
    Yes, I tried to set only with according to documentation. It works in landscape mode. But if I rotate the keyboard and set width only, it is working like I described.
  • How to insert Qxlsx data into sqlite database table?

    Solved qml qxlsx dat database sqlite database qsqldatabase
    16
    0 評價
    16 貼文
    3k 瀏覽
    J
    @JonB sorry for that, insert into Dataset(AT) values(?): I know nothing about SQLite. Dataset(AT) is a (syntactically valid) table to insert into, is it? Yes, it is valid statement in sqlite. Also QSqlQuery::prepare() returns a bool for success/failure, which you should be checking. Returns true if the query is prepared successfully; otherwise returns false. Plus, you check QSqlDatabase::lastError() after QSqlQuery::exec() fails, but that says yes, I got error. like QSqlError("","",""); I checked again there was a problem in database but it solved thanks alot. Now, I'm able to insert data into database from QXlsx file.
  • Use column as role in delegateChooser

    Unsolved
    2
    0 評價
    2 貼文
    321 瀏覽
    IntruderExcluderI
    I dunno what your model looks like, but have you tried it this way? DelegateChooser { DelegateChoice { column: 1; ItemDelegate { ... } } ... } You can also try 'display' as a role for DelegateChooser.
  • 0 評價
    2 貼文
    190 瀏覽
    IntruderExcluderI
    The easiest way to pass such data to QML is using QStringListModel.
  • Dynamic addition of component inside a grid (by click Button) and swap elements capability

    Unsolved
    1
    0 評價
    1 貼文
    255 瀏覽
    尚無回覆
  • QML Txt with multiple links - keyboard navigation

    Unsolved
    1
    0 評價
    1 貼文
    187 瀏覽
    尚無回覆
  • QML ToggleButton and StatusIndicator in Qt6

    Unsolved
    1
    1 評價
    1 貼文
    629 瀏覽
    尚無回覆