You need to add the columns to the XTreeWidget (the object that contains and displays the data), not in the tab itself. The
payablesTab is a container that can hold lots of widgets. Try something like this:
var payables = mywindow.findChild("payablesTab"), // be careful to grab the xtreewidget we want on the
_apopen = payables.findChild("_apopen"); // off chance there's more than one called _apopen.
_apopen.addColumn("ElDisc", 100, Qt.AlignRight, true, "apselect_eldisc");
The number and kind of steps are the same. The difference is that this grabs the actual object that has columns.