PyQt5
Primer
borgSensorSystem1

MemoryEnhancer + PyQt5 > 入門 > LCD表示

動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)
ADDA v.1.3b6
PyQt5 v5.5.1

概要

プロジェクト開始: https://qiita.com/7of9/items/4077c92b9a773e054193

PyQt5を触ってみる。

参考

code

test_pyqt5_180119.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt5.QtWidgets import  *


def main():
    app = QApplication(sys.argv)
    w = QWidget()
    w.resize(250, 150)
    w.setWindowTitle('Window01')

    WiNum = QLCDNumber()
    BoxLay = QVBoxLayout()
    BoxLay.addWidget(WiNum)
    w.setLayout(BoxLay)

    WiNum.display(3.14)

    w.show()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()

実行

$ python3 test_pyqt5_180119.py

qiita.png

Link

http://doc.qt.io/qt-5/qlcdnumber.html

setDigitCount() > 表示桁を増やす

参考: http://dorafop.my.coocan.jp/Qt/Qt006.html

test_pyqt5_180119.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt5.QtWidgets import  *


def main():
    app = QApplication(sys.argv)
    w = QWidget()
    w.resize(250, 150)
    w.setWindowTitle('Window01')

    WiNum = QLCDNumber()
    BoxLay = QVBoxLayout()
    BoxLay.addWidget(WiNum)
    w.setLayout(BoxLay)

    WiNum.setDigitCount(10)
    WiNum.display(3.141592653589)

    w.show()
    sys.exit(app.exec_())

if __name__ == '__main__':
    main()

qiita.png