Cross-platform software libraries and APIs
Qt Creator IDE and productivity tools
UI Design tool for UI composition
for Qt projects
Digital advertising for UI apps
Usage intelligence for embedded devices
GUI test automation
Code coverage analysis
Test results management and analysis
Software static code analysis
Software architecture verification
The latest version of Qt.
Make the most of Qt tools, with options for commercial licensing, subscriptions, or open-source.
Explore Qt features, the Framework essentials, modules, tools & add-ons.
The project offers PySide6 - the official Python bindings that enhance Python applications.
Qt empowers productivity across the entire product development lifecycle, from UI design and software development to quality assurance and deployment. Find the solution that best suits your needs.
Insight into the evolution and importance of user-centric trends and strategies.
Learn how to shorten development times, improve user experience, and deploy anywhere.
Tips on efficient development, software architecture, and boosting team happiness.
Get the latest resources, check out upcoming events, and see who’s innovating with Qt.
A wealth of Qt knowledge at your fingertips—discover your ideal learning resource or engage with the community.
Whether you're a beginner or a seasoned Qt pro, we have all the help and support you need to succeed.
April 16, 2014 by J-P Nurmi | Comments
The QtQuick Controls TableView offers a variety of ways to provide data. Supported data model types include the traditional QAbstractItemModel derivative models, QObjectList, JS arrays, and even plain numbers. This flexibility imposes an unfortunate limitation that TableView doesn't know how to sort arbitrary data models. TableView merely offers a visual enabler, a sort indicator, and the actual sorting is left to the application. In this blog post, we'll present an example of sorting and filtering a TableView.
The example is based on a QSortFilterProxyModel derivative model. The source model can be any QAbstractItemModel subclass, but the proxy model has been specifically tweaked to be used with QML data models such as ListModel and XmlListModel. The example uses an XmlListModel that loads images from Flickr.
TableView {
id: tableViewsortIndicatorVisible: true
model: SortFilterProxyModel {
id: proxyModel
source: sourceModel.count > 0 ? sourceModel : nullsortOrder: tableView.sortIndicatorOrder
sortCaseSensitivity: Qt.CaseInsensitive
sortRole: sourceModel.count > 0 ?
tableView.getColumn(tableView.sortIndicatorColumn).role : ""filterString: "*" + searchBox.text + "*"
filterSyntax: SortFilterProxyModel.Wildcard
filterCaseSensitivity: Qt.CaseInsensitive
}
}
The above code snippet presents the most relevant parts of the attached example. In order to enable sorting and filtering, it makes the sort indicator visible and sets up property bindings to the appropriate UI elements, and SortFilterProxyModel handles the rest.
Full source code for the example: tablesortfilter.zip.
Qt Weekly is a new blog post series that aims to give your daily Qt usage a boost. Stay tuned for next week's post!
Download the latest release here: www.qt.io/download.
Qt 6.6. is a feature release with focus on improving UX capabilities including responsive UI technology and the Qt Graph module.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Feb 21, 2024
Qt Design Studio 4.4 is here! Qt Design Studio is a tool to create user..
Jan 30, 2024
Qt 6.7 comes with some new and exciting APIs for window management in Qt..
Dec 29, 2023
Ho-ho-ho and happy holidays everyone! I noticed that I have done only a..
Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.