Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt 5 UI Helpers: Difference between revisions
AutoSpider (talk | contribs) (Add "cleanup" tag) |
(IRC channels have moved to Libera.Chat) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
'''English''' | '''English''' | ||
| [[:Qt-5-UI-Helpers_German|Deutsch]] | | [[:Qt-5-UI-Helpers_German|Deutsch]] | ||
Line 34: | Line 32: | ||
== History == | == History == | ||
The work started with the | The work started with the [http://codereview.qt.io/#change,15857 change 15857], 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 == | == Functionality == | ||
Line 40: | Line 38: | ||
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 ;) | 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 ;) | ||
{ | {| class="wikitable" | ||
| | ! QtWidget Class | ||
! UiHelpers Equivalent | |||
! Status | |||
|- | |||
|QUndoStack | |QUndoStack | ||
|UiUndoStack | |UiUndoStack | ||
| - | | - | ||
| | |- | ||
|QUndoCommand | |QUndoCommand | ||
|UiUndoCommand | |UiUndoCommand | ||
| - | | - | ||
| | |- | ||
|QUndoGroup | |QUndoGroup | ||
|UiUndoGroup | |UiUndoGroup | ||
| - | | - | ||
| | |- | ||
|QFileSystemModel | |QFileSystemModel | ||
|UiFileSystemModel | |UiFileSystemModel | ||
|Better example needed. | |Better example needed. | ||
| | |- | ||
|QStandardItemModel | |QStandardItemModel | ||
|UiStandardItemModel | |UiStandardItemModel | ||
|Need both example and test. | |Need both example and test. | ||
| | |- | ||
|QAction | |QAction | ||
|UiAction | |UiAction | ||
|Needs code and tests cleanup. Also, an example. | |Needs code and tests cleanup. Also, an example. | ||
| | |- | ||
|QCompleter | |QCompleter | ||
|'''UiCompletionModel''' | |'''UiCompletionModel''' | ||
|Needs tests. Example OK. | |Needs tests. Example OK. | ||
| | |- | ||
|QProxyModel | |QProxyModel | ||
|UiProxyModel | |UiProxyModel | ||
|'''WIP''' | |'''WIP''' | ||
| | |} | ||
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. | 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. | 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: | Follows the table of the plugins we'll have and it's status: | ||
{ | {| class="wikitable" | ||
| | ! Plugin Name | ||
! Functionality | |||
! Status | |||
|- | |||
|'''Quick UndoFramework''' | |'''Quick UndoFramework''' | ||
|QML friendly API to use the UndoFramework | |QML friendly API to use the UndoFramework | ||
|'''WIP''' | |'''WIP''' | ||
| | |- | ||
|'''Quick CompletionModel''' | |'''Quick CompletionModel''' | ||
|QML model for completion | |QML model for completion | ||
|'''WIP''' | |'''WIP''' | ||
| | |} | ||
== Support == | == Support == | ||
Line 98: | Line 101: | ||
The Qt5 UiHelpers target the following operating systems: | The Qt5 UiHelpers target the following operating systems: | ||
{ | {| class="wikitable" | ||
| | ! Operating system | ||
! Supported | |||
! Note | |||
|- | |||
|Windows NT/2K/XP/Vista/7 | |Windows NT/2K/XP/Vista/7 | ||
|YES | |YES | ||
|Tests needed | |Tests needed | ||
| | |- | ||
|Windows CE | |Windows CE | ||
|YES | |YES | ||
|Tests needed | |Tests needed | ||
| | |- | ||
|Gnu/Linux | |Gnu/Linux | ||
|YES | |YES | ||
|Full support | |Full support | ||
| | |- | ||
|MacOSX | |MacOSX | ||
|YES | |YES | ||
|Tests needed | |Tests needed | ||
| | |- | ||
|Others Unix | |Others Unix | ||
|YES | |YES | ||
|All POSIX-compatible | |All POSIX-compatible | ||
| | |- | ||
|Symbian | |Symbian | ||
|NO | |NO | ||
| - | | - | ||
| | |} | ||
== Getting the source code == | == Getting the source code == | ||
The official repositories are at code.qt.io. The qt-project repository accepts contributions, using gerrit code review tool. | |||
code.qt.io mirror: | |||
<code> | <code> | ||
git clone git:// | git clone git://code.qt.io/playground/uihelpers.git | ||
</code> | </code> | ||
Line 175: | Line 179: | ||
</code> | </code> | ||
You can easily contact us on development@qt.io or #qt-labs | You can easily contact us on development@qt.io or #qt-labs Libre.Chat - anselmolsm, luisgabriel, mailson, dakerfp, lacerda, cidoca | ||
== To Do List == | == To Do List == | ||
Line 185: | Line 189: | ||
* A complete example | * A complete example | ||
* Test on Window and OS X (contributions are welcome!) | * Test on Window and OS X (contributions are welcome!) | ||
* Choose a better name for the project, like | * Choose a better name for the project, like [http://www.fixithere.net fixithere] ;) | ||
* Become a Qt Add-on =) | * Become a Qt Add-on =) |
Latest revision as of 22:12, 14 August 2021
English | Deutsch | Русский | Polski | Nederlands | Português | Español | Українською | فارسی | عربي | 한국어 | Suomi | Català | Italiano | 日本語 | Français | Magyar | ಕನ್ನಡ | हिन्दी | ภาษาไทย | 简体中文 | Български
Qt 5 UiHelpers
http://wiki.qt.io/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, 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 |
---|---|---|
QUndoStack | UiUndoStack | - |
QUndoCommand | UiUndoCommand | - |
QUndoGroup | UiUndoGroup | - |
QFileSystemModel | UiFileSystemModel | Better example needed. |
QStandardItemModel | UiStandardItemModel | Need both example and test. |
QAction | UiAction | Needs code and tests cleanup. Also, an example. |
QCompleter | UiCompletionModel | Needs tests. Example OK. |
QProxyModel | UiProxyModel | WIP |
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 UndoFramework | QML friendly API to use the UndoFramework | WIP |
Quick CompletionModel | QML model for completion | WIP |
Support
The Qt5 UiHelpers target the following operating systems:
Operating system | Supported | Note |
---|---|---|
Windows NT/2K/XP/Vista/7 | YES | Tests needed |
Windows CE | YES | Tests needed |
Gnu/Linux | YES | Full support |
MacOSX | YES | Tests needed |
Others Unix | YES | All POSIX-compatible |
Symbian | NO | - |
Getting the source code
The official repositories are at code.qt.io. The qt-project repository accepts contributions, using gerrit code review tool.
code.qt.io mirror:
git clone git://code.qt.io/playground/uihelpers.git
Qt-project main repository:
git clone ssh://<gerrit username>@codereview.qt.io: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:
cd uihelpers
qmake
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:
git push ssh://codereview.qt.io: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:
git config commit.template $PATH_TO_YOUR_QT5_REPO/.commit-template
You can easily contact us on development@qt.io or #qt-labs Libre.Chat - 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, like fixithere ;)
- Become a Qt Add-on =)