本文整理汇总了Python中Console.setStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:Python Console.setStyleSheet方法的具体用法?Python Console.setStyleSheet怎么用?Python Console.setStyleSheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console.setStyleSheet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: import Console [as 别名]
# 或者: from Console import setStyleSheet [as 别名]
class MainWindow(QMainWindow, Ui_MainWindow):
"""
Class documentation goes here.
"""
def __init__(self, parent=None):
"""
Constructor
"""
QMainWindow.__init__(self, parent)
self.setupUi(self)
self.console = Console(startup_message=welcome_message)
self.console.setStyleSheet(_fromUtf8("font: 75 11pt \"微软雅黑\";\n"
"background-color: rgb(245, 245, 245);\n"
"color: rgb(0, 0, 0);\n"
"selection-color: rgb(255, 170, 0);"))
self.verticalLayout_6.addWidget(self.console)
self.console.updateNamespace({'myVar1': app, 'myVar2': 1234})
self.openFilesPath = ""
self.userFlag=False
self.userName=""
self.userLimits=-1
self.flag2 = 1
self.idcount = 100
self.ip= "127.0.0.1"
self.host = "CHENGMIN-PC\MSSQLSERVERCM"
self.user = "sa"
self.pwd = "111"
self.isProcess=False
self.db = "AOPAS_DATABASE"
"""
self.ip= ""
self.host = "Local MySQL55"
self.user = "chengmin"
self.pwd = "chengmin123"
"""
#self.ms = MSSQL(host=self.ip+"\\"+self.host, user=self.user, pwd=self.pwd, db=self.db)
#
self.tablename = ""
self.sqlstr_condition = ""
self.sqlstrtail = ""
#打开文件
self.actionOpenFolder.triggered.connect(functools.partial(self.openDirectory,self.actionOpenFolder))
self.action_f1.triggered.connect(functools.partial(self.openDirectory,self.action_f1))
self.action_f2.triggered.connect(functools.partial(self.openDirectory,self.action_f2))
#保存文件
self.actionSave.triggered.connect(functools.partial(self.openDirectory,self.actionSave))
self.actionS3.triggered.connect(functools.partial(self.openDirectory,self.actionS3))
self.actionS4.triggered.connect(functools.partial(self.openDirectory,self.actionS4))
#系统退出
self.actionLoginOut.triggered.connect(functools.partial(self.Quit,self.actionLoginOut))
self.actionS5.triggered.connect(functools.partial(self.Quit,self.actionS5))
#用户登录
self.connect(self.actionD1, QtCore.SIGNAL("triggered()"),functools.partial(self.userLogin,self.actionD1))
self.connect(self.actionLoginIn, QtCore.SIGNAL("triggered()"),functools.partial(self.userLogin,self.actionLoginIn))
#系统设置
self.connect(self.actionSetting, QtCore.SIGNAL("triggered()"),functools.partial(self.Setting,self.actionSetting))
self.connect(self.actionT1, QtCore.SIGNAL("triggered()"),functools.partial(self.Setting,self.actionT1))
#数据导入
self.connect(self.actionImport, QtCore.SIGNAL("triggered()"),functools.partial(self.Import,self.actionImport))
self.connect(self.actionD2, QtCore.SIGNAL("triggered()"),functools.partial(self.Import,self.actionD2))
#数据删除
self.actionD3.triggered.connect(self.Delete)
#数据查询
self.connect(self.actionDpb_Query, QtCore.SIGNAL("triggered()"),functools.partial(self.Query,self.actionDpb_Query))
self.connect(self.actionD4, QtCore.SIGNAL("triggered()"),functools.partial(self.Query,self.actionD4))
#数据下载
self.actionD5.triggered.connect(self.D5)
self.customContextMenuRequested.connect(self.mainwindowRightClick)
#数据排序
self.actionAscend.triggered.connect(functools.partial(self.Sort,self.actionAscend))
self.actionDescend.triggered.connect(functools.partial(self.Sort,self.actionDescend))
self.dtableView.horizontalHeader().sectionClicked.connect(self.dbsectionClicked)
self.dtableView.horizontalHeader().sectionDoubleClicked.connect(self.dbsectionDoubleClicked)
self.dtableView.horizontalHeader().setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.dtableView.horizontalHeader().customContextMenuRequested.connect(functools.partial(self.dbRightClicked,self.dtableView))
#self.dtextEdit.customContextMenuRequested.connect(functools.partial(self.dbRightClicked,self.tableView))
#self.model = QtSql.QSqlQueryModel()
self.mplwidget.temp1=[]
self.dcheckBoxX.checked = True
self.dcheckBoxX.checked = True
self.dcheckBoxX.checked = True
self.Xindex = -1
self.Yindex = -1
self.Zindex = -1
self.Xresult = []
self.Yresult = []
self.Zresult = []
self.YcountA=0
self.YcountB=0
#.........这里部分代码省略.........