Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. use gui.setTextItems in Qt installer framework

use gui.setTextItems in Qt installer framework

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
installerinstaller errorsettextitems
1 Posts 1 Posters 23 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vueghsP
    wrote last edited by
    #1

    Hello,
    In Qt installer framework...
    I have a ui file containing a QTreeWidget
    <layout class="QVBoxLayout" name="verticalLayout">
    ...
    <item>
    <widget class="QGroupBox" name="groupBox_2">
    <layout class="QHBoxLayout" name="horizontalLayout_2">
    <item>
    <widget class="QTreeWidget" name="treeWidget">
    <column>
    <property name="text">
    <string>Name</string>
    </property>
    </column>
    <column>
    <property name="text">
    <string>Serial Number</string>
    </property>
    </column>
    </widget>
    </item>
    </layout>
    </widget>
    </item>
    </layout>

    In javaScript file, I would like to update this QTreeWidget dynamically, so I created this function:
    Component.prototype.buildList = function()
    {
    var widget = gui.pageWidgetByObjectName("DynamicCameraSelection");
    if (widget != null)
    {
    var listWidget = widget.groupBox_2.treeWidget;
    listWidget.clear();
    var stringlist = [];

        for (var i = 0; i < detectedCameras.length; i++) {
            stringlist += detectedCameras[i].name;
            stringlist += detectedCameras[i].serial;
            console.log(stringlist);
            console.log(widget.groupBox_2.treeWidget);
        }
        gui.setTextItems(widget.groupBox_2.treeWidget, stringlist);
    }
    

    }

    I can see that I am entering the loop, stringlist variable is updated. It is passed through gui.setTextItems.
    Target widget.groupBox_2.treeWidget is found, not null.
    I have no error message.
    And component is not updated in resulting installer.
    Could you help me?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved