Qt Reference Documentation

code.js Example File

script/defaultprototypes/code.js
 listWidget.addItem("Red");
 listWidget.addItem("Blue");
 listWidget.addItem("Green");
 listWidget.addItem("Cyan");
 listWidget.addItem("Yellow");
 listWidget.addItem("Purple");
 listWidget.addItems(["Orange", "Gray"]);

 listWidget.currentItemChanged.connect(
     function(item)
     {
         listWidget.setBackgroundColor(item.text);
     }
 );

 listWidget.show();
X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();