Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
351a3cf3
Commit
351a3cf3
authored
Apr 16, 2010
by
Luci Stanescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Blink a subclass of QApplication
parent
b3a338c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
__init__.py
blink/__init__.py
+5
-5
util.py
blink/util.py
+13
-0
No files found.
blink/__init__.py
View file @
351a3cf3
...
@@ -6,20 +6,20 @@ __all__ = ['Blink']
...
@@ -6,20 +6,20 @@ __all__ = ['Blink']
import
sys
import
sys
from
PyQt4.QtGui
import
QApplication
from
PyQt4.QtGui
import
QApplication
from
application.python.util
import
Singleton
from
blink.mainwindow
import
MainWindow
from
blink.mainwindow
import
MainWindow
from
blink.util
import
QSingleton
class
Blink
(
object
):
class
Blink
(
QApplication
):
__metaclass__
=
Singleton
__metaclass__
=
Q
Singleton
def
__init__
(
self
):
def
__init__
(
self
):
s
elf
.
app
=
QApplication
(
sys
.
argv
)
s
uper
(
Blink
,
self
)
.
__init__
(
sys
.
argv
)
self
.
main_window
=
MainWindow
()
self
.
main_window
=
MainWindow
()
def
run
(
self
):
def
run
(
self
):
self
.
main_window
.
show
()
self
.
main_window
.
show
()
self
.
app
.
exec_
()
self
.
exec_
()
blink/util.py
0 → 100644
View file @
351a3cf3
# 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"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment