Difference between revisions of "Gambas/libraries/gb.qt"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (→‎Navigation: section begin/end tags for navbar)
(links - official reference)
Line 3: Line 3:
  
 
==Overview==
 
==Overview==
[[gb.qt]] is a [[Gambas]] [[library (programming)|library]] which provides functions for displaying and handling [[form (GUI)|form]]s.{{seedling}}
+
[[gb.qt]] is a [[Gambas]] [[library (programming)|library]] which provides functions for displaying and handling [[form (GUI)|form]]s; it uses the [[Qt]] graphical library.{{seedling}}There is also a [[gb.gtk]] component which does much the same but using the [[GTK+]] graphical library, but it appears to be less fully implemented.
 
==Events==
 
==Events==
 
===form display events===
 
===form display events===
Line 14: Line 14:
  
 
Unfortunately, there doesn't seem to be any event which is called exactly ''once'', ''after'' the form is visible; the best [[kluge]] seems to be to put any such code in the '''Activate''' event and check/set a flag so it only gets called once.
 
Unfortunately, there doesn't seem to be any event which is called exactly ''once'', ''after'' the form is visible; the best [[kluge]] seems to be to put any such code in the '''Activate''' event and check/set a flag so it only gets called once.
 +
==Links==
 +
* [http://gambasdoc.org/help/comp/gb.qt official reference]

Revision as of 19:34, 11 January 2008

Navigation

{{#lst:Gambas reference|navbar}}: gb.qt

Overview

gb.qt is a Gambas library which provides functions for displaying and handling forms; it uses the Qt graphical library.

This is a growing seedling article. You can help HTYP by watering it.

There is also a gb.gtk component which does much the same but using the GTK+ graphical library, but it appears to be less fully implemented.

Events

form display events

  • Open() and Show() are both called before the form has displayed
  • Activate() is called when the form gets focus (title bar changes color, in most color schemes)
  • Enter() is called whenever the mouse enters the drawing region of the form (menu bar & frame aren't included)
  • Leave() is called whenever the mouse leaves the drawing region of the form
  • Deactivate() is called whenever the form loses focus
  • nothing seems to trigger GotFocus() and LostFocus(); perhaps these are only used for controls (suggests the inheritance structure isn't set up quite right)

Unfortunately, there doesn't seem to be any event which is called exactly once, after the form is visible; the best kluge seems to be to put any such code in the Activate event and check/set a flag so it only gets called once.

Links