KDE 5.0 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KDragWidgetDecoratorBase Class Reference

from PyKDE5.kwidgetsaddons import *

Inherits: QObject

Detailed Description

A decorator which adds drag-support to widgets

This is a decorator using an event filter to implement drag-support in widgets. You must override the virtual method dragObject() to specify the QDrag to be used.

Author:
Carsten Pfeiffer <pfeiffer@kde.org>


Methods

 __init__ (self, QWidget parent=0)
QWidget decoratedWidget (self)
QDrag dragObject (self)
bool eventFilter (self, QObject watched, QEvent event)
bool isDragEnabled (self)
 setDragEnabled (self, bool enable)
 startDrag (self)

Method Documentation

__init__ (  self,
QWidget  parent=0
)

Default constructor.

QWidget decoratedWidget (   self )

Returns:
the widget this decorator is attached to

QDrag dragObject (   self )

Reimplement this and return the QDrag object that should be used for the drag. Remember to give it "decoratedWidget()" as parent.

Default implementation returns 0, so that no drag is initiated.

bool eventFilter (  self,
QObject  watched,
QEvent  event
)

Reimplemented to add drag-support

bool isDragEnabled (   self )

Returns:
if drag support is enabled or not.

setDragEnabled (  self,
bool  enable
)

Enables/disables drag-support. Default is enabled.

startDrag (   self )

Starts a drag (Copy by default) using dragObject()

  • Full Index

Modules

  • karchive
  • kcoreaddons
  • kguiaddons
  • kitemmodels
  • kitemviews
  • kplotting
  • kwidgetsaddons
  • solid
  • sonnet
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal