There are several problems with the example code, which have all been fixed in the re-written version below. Hopefully this should help to get you started in the right direction.
import sys
from PyQt4 import QtGui, QtCore
class CompiledWindow(QtGui.QWidget):
def __init__(self, parent = None):
QtGui.QWidget.__init__(self, parent)
self.setWindowTitle('Reasonably named window')
names = ['Open Logo Picture', 'Open Setup Picture', 'Open first data file', 'Open second data file', 'Enter text about settings', 'Enter other text about settings', 'Enter third setting', 'Enter fourth setting']
grid = QtGui.QGridLayout(self)
self.Logo_button = QtGui.QPushButton(names[0], self)
self.Logo_button.clicked.connect(self.logo_pic)
grid.addWidget(self.Logo_button, 0, 0)
def logo_pic(self):
self.Logo_picture = unicode(QtGui.QFileDialog.getOpenFileName())
print(self.Logo_picture)
app = QtGui.QApplication(sys.argv)
cw = CompiledWindow()
cw.show()
sys.exit(app.exec_())