Meego:阿汤学QT--QWidget modules

 

QWidget是pyqt中最重要的类,它实际是继承了:

  • QObject
  • QPaintDevice

可以说我们所有操作的图形控件都是从这里继承来的。QWidget包含了控件的基本属性和基本操作,所以在看其他控件的时候只要比较针对QWidget的不同之处就可以了。具体细节传送门

QWidget

  • Widget的分类:
    • Window:A widget that is not embedded in a parent widget is called a window
    • child widget
    • Composite Widget,包含child的widget,可以是window,也可以是child
  • Layout:child widget的排版方式
  • child class
    • QDialog
      • QMainWindow常用为main window
  • Event:widget接受QT发来的event,并进行处理,如果要实现自己对应的功能需要重载这些函数
    • mouse movement
    • button presses
    • keyboard
    • window resizing
    • focus In/Out
  • funcation & properties
    • Widnow
    • Top-level window
    • Window contects
    • Geometry
    • Mode
    • Look & feel
      • .setAttribute()
        • Translucent Windows
    • focus
    • mouse & keyboard grabbing
    • event handlers
    • system functions
    • interactive help

      原文链接:http://software.intel.com/zh-cn/blogs/2010/04/22/meegoqt-qwidget-modules/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值