<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_main_style(widget):
 """Load the main.qss and apply it to the application :param widget: The widget to apply the stylesheet to. Can also be a QApplication. ``setStylesheet`` is called on the widget. :type widget: :class:`QtGui.QWidget` :returns: None :rtype: None :raises: None """

    load_all_resources()
    with open(MAIN_STYLESHEET, 'r') as qss:
        sheet = qss.read()
    widget.setStyleSheet(sheet)