QWidget类解析

  • windowModality : Qt::WindowModality
    This property holds which windows are blocked by the modal widget
    这个属性设置本窗口是否为模式对话框以及模式对话框的属性
    This property only makes sense for windows. A modal widget prevents widgets in other windows from getting input. The value of this property controls which windows are blocked when the widget is visible. Changing this property while the window is visible has no effect; you must hide() the widget first, then show() it again.
    此属性仅在Windows环境下生效,模式对话框提供了一个可以使其他窗口得到输入的窗口,这个属性的值决定这个窗口在生效的时候,这个窗口是否是固定的,在这个窗口显示的时候改变这个属性对此窗口是无效的,你必须先隐藏这个窗口,然后再把它展示出来
    By default, this property is Qt::NonModal.
    This property was introduced in Qt 4.1.

  • sizeIncrement : QSize
    This property holds the size increment of the widget
    这个属性控制窗口的尺寸增加参数
    When the user resizes the window, the size will move in steps of sizeIncrement().width() pixels horizontally and sizeIncrement.height() pixels vertically, with baseSize() as the basis. Preferred widget sizes are for non-negative integers i and j:
    当用户改变窗口的大小时,尺寸将会基于基础尺寸且按照sizeIncrement().width()来一步步的增加宽度,按照sizeIncrement.height() 来一步步增加高度,不要输入负值

  • mouseTracking : bool
    This property holds whether mouse tracking is enabled for the widget
    这个属性决定了是否在这个窗口中追踪鼠标的位置
    If mouse tracking is disabled (the default), the widget only receives mouse move events when at least one mouse button is pressed while the mouse is being moved.
    如果不追踪,窗口仅在鼠标点下的时候获取鼠标的位置
    If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.
    如果持续追踪鼠标的位置,窗口将会持续接收到鼠标的位置

上一篇:mac 80端口映射 配置


下一篇:如何将鼠标事件传递给我在C#/ Vista中的应用程序?