Last active
August 29, 2015 14:25
-
-
Save fereria/46a5ad86877eb68ea934 to your computer and use it in GitHub Desktop.
styleSheetTest createUI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -*- coding: utf-8 -*- | |
#*----------------------------------------------*# | |
# 各種モジュール読み込み | |
#*----------------------------------------------*# | |
import re | |
import sys | |
from PySide import QtCore, QtGui | |
import styleSheetTest as ssUI | |
#*----------------------------------------------*# | |
# MAIN | |
#*----------------------------------------------*# | |
class testView(QtGui.QDialog): | |
def __init__(self,parent=None): | |
QtGui.QDialog.__init__(self,parent) | |
self.ui = ssUI.Ui_Form() | |
self.ui.setupUi(self) | |
self.setCSS() | |
def setCSS(self): | |
""" | |
同じフォルダにあるCSSを読み込んで、CSSにセットする | |
""" | |
with open("test.css","r") as f: | |
self.setStyleSheet("".join(f.readlines())) | |
#*----------------------------------------------*# | |
# 起動時のコード | |
#*----------------------------------------------*# | |
if __name__ == '__main__': | |
app = QtGui.QApplication(sys.argv) | |
dlg = testView() | |
dlg.show() | |
sys.exit(app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment