English | Deutsch | Русский | Polski | Nederlands | Português | Español | Українською | فارسی | عربي | 한국어 | Suomi | Català | Italiano | 日本語 | Français | Magyar | ಕನ್ನಡ | हिन्दी | ภาษาไทย | 简体中文 | Български

Qt 5 UiHelpers

http://qt-project.org/wiki/Qt-5-Ui-Helpers

Brief description

The UI Helpers repository contains non-widget based ui classes that are useful for those who intend to develop applications using Qt5/QtQuick 2 but do not want to depend on QtWidgets – mainly desktop applications. Examples of classes are QUndoCommand, QAction, QFileSystemModel, etc.

History

The work started with the change 15857 [codereview.qt-project.org], when we discussed about moving QUndo* out of QtWidgets. In this change, first we moved these classes to QtGui, then to a new lib inside qtbase. However, it was not considered ideal and the decision was to create a separated repo for these classes, leaving QtWidgets untouched (since the Qt community do not want to introduce new bugs in this lib).

Functionality

Follows the table of QtWidgets classes that are available in the independent module UiHelpers. Notice we do not want to use the Ui prefix forever ;)

QtWidget Class UiHelpers Equivalent Status
QUndoStackUiUndoStack
QUndoCommandUiUndoCommand
QUndoGroupUiUndoGroup
QFileSystemModelUiFileSystemModelBetter example needed.
QStandardItemModelUiStandardItemModelNeed both example and test.
QActionUiActionNeeds code and tests cleanup. Also, an example.
QCompleterUiCompletionModelNeeds tests. Example OK.
QProxyModelUiProxyModelWIP

We still doing experiments, far from a stable state. The plan is to go further, provinding an API more suitable to be used with QtQuick 2.

QtQuick Plugins

As the QtQuick is now a firs class citizen of the Qt world, we are creating a few plugins that ease the development of more complex applications in QML. The plugins are adaptions of the C++ classes of this module to have a declarative API.

Follows the table of the plugins we’ll have and it’s status:

Plugin Name Functionality Status
Quick UndoFrameworkQML friendly API to use the UndoFrameworkWIP
Quick CompletionModelQML model for completionWIP

Support

The Qt5 UiHelpers target the following operating systems:

Operating system Supported Note
Windows NT/2K/XP/Vista/7 YES Tests needed
Windows CEYESTests needed
Gnu/Linux YESFull support
MacOSXYESTests needed
Others UnixYESAll POSIX-compatible
SymbianNO

Getting the source code

There are 3 possible ways to get the source code. There is a mirror at Gitorious, where you can also download a tarball. The official repository at qt-project. Only the qt-project repository accepts contributions, using gerrit code review tool.

snapshot of the master branch [qt.gitorious.org]

gitorious mirror:

  1. git clone git://gitorious.org/qtplayground/uihelpers.git

Qt-project main repository:

  1. git clone ssh://<gerrit username>@codereview.qt-project.org:29418/playground/uihelpers.git

Building and Installing

Building

To build the module, be sure to have the Qt5 qmake in your PATH then go to the source directory of your local clone of the UiHelpers repository:

  1. cd uihelpers
  2. qmake
  3. make

Installation

make install works as any other Qt 5 module, installing headers to $QTDIR/include/UiHelpers and libUiHelpers to $QTDIR/lib

Using

There are few examples in the repository, contributions are welcome.

Contribute

Suggestions and contributions are welcome!

After the initial import, patches must go through gerrit:

  1. git push ssh://codereview.qt-project.org:29418/playground/uihelpers.git refs/for/master

We are using the same commit-template used by Qt 5. So, to make things easier, you can do:

  1. git config commit.template $PATH_TO_YOUR_QT5_REPO/.commit-template

You can easily contact us on development@qt-project.org or #qt-labs @ freenode – anselmolsm, luisgabriel, mailson, dakerfp, lacerda, cidoca

To Do List

  • Docs
  • Examples
  • More tests
  • Improve model support in UiQuickCompleter
  • A complete example
  • Test on Window and OS X (contributions are welcome!)
  • Choose a better name for the project ;)
  • Become a Qt Add-on =)

Categories: