Developing a Unified Mobile and Desktop App with Qt | #QtWS22

The distinction between mobile and desktop applications is becoming increasingly blurred. Convertible touchscreen PCs and iPads with paired keyboards and trackpads are now commonplace, and it's easy to plug a phone into a large screen and connect a bluetooth keyboard and mouse. User's expectations are changing, and people are trying to achieve more tasks on a variety of platforms that would typically require a desktop, and to use traditional desktop platforms in field environments. Memory-Map has developed an app using Qt 6.2 and QML that works across iOS/Android/PC/Mac and Linux, across all screen sizes from handheld to cinematic, and across different input devices such as touchscreen, mouse, trackpad and pen/pencil/stylus. Qt is the ideal cross-platform environment to support this goal. This talk will cover practical techniques to leverage each environment. While Qt targets all the different operating systems, and we developed an application framework that scales to different screen sizes, we found that responding appropriately to different input devices was the most difficult challenge. One example is a list view, where the user can scroll, select multiple items and use a context menu. When the user has a keyboard and mouse we can use right-click, shift-click, ctrl-click just like Windows Explorer or Mac Finder. With a touchscreen, the items in the list have additional padding to make them easier to select with a finger, and we use a long-press and a special multi-select mode to achieve the same functionality. With a stylus/pen/pencil, the user has more precise pointing ability, so we use the more compact presentation, but they typically do not have a keyboard, and the Apple pencil has no side button for a right click. So, the stylus interface uses parts of the mouse and touchscreen UI. This talk will finish by looking at the big picture. Currently, Fortune 500 companies have to issue thousands of employees each a phone, tablet and a laptop, because different apps work best on different platforms. For example, to use Excel you need a keyboard and mouse to use the context menus, or select a range of cells, while the iPad works great as a presentation tool. If all these apps were truly scaled, the companies would not need to provide multiple devices, saving a huge amount of money and saving the world a mountain of electronic waste. At the same time, many people in developing countries only have access to one device. We can provide a full desktop UI on an Android phone with an attached screen and keyboard. That is the motivation for developing a truly cross-platform app. Learn more about Qt: