Skip to content

Instantly share code, notes, and snippets.

@fereria
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fereria/46a5ad86877eb68ea934 to your computer and use it in GitHub Desktop.
Save fereria/46a5ad86877eb68ea934 to your computer and use it in GitHub Desktop.
styleSheetTest createUI
## -*- 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