本文整理匯總了Python中qwt.qt.QtGui.QApplication.exec_方法的典型用法代碼示例。如果您正苦於以下問題:Python QApplication.exec_方法的具體用法?Python QApplication.exec_怎麽用?Python QApplication.exec_使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類qwt.qt.QtGui.QApplication
的用法示例。
在下文中一共展示了QApplication.exec_方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: showInfo
# 需要導入模塊: from qwt.qt.QtGui import QApplication [as 別名]
# 或者: from qwt.qt.QtGui.QApplication import exec_ [as 別名]
def showInfo(self, text=""):
self.statusBar().showMessage(text)
def moved(self, point):
info = "Freq=%g, Ampl=%g, Phase=%g" % (
self.plot.invTransform(QwtPlot.xBottom, point.x()),
self.plot.invTransform(QwtPlot.yLeft, point.y()),
self.plot.invTransform(QwtPlot.yRight, point.y()))
self.showInfo(info)
def selected(self, _):
self.showInfo()
def make():
demo = BodeDemo()
demo.resize(540, 400)
demo.show()
return demo
if __name__ == '__main__':
app = QApplication(sys.argv)
fonts = QFontDatabase()
for name in ('Verdana', 'STIXGeneral'):
if name in fonts.families():
app.setFont(QFont(name))
break
demo = make()
sys.exit(app.exec_())
示例2: QApplication
# 需要導入模塊: from qwt.qt.QtGui import QApplication [as 別名]
# 或者: from qwt.qt.QtGui.QApplication import exec_ [as 別名]
# -*- coding: utf-8 -*-
__author__ = 'Valeriy'
from qwt.qt.QtGui import QApplication
from qwt import QwtPlot, QwtPlotCurve
import numpy as np
app = QApplication([])
# x = [1,2,3,4,5,6,7,8,9]
# y1 = [3.2, 5.1 ,7.0, 4.24, 4.41, 8.34, 2.21, 5.657, 6.1]
x = []
y1 = []
my_plot = QwtPlot("Two curves")
curve1 = QwtPlotCurve("Curve 1")
my_plot.resize(600, 300)
curve1.setData(x, y1)
curve1.attach(my_plot)
# my_plot.replot()
my_plot.show()
app.exec_()
# SELECT PrepData FROM= Pdata WHERE ((PNameId=2) AND (SNameId = 14) AND (YearId=2012))