I'm appending 'fileDirectory' list with some objects. How can I create and add button to scroll area for each object in the list. Button should contain the name of the object.
filenames.append(fileDirectory)
print filenames
['obj1', 'obj2', 'obj3']
file = os.path.basename(fileDirectory)
button = QtGui.QPushButton(file)
window.scrollArea.setWidget(button)
The problem is that I always get only one button in my scroll area. How can I make it look like on the photo. Photo