The application name is distinct from the window title. The window manager usually draws the window title into the title bar of the (main) window, while the application name is used by (e.g. Gnome) to represent the application itself.
Qt seems to be passing on the first argument's first item of its constructor's signature to the underlying window-manager:
app = QApplication(('My Application Name',))
QApplication.applicationName
seems to be mainly used for application-internal purposes.
A more complete (basic) set-up would then look something like this (in Python, C++ would be analogous) - not the invocation of MyQApplication
's superclass's constructor:
from PySide import QtCore, QtGui
import sys
class MyQApplication(QtGui.QApplication):
def __init__(self, app_name):
super(MyQApplication, self).__init__((app_name,))
self.setApplicationName(app_name)
self.main_window = QtGui.QMainWindow()
self.main_window.setWindowTitle("My Application's Main Window")
self.main_window.show()
if __name__ == '__main__':
app = MyQApplication("My Application's Name")
sys.exit(app.exec_())