Executes the startup data for the given main window.  This method needs to 
    be called in conjunction with the setup method.
    
    :sa     setup
    
    :param      window  | <QWidget>
                data    | { <str> key: <variant> value, .. }
    
    :return     <int> err

def exec_( window, data ):
    """
    Executes the startup data for the given main window.  This method needs to 
    be called in conjunction with the setup method.
    
    :sa     setup
    
    :param      window  | <QWidget>
                data    | { <str> key: <variant> value, .. }
    
    :return     <int> err
    """
    import_qt(globals())
    
    if 'splash' in data:
        data['splash'].finish(window)
    
    if not window.parent():
        window.setAttribute(QtCore.Qt.WA_DeleteOnClose)
    
    if 'app' in data:
        # setup application information
        data['app'].setPalette(window.palette())
        data['app'].setWindowIcon(window.windowIcon())
        
        # create the tray menu
        if not window.windowIcon().isNull():
            menu   = QtGui.QMenu(window)
            action = menu.addAction('Quit')
            action.triggered.connect( window.close )
            
            # create the tray icon
            tray_icon = QtGui.QSystemTrayIcon(window)
            tray_icon.setObjectName('trayIcon')
            tray_icon.setIcon(window.windowIcon())
            tray_icon.setContextMenu(menu)
            tray_icon.setToolTip(data['app'].applicationName())
            tray_icon.show()
            window.destroyed.connect(tray_icon.deleteLater)
        
        return data['app'].exec_()
    
    return 0