PyQt5常用组件及页面布局

花了几天时间学习了PyQt5的常用组件及页面布局,现总结如下借用网上的图界面一主要用到的布局器:QVBoxLayout,QHBoxLayout主要组件:QPushButton,QLabel,QDoubleSpinBox,QLineEdit self.form_v1 = QWidget() self.formLayout1 = QVBoxLayout(se...
摘要由CSDN通过智能技术生成

花了几天时间学习了PyQt5的常用组件及页面布局,现总结如下
借用网上的图
在这里插入图片描述

界面一

主要用到的布局器:QVBoxLayout,QHBoxLayout
主要组件:QPushButton,QLabel,QDoubleSpinBox,QLineEdit

        self.form_v1  = QWidget()
        self.formLayout1 = QVBoxLayout(self.form_v1)
        self.h11 = QWidget()
        self.formLayout_h11 = QHBoxLayout(self.h11)
        self.h12 = QWidget()
        self.formLayout_h12 = QHBoxLayout(self.h12)

        self.btn_tf1 = QPushButton("tf")
        self.btn_tf1.clicked.connect(self.tf_start)
        self.x_show = QLabel()
        self.x_show.setText("x")
        self.x_spin = QDoubleSpinBox()
        self.x_spin.setRange(0.0,5.0)
        self.x_spin.setValue(0.5)
        self.x_spin.setSingleStep(0.1)
        self.y_show = QLabel()
        self.y_show.setText("y")
        self.y_spin = QDoubleSpinBox()
        self.y_spin.setRange(0.0, 5.0)
        self.y_spin.setSingleStep(0.1)
        self.y_spin.setValue(0.5)
        self.z_show = QLabel()
        self.z_show.setText("z")
        self.z_spin = QDoubleSpinBox()
        self.z_spin.setRange(0.0, 5.0)
        self.z_spin.setSingleStep(0.1)
        self.z_spin.setValue(0.5)
        self.btn_tf2 = QPushButton("world2map")
        self.btn_tf2.clicked.connect(self.tf_transfer)
        self.showTf = QLineEdit(" ")

        self.label1 = QLabel
  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值