Events the Clipboard and Drag and Drop

In this short chapter we begin by describing the key concepts involved in event handling. In the second section we build on this knowledge to show how to control a widget's behavior and appearance by reimplementing low-level event handlers. Later chapters build on the material covered in the first two sections, particularly Chapter 11, which shows how to create custom widgets.

The chapter's third section shows how to use the clipboard, and in particular how to pass and retrieve plain text, HTML, and images to and from the system's global clipboard. The last section shows how to implement drag and drop, both by using PyQt's easy-to-use built-in functionality, and by handling it ourselves to drag and drop custom data. The exercise builds on the coverage of dragging and dropping custom data to allow the user to choose whether to move or copy when dropping.

Was this article helpful?

0 0
YouTube Tactics

YouTube Tactics

Report Reveals 50 Easy-To-Implement YouTube Tactics For Better Videos, More Video Views and Traffic To Your Website.

Get My Free Ebook

Post a comment