Загрузка страницы

A Combo Box Which Completes UTF-8 as ASCII

This episode shows a specialized combo box for solving this simple problem:

I had a combo box for choosing employees in KDAB. It even supported that I typed in part of their names to search. However, with a Danish keyboard, I had no way of typing the names of Lukáš or Miłosz.

So, I implemented a combo box where I could type Lukas or Milosz to search for these names (observe the names are in plain ascii).

Links:
* Bug report on inline editing: https://bugreports.qt.io/browse/QTBUG-101453
* Bug report on completion not working: https://bugreports.qt.io/browse/QTBUG-101454

0:00 The problem: How to type Lukáš Tinkl when all you have access to is ascii?
1:26 Version 1: Preparing the combo box: Editing, filter, no insert, matching
4:03 The Model underneath
5:20 Version 2: Adding completion roles
6:13: QString::normalized()
8:45 The problem leading to version 3
9:20 Version 3: fix: pressing enter and tab - a work around
11:05 Printing out events
13:53 Debugging into Qt to understand the bug
17:47 Version 4: override pathFromIndex()
19:26 Version 5: Adding a validator
24:14 Do remember to compile your own Qt version

All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI

About the host:
The video is presented by Jesper Pedersen, who started with Qt back when Qt was widgets only and the version was 1.44, which gives him 21 years of experience with Qt. Since 2000 he has taught almost 100 Qt classes, ranging from Qt Widgets to QML. Heck, Jesper even taught a few classes on QTopia Core — Trolltech's initial attempt at creating a phone stack. Today Jesper holds a fancy business title, but that doesn't prevent him from coding both in his job and in his spare time.

The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/AsciiComboBox

Every month our newsletter is featuring technical blogs on Qt, C++ and 3D topics: https://www.kdab.com/development-resources/sign-up-for-our-newsletter/

About KDAB:
KDAB offers experienced software experts to help you deliver functional, high-performing and innovative software across embedded, mobile and desktop platforms for projects using C++, Qt, QML/Qt Quick, OpenGL, Qt 3D and more. https://www.kdab.com/software-services

KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrollment courses around the world. We are the market leaders for training in Qt, OpenGL and C++.

Contact us to find out more at training@kdab.com or visit our website: https://www.kdab.com/software-services/scheduled-training/

We are about 90 people, located all around the world. Our Head Office is in Sweden and we have other offices in Germany, France, the UK and the USA. https://www.kdab.com/about/contact/

Видео A Combo Box Which Completes UTF-8 as ASCII канала KDAB
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
12 июля 2022 г. 13:00:09
00:25:09
Яндекс.Метрика