Current version: 0.3.3 (16-Jul-2006)

1. What is wwWidgets?

wwWidgets is a set of useful widgets for Qt 3. All widgets can be placed directly in Qt Designer using a widget plugin. To use these widgets, you have to compile the widget plugin and place it somewhere where designer will see it (either use qtconfig to configure such a place, use an existing path or place the plugin in $QTDIR/lib/plugins/designer. Next time you start Designer, the plugin should be active and ready to use. You also need to link your applications against appropriate classes. You can do it in two ways – either by adding appropriate files from wwWidgets distribution to your project or by linking against the plugin itself. If you have any problems, consult the Qt Designer manual or Qt Plugins Howto.

2. What widgets are available?

2.1. wwActiveLabel

wwActiveLabel is an enhanced version of QLabel that adds new signals connected with mouse events, like clicking and hovering mouse pointer over the widget.

2.2. wwLineEdit

This widget is an enhancement to the standard QLineEdit. It allows one to enter a regular expression (QRegExp) directly in Designer, which will be responsible for validation of line edit's input. The following example demonstrates how to set a validator in a hand written code.

wwLineEdit *le; le = new wwLineEdit(this); le->setRegExp("[A-Za-z_][A-Za-z0-9_]*"); // allow an "identifier" le->show();

You can set the validator directly in Qt Designer using regExp property in the property editor. Just place wwLineEdit on the form and set the value of this property. You can change the validator anytime either by setValidator() or by changing the value of regExp property. Thanks to this extension you don't have to write additional code to make your line edit accept only the format you want – now you can use either the input mask or the regexp to do the job.

2.3. wwFloatSpinBox

wwFloatSpinBox is an enhanced version of QSpinBox that supports real numbers. As the spinbox operates on integer numbers internally, so an overflow may occur with very high values of precisions. Please note, that for integers one should still use QSpinBox (although wwFloatSpinBox supports integers too).

2.4. wwCanvasView

wwCanvasView is a subclass of QCanvasView. It adds support for clicking and dragging items without the need to subclass QCanvasView. The programmer can enable dragging, which will cause all items to be draggable. A side effect is that a signal will be emitted whenever an item is clicked or dragged. Also a context menu can be created by adding a set of QActions to the widget.

2.5. wwListBoxNav

wwListBoxNav is an extension to a QListBox, which adds two buttons – "Up" and "Down" which make it possible to move items up and down. Additionaly a method removeSelected() is provided to remove the currently selected item.

3. What's more?

Additionally to new custom widgets, wwWidgets allow one to place QWorkspace, QCanvasView, QGLWidget directly on forms. Use of these items is limited as they are often subclassed to provide functionality (especially QGLWidget), but some may find it usefull anyway.

4. Download

5. Contact

You can reach me via private messaging system on QtCentre.org if you are registered there.


A. Changelog

wwFloatSpinBox has been significantly rewritten to fix some broken behaviours. I hope it works well now :-)
Fixed an issue with wwFloatSpinBox causing incorrect reaction to value change.
Fixed a small issue with wwFloatSpinBox.
Added wwCanvasView and wwListBoxNav support.
Changed forum references to point to QtCentre. Thanks to Johan Thelin for pointing this out.
Added wwFloatSpinBox support
Changed architecture of the plugin itself a little bit.
wwWidgets 0.1 released

B. Links to other Qt related sites