WidgetModel

Qt Components

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5.0
Description:

A simple Widget-Model, tested with Qt4.4

This is a ListModel where you can add your Widgets.

The Title, Icon, ToolTip, StatusTip and WhatsThis from the widgets are translated to roles of the Model.

If editing is enabled the user can edit the Title of the Widgets.

If a widget is deleted, it is automatically removed from the model.

To display the model you can use an QListView.


Example usage:

#include "widgetmodel.h"

WidgetModel *model=new WidgetModel(this);

//adds a widget to the model
model->addWidget(myWidget);

//removes a widget form the model
model->removeWidget(myWidget);

//sets the Model in Edit-Mode
model->setEditable(true);

//Which index has your widget
QModelIndex index=model->indexForWidget(myWidget);
Be the first to comment
12345678910
product-maker Count:2 Rating: 5.00
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.1
updated Jan 06 2010
added Jan 06 2010
downloads today
0
page views today 1
System Tags
+