
MenuView
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
A Menu-View, tested with Qt4.4
With MenuView it is possible to display a Model like QDirModel as a QMenu.
The MenuView has 2 signals:
void triggered(const QModelIndex &);
void hovered(const QModelIndex &);
which works like the same signals of QAction, but here are the QModelIndex of the triggered/hovered items are transfered.
The constructor of the view:
MenuView(const QString &title, QWidget *parent=0);
The model ist set with:
model->setModel(yourModel, recursive)
The parameter recursive tells the view, to use Sub-Menus, if the Model has the childs.
Please login or register to add a comment or rating