Skip to content
QtWS25 Last Chance
  • 0 Votes
    3 Posts
    329 Views
    C
    Thanks for your reply. One thing to note is that if I hadn't turned on the virtual keyboard on MacOS, this Dialog destruction wouldn't have caused the program to crash.
  • 0 Votes
    1 Posts
    181 Views
    No one has replied
  • GUI Freezes When Loop is Started

    Solved QML and Qt Quick qml qml dynamic loop function thread
    7
    0 Votes
    7 Posts
    2k Views
    C
    @jsulm U are da king! I am dealing with QML for months, and just learning the property variables! That kinda saved my life mate! Thank you very much!
  • 0 Votes
    5 Posts
    2k Views
    B
    @jpnurmi said in ListView and PageIndicator - PageIndicator is not updated: The bindings are fine. The problem is that the ListView has only snapMode set, but highlightRangeMode seems to be missing. Therefore the ListView is not changing its currentIndex while flicking. snapMode does not affect the currentIndex. To update the currentIndex as the list is moved, set highlightRangeMode to ListView.StrictlyEnforceRange. https://doc-snapshots.qt.io/qt5-5.9/qml-qtquick-listview.html#snapMode-prop Thank you @jpnurmi. The following line solved the problem: highlightRangeMode: ListView.StrictlyEnforceRange Somehow I missed another thread: https://forum.qt.io/topic/81429/listview-does-not-change-currentindex-when-scrolling/6
  • Accessing either one of two components

    Unsolved QML and Qt Quick qt-quick qml binding qml dynamic
    3
    0 Votes
    3 Posts
    940 Views
    B
    Good idea, i will try that as soon as i find some spare time. Though, that cannot be the final solution. I would have to copy too much code. So, what's the right way of doing it?
  • Programmatic QML

    Unsolved QML and Qt Quick qml qml dynamic qml components
    2
    0 Votes
    2 Posts
    1k Views
    shavS
    Hi, If I understand correctly you want to load some components dynamically, right? If so you can read this document. Also you can use Loder component for load QML file dynamically. This component can be use for load qml files from local resource or from public server. In my application I use this methods for load qml components dynamically: /** @brief Create dynamic object from QML file. * @param qml Path to QML file. * @param parent Parent instance. * @param options List of options fields. * @param onComplete Callback function which will call when qml component will be loaded.*/ function createComponentFromQMLFile(qml, parent, options, onComplete) { if(qml !== null && qml !== undefined && qml.length > 0 && parent !== null && parent !== undefined && options !== null && options !== undefined && onComplete !== null && onComplete !== undefined && onComplete instanceof Function) { var tmp = Qt.createComponent(qml); if(tmp !== null) { if(tmp.status === Component.Ready) { var itemInstance = tmp.createObject(parent, options); if(itemInstance !== null) { onComplete(itemInstance); } else { console.log("[EditorHelper] ERROR: Can't create object."); onComplete(null); } } else if (tmp.status === Component.Error) { console.log("[EditorHelper] ERROR: "+tmp.errorString()); onComplete(null); } else { tmp.statusChanged.connect(function () { if (tmp.status === Component.Ready) { var item = tmp.createObject(parent, options); if(item !== null) { onComplete(item); } else { console.log("[EditorHelper] ERROR: Can't create object."); onComplete(null); } } else if (tmp.status === Component.Error) { console.log("[EditorHelper] ERROR: "+tmp.errorString()); onComplete(null); } }); } } else { console.log("[EditorHelper] ERROR: Can't load QML file '"+qml+"'."); onComplete(null); } } else { console.log("[EditorHelper] ERROR: Incorrect parameters."); onComplete(null); } } usnig like this: options = {}; //here you can set any properties from you qml object which need to create. var qml = "qrc:/qml/Components/ErrorMessageWindow.qml"; //Path to qml file from resources for load. //appRootWnd - parent element to which you want to add you dynamic object. EditorHelper.createComponentFromQMLFile(qml, appRootWnd, options, function(wnd) { //here you can set any code which was called when objections will be created and loaded. if(wnd) { wnd.open(); } });
  • Path for SD Card.

    Unsolved Mobile and Embedded qml qml binding qml dynamic
    6
    0 Votes
    6 Posts
    3k Views
    L
    Can you do property string strMmpkdataPath: "/sdcard/pathToMmpk/CARCommune.mmpk"
  • 0 Votes
    3 Posts
    2k Views
    R
    Hi @zeryx I've tried your code with the change below and it works fine (columns are getting populated at runtime) use var headerData = baseTableModel.headerList instead of var headerData = headers at line number 11 in schedulerViewingPane.qml (http://hastebin.com/genuhisodu.sm). Since you are already passing EmployeeModelTable instance baseTableModel to the qml then why not use the headerList property from the instance instead of setting it again.
  • 0 Votes
    6 Posts
    6k Views
    p3c0P
    @PhTe Right it wont work. It cannot anchor to an item which is not its parent or sibling.
  • 0 Votes
    5 Posts
    2k Views
    A
    @Quteroid Thanks, i really bealive i will learn more about javascript
  • 0 Votes
    2 Posts
    879 Views
    SGaistS
    Hi, It's described here
  • Dynamic create and delete Object

    QML and Qt Quick qml dynamic
    4
    0 Votes
    4 Posts
    1k Views
    sierdzioS
    Check with valgrind to be sure, but I think it is OK (use deleteLater() or destroy() method: link).