Moved example in a subdirectory

This commit is contained in:
ColinDuquesnoy 2013-03-10 16:34:10 +01:00
parent 3210eb38bb
commit 6e06a97570
3 changed files with 8 additions and 4 deletions

12
example.py → example/example.py Normal file → Executable file
View File

@ -1,9 +1,14 @@
#!/usr/bin/env python
import os
from os.path import abspath, dirname
import sys
sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/../..'))
from PySide import QtGui
import QDarkStyleSheet
import example_ui
# import the style resources
import style_pyside_rc
# create the application and the main window
@ -15,8 +20,7 @@ ui = example_ui.Ui_MainWindow()
ui.setupUi(window)
# setup stylesheet
with open("style.qss", 'r') as stylesheet:
app.setStyleSheet(stylesheet.read())
app.setStyleSheet(QDarkStyleSheet.load_stylesheet(pyside=True))
# run
window.show()