Difference between revisions of "Gambas/libraries/gb.qt"
Jump to navigation
Jump to search
(→Events: drag-drop) |
(moved form-state events to Form page) |
||
(21 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | == | + | ==About== |
− | + | {{l/same|gb.qt}} is a [[Gambas]] [[../|library]] which provides functions for displaying and handling [[form (GUI)|form]]s; it uses the [[Qt]] graphical library. | |
− | + | Related libraries: | |
− | + | * {{l/same|gb.qt4}} is (presumably) specific to version 4 of Qt | |
+ | * {{l/same|gb.gtk}} provides much of the same functionality using the [[GTK+]] graphical library, but it appears to be less fully implemented | ||
+ | * {{l/same|gb.gui}} provides functionality common to GTK+ and Qt, and loads whichever system is currently in use | ||
==Events== | ==Events== | ||
− | ===form | + | ===form state=== |
− | + | ''see [[Gambas/controls/Form]]'' | |
− | + | ===drag-drop=== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ===drag-drop | ||
Some rules which seem to apply: | Some rules which seem to apply: | ||
− | * The | + | * The {{l/sub|Mouse}} location (Mouse.X and Mouse.Y) is not updated while the mouse is dragging anything; you get the mouse's location while dragging from the {{l/sub|Drag}} object. |
* Normal mouse events are also not triggered while the mouse is dragging anything | * Normal mouse events are also not triggered while the mouse is dragging anything | ||
* In order for any element (form or control) to receive mouse events while the mouse is dragging anything, the element's '''Drop''' property must be set to TRUE | * In order for any element (form or control) to receive mouse events while the mouse is dragging anything, the element's '''Drop''' property must be set to TRUE |
Latest revision as of 20:37, 26 April 2015
About
gb.qt is a Gambas library which provides functions for displaying and handling forms; it uses the Qt graphical library.
Related libraries:
- gb.qt4 is (presumably) specific to version 4 of Qt
- gb.gtk provides much of the same functionality using the GTK+ graphical library, but it appears to be less fully implemented
- gb.gui provides functionality common to GTK+ and Qt, and loads whichever system is currently in use
Events
form state
drag-drop
Some rules which seem to apply:
- The Mouse location (Mouse.X and Mouse.Y) is not updated while the mouse is dragging anything; you get the mouse's location while dragging from the Drag object.
- Normal mouse events are also not triggered while the mouse is dragging anything
- In order for any element (form or control) to receive mouse events while the mouse is dragging anything, the element's Drop property must be set to TRUE
- To get continuous updates on the mouse's movements, implement (control).DragMove and (form).DragMove. The control will only receive events while the mouse is inside it; the form will only receive events while the mouse is not inside another drop-enabled control. Use the form events to detect when the mouse has left the control area.