美文网首页
2018-11-06 Pycharm集成PyQt4并使用

2018-11-06 Pycharm集成PyQt4并使用

作者: 墨茗祺緲 | 来源:发表于2018-11-06 19:48 被阅读0次

Qtdesigner

C:\Python35\Lib\site-packages\pyqt5-tools\designer.exe

$ProjectFileDir$

PyUIC

C:\Python35\python.exe

-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py

$FileDir$


import sys

from PyQt4 import QtGui

app = QtGui.QApplication(sys.argv)

widget = QtGui.QWidget()

widget.resize(250, 150)

widget.setWindowTitle('PyQt')

widget.show()

sys.exit(app.exec_())


import sys

from PyQt5.QtWidgets import *

from PyQt5.QtGui import *

from Dialog_MySignal_t1 import *

class MainFrom(QDialog,Ui_Dialog_MySignals):

    def __init__(self):

        super(MainFrom,self).__init__()

        self.setupUi(self)

        self.dial_thisA.setNotchesVisible(True)

if __name__ == "__main__":

    App = QApplication(sys.argv)

    From = MainFrom()

    From.show()

    App.exec_()

相关文章

网友评论

      本文标题:2018-11-06 Pycharm集成PyQt4并使用

      本文链接:https://www.haomeiwen.com/subject/jyhpxqtx.html