Commit 351a3cf3 authored by Luci Stanescu's avatar Luci Stanescu

Made Blink a subclass of QApplication

parent b3a338c4
......@@ -6,20 +6,20 @@ __all__ = ['Blink']
import sys
from PyQt4.QtGui import QApplication
from application.python.util import Singleton
from blink.mainwindow import MainWindow
from blink.util import QSingleton
class Blink(object):
__metaclass__ = Singleton
class Blink(QApplication):
__metaclass__ = QSingleton
def __init__(self):
self.app = QApplication(sys.argv)
super(Blink, self).__init__(sys.argv)
self.main_window = MainWindow()
def run(self):
self.main_window.show()
self.app.exec_()
self.exec_()
# Copyright (C) 2010 AG Projects. See LICENSE for details.
#
__all__ = ['QSingleton']
from PyQt4.QtCore import QObject
from application.python.util import Singleton
class QSingleton(Singleton, type(QObject)):
"""A metaclass for making Qt objects singletons"""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment