本文整理汇总了Python中PyQt4.Qt.qVersion方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.qVersion方法的具体用法?Python Qt.qVersion怎么用?Python Qt.qVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt
的用法示例。
在下文中一共展示了Qt.qVersion方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=control_gui, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
#connection_string = tb.sitl.connection_string()
#print connection_string
tb.connect_to_vehicle('udp:127.0.0.1:14562')
tb.start()
tb.show()
# Connect to the Vehicle.
#print("Connecting to vehicle on: %s" % (connection_string,))
#vehicle = connect(connection_string, wait_ready=True)
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例2: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=control_gui, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
#connection_string = tb.sitl.connection_string()
#print connection_string
#tb.connect_to_vehicle('udp:127.0.0.1:14552',baud_rate)
tb.zmq_setup('tcp://127.0.0.1:14000')
tb.start()
tb.show()
# Connect to the Vehicle.
#print("Connecting to vehicle on: %s" % (connection_string,))
#vehicle = connect(connection_string, wait_ready=True)
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例3: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=control_gui, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
#connection_string = tb.sitl.connection_string()
#print connection_string
#tb.connect_to_vehicle('udp:127.0.0.1:14552',baud_rate)
tb.zmq_setup('tcp://127.0.0.1:14000')
tb.start()
tb.show()
# Connect to the Vehicle.
#print("Connecting to vehicle on: %s" % (connection_string,))
#vehicle = connect(connection_string, wait_ready=True)
def quitting():
tb.running=False
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例4: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=control_gui, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例5: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=top_block, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string("qtgui", "style", "raster")
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
if GUI:
tb.show()
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例6: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=os_uhf_rx, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例7: main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def main(top_block_cls=os_demod_decode, options=None):
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()
示例8: gnuradio_main
# 需要导入模块: from PyQt4 import Qt [as 别名]
# 或者: from PyQt4.Qt import qVersion [as 别名]
def gnuradio_main(samp_rate, gain, freq, block_size):
import ctypes
import sys
if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
print "Warning: failed to XInitThreads()"
from distutils.version import StrictVersion
if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication([])
tb = scope(samp_rate, gain, freq, block_size)
tb.start()
tb.show()
def quitting():
tb.stop()
tb.wait()
qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
qapp.exec_()