For anyone having the same problem, you shouldn't add button as a child of another button. Add it as a child of a control node. There are some minor syntax mistakes also in my code. So here is how it looks now, it still has problems like rotating it, but visibility is ok.
for i in range(arg.size()):
var button = TextureButton.new()
button.texture_normal = load("res://cijev.png");
button.connect("pressed", self, "myrotate", [i])