當前位置: 首頁>>代碼示例>>Python>>正文


Python QApplication.postEvent方法代碼示例

本文整理匯總了Python中enaml.qt.QtGui.QApplication.postEvent方法的典型用法代碼示例。如果您正苦於以下問題:Python QApplication.postEvent方法的具體用法?Python QApplication.postEvent怎麽用?Python QApplication.postEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在enaml.qt.QtGui.QApplication的用法示例。


在下文中一共展示了QApplication.postEvent方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: postUndockedEvent

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def postUndockedEvent(self):
        """ Post a DockItemUndocked event to the root dock area.

        """
        root_area = self.manager().dock_area()
        if root_area.dockEventsEnabled():
            event = QDockItemEvent(DockItemUndocked, self.objectName())
            QApplication.postEvent(root_area, event)
開發者ID:rutsky,項目名稱:enaml,代碼行數:10,代碼來源:q_dock_container.py

示例2: _onSlideOutFinished

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def _onSlideOutFinished(self):
        """ Handle the 'finished' signal from a slide out animation.

        """
        item = self.sender().targetObject()
        item.setAnimation(None)
        container = item.widget()
        area = container.manager().dock_area()
        if area.dockEventsEnabled():
            event = QDockItemEvent(DockItemExtended, container.objectName())
            QApplication.postEvent(area, event)
開發者ID:gabrielcnr,項目名稱:enaml,代碼行數:13,代碼來源:q_dock_bar.py

示例3: post_docked_event

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def post_docked_event(self, container):
        """ Post the docked event for the given container.

        Parameters
        ----------
        container : QDockContainer
            The dock container which was undocked.

        """
        root_area = container.manager().dock_area()
        if root_area.dockEventsEnabled():
            event = QDockItemEvent(DockItemDocked, container.objectName())
            QApplication.postEvent(root_area, event)
開發者ID:ContinuumIO,項目名稱:ashiba,代碼行數:15,代碼來源:layout_builder.py

示例4: closeEvent

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def closeEvent(self, event):
        """ Handle the close event for the dock item.

        This handler will reject the event if the item is not closable.

        """
        event.ignore()
        if self._closable:
            event.accept()
            area = self.rootDockArea()
            if area is not None and area.dockEventsEnabled():
                event = QDockItemEvent(DockItemClosed, self.objectName())
                QApplication.postEvent(area, event)
開發者ID:MatthieuDartiailh,項目名稱:enaml,代碼行數:15,代碼來源:q_dock_item.py

示例5: _onSlideInFinished

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def _onSlideInFinished(self):
        """ Handle the 'finished' signal from a slide in animation.

        """
        item = self.sender().targetObject()
        item.setAnimation(None)
        item.hide()
        self._untrackForResize(item)
        container = item.widget()
        area = container.manager().dock_area()
        if area.dockEventsEnabled():
            event = QDockItemEvent(DockItemRetracted, container.objectName())
            QApplication.postEvent(area, event)
開發者ID:gabrielcnr,項目名稱:enaml,代碼行數:15,代碼來源:q_dock_bar.py

示例6: _onVisibilityTimer

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def _onVisibilityTimer(self):
        """ Handle the visibility timer timeout.

        This handler will post the dock item visibility event to the
        root dock area.

        """
        area = self.rootDockArea()
        if area is not None and area.dockEventsEnabled():
            timer, visible = self._vis_changed
            evt_type = DockItemShown if visible else DockItemHidden
            event = QDockItemEvent(evt_type, self.objectName())
            QApplication.postEvent(area, event)
            self._vis_changed = None
開發者ID:MatthieuDartiailh,項目名稱:enaml,代碼行數:16,代碼來源:q_dock_item.py

示例7: _onCurrentChanged

# 需要導入模塊: from enaml.qt.QtGui import QApplication [as 別名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 別名]
    def _onCurrentChanged(self, index):
        """ Handle the 'currentChanged' signal for the tab widget.

        """
        # These checks protect against the signal firing during close.
        container = self.widget(index)
        if container is None:
            return
        manager = container.manager()
        if manager is None:
            return
        area = manager.dock_area()
        if area is None:
            return
        if area.dockEventsEnabled():
            event = QDockItemEvent(DockTabSelected, container.objectName())
            QApplication.postEvent(area, event)
開發者ID:MatthieuDartiailh,項目名稱:enaml,代碼行數:19,代碼來源:q_dock_tab_widget.py


注:本文中的enaml.qt.QtGui.QApplication.postEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。