[画像:Better_Software_Header_Mobile] [画像:Better_Software_Header_Web]

Find what you need - explore our website and developer resources

KDAB contributions to Qt 5.0 (part 2)

Continuing the series on KDAB contributions to Qt 5.0, this time we cover some platform support and containers.

Containers improvements

The containers in Qt 5 recieved many improvements compared to their Qt 4 versions. Due to concerns of binary compatibility, such changes can only be undertaken for new major releases of Qt, but still there is a need to be conservative in what is changed.

The part KDAB played in improving the Qt containers was mainly in making small changes for consistency, adding C++11 dependent features, giving the compiler more hints for optimizations, and making it more difficult to accidentally misuse the containers. Several of the issues raised by Marc Mutz regarding the Qt containers were fixed by Marc as part of KDABs investment into Qt 5.

In particular, many types in Qt have been marked with the Q_DECLARE_TYPEINFO macro as PRIMITIVE, or MOVABLE as appropriate. All QFlags are now automatically marked as Q_PRIMITIVE_TYPE, using a partial template specialization. This makes the Qt containers like QList perform better when used with flag types 'for free' in Qt 5. Partial template specialization is a C++ language feature which enables some of the metatype features I mentioned yesterday.

Similarly, all Qt containers which take a single template argument (QList, QVector etc) have been marked as Q_MOVABLE_TYPE using a partial template specialization. QPair in particular received a somewhat more complex optimization which accounts for both types it contains and determines whether it should be treated as a PRIMITIVE, MOVABLE or COMPLEX type. This means it is more efficient to put containers into containers, though in terms of API that is often not advised. Many other types in Qt have been marked as PRIMITIVE or MOVABLE as appropriate where that was not the case before, so in general, this helps performance of Qt containers. Also for performance reasons, QVector is now used instead of QList where it is a more suitable container.

C++11 compatibility is also something KDAB has worked a lot on in Qt 5. All of the Qt containers have been extended with cbegin() and cend() API for compatibility with new C++ containers, and the QVarLengthArray class received a bugfix similar to a fix in the C++11 standard containers.

There are many more improvements to the Qt containers, such as C++11 move assignment and move constructors, but this blog series is focussing specifically on contributions from KDAB.

Qt 5 WinCE maintenance

Since gaining extensive experience with Qt on WinCE during the Kontact Touch development, KDAB has been helping others solve their problems related to Windows embedded platforms, such as WinCE, and Windows Embedded Compact 7.

Since the launch of Qt Project we have also been working to ensure that Qt 5.0 would be a quality release, and a quality foundation for the future, where embedded Windows is concerned. Since very early in Qt 5 development, we have been working on creating demos using Qt 5 and QtQuick 2 on WinCE, and solving the platform abstraction issues associated with that.

The patches required to keep the WinCE port up to date cover a wide range of areas. At the most fundamental level, the buildsystem of Qt has needed some updates to function properly for WindowsCE. Because it is common to strip down embedded systems to a bare minimum, certain features which are usually available in Qt such as printer support and clipboard support are not usually available from WindowsCE, and so have to be compiled out of Qt too. Another fundamental requirement of the WindowsCE work is ensuring that the dependencies of Qt, such as zlib, can be made to work properly on WindowsCE. More significantly, the v8 javascript engine needed to be ported to WindowsCE. That port was successful, which means that QML2 can work with WindowsCE, just as on any other platform.

At the platform level, Qt 5 also required some work for WindowsCE. A common problem when implementing Qt 5 on WindowsCE is that the WindowsCE operating system does not have all of the functionality usually expected from Windows when using the desktop APIs. Specific code is required for handling of temporary files, network sockets, starting, stopping and interacting with processes etc. This kind of low-level work allows Qt to provide the same familiar platform abstractions on WindowsCE as are provided on all other platforms.

On the gui level too, there are differences in how window management must be handled, such as decoration, painting, and moving windows as well as handling fullscreen mode. Pixmaps and fonts can required WindowsCE specific handling in Qt 5 too, with the result that all the benefits of distance fields used for font rendering reach WindowsCE too. A requirement for the distance fields feature in the font rendering is that a vector outline of glyphs must be available. WindowsCE does not provide that as an operating system feature, so the FreeType library is used directly on WindowsCE for that feature instead.

Part of the work was catching up with the Qt modularisation process. Some parts of the WindowsCE code needed to be split between the QtWidgets and QtGui module to make QtQuick2 applications work properly.

Mac platform support

KDAB took on responsibility for improving the Mac port of Qt 5 and particularly the native API integration.

By adding an abstraction to QPA for menus, it was possible to implement that abstraction on Mac using the native APIs for menus on that platform. Mac menus are natively separated from the windows on screen that they relate to, while this was also possible in Qt 4, the code no longer worked after porting to Qt 5/QPA.

Related to the native Mac menu implementation, KDAB also implemented the abstraction and Mac-implementation for the systemtray. Systemtray entries typically show menus, and can use native integration for the menus and icons. The QSystemTray implementation is now implemented in terms of the platform-abstraction.

For greater native integration, platform-specific drag API is also now used on Mac. This is another area where QPA and use of native APIs can really make a difference - typical Mac applications have well defined default actions during drag operations (eg copy versus move), different behavior depending on whether shift/ctrl modifiers are used, This also paves the way for more asyncronous drag handling in Qt-on-Mac applications.

On the Mac 10.7 (Lion) operating system, scrollbars are typically hidden and inside the scroll-area until the mouse moves into a position to use it. Here again, native MAC APIs can be easily used, thanks to QPA, to implement styling and behavior of the scrollbars in a consistent way.

Native APIs are now also being used in Qt 5 for opening documents and URLs, allowing integration with the users preferences

Tags:

qt

3 Comments

6 - Feb - 2013

Aleksander

Hello You said: "More significantly, the v8 javascript engine needed to be ported to WindowsCE. That port was successful, which means that QML2 can work with WindowsCE, just as on any other platform." We can I find changes which you are done to port v8 enginge? Thanks Aleksander

I have read and agree to the privacy policy.

KDAB is committed to ensuring that your privacy is protected.

  • Only the above data is collected about you when you fill out this form.
  • The data will be stored securely.
  • If you wish for us to erase it, email us at info@kdab.com.

For more information about our Privacy Policy, please read our privacy policy.

6 - Feb - 2013

Aleksander

Sorry Where can I find changes which you are done to port v8 enginge?

I have read and agree to the privacy policy.

KDAB is committed to ensuring that your privacy is protected.

  • Only the above data is collected about you when you fill out this form.
  • The data will be stored securely.
  • If you wish for us to erase it, email us at info@kdab.com.

For more information about our Privacy Policy, please read our privacy policy.

13 - Feb - 2013

steveire

Hi Aleksander,

I double checked with my colleague, and actually the relevant patches were not in Qt 5.0. Sorry about that. The patches are still pending here: https://codereview.qt-project.org/#dashboard,1000681

Thanks,

Steve.

I have read and agree to the privacy policy.

KDAB is committed to ensuring that your privacy is protected.

  • Only the above data is collected about you when you fill out this form.
  • The data will be stored securely.
  • If you wish for us to erase it, email us at info@kdab.com.

For more information about our Privacy Policy, please read our privacy policy.

I have read and agree to the privacy policy.

KDAB is committed to ensuring that your privacy is protected.

  • Only the above data is collected about you when you fill out this form.
  • The data will be stored securely.
  • If you wish for us to erase it, email us at info@kdab.com.

For more information about our Privacy Policy, please read our privacy policy.

Trusted Software Excellence

Expertise

Trusted Software Excellence across Desktop and Embedded

Take a glance at the areas of expertise where KDAB excels ranging from swift troubleshooting, ongoing consulting and training to multi-year, large-scale software development projects.

Find out why customers from innovative industries rely on our extensive expertise, including Medical, Biotech, Science, Renewable Energy, Transportation, Mobility, Aviation, Automation, Electronics, Agriculture and Defense.

Embedded Devices Embedded Devices

High-quality Embedded Engineering across the Stack

To successfully develop an embedded device that meets your expectations regarding quality, budget and time to market, all parts of the project need to fit perfectly together.

Learn more about KDAB's expertise in embedded software development.

Read More

Cross-platform Desktop Cross-platform Desktop

Create complex Applications for the Desktop

Where the capabilities of modern mobile devices or web browsers fall short, KDAB engineers help you expertly architect and build high-functioning desktop and workstation applications.

Read More

Modernizing Legacy Software Modernizing Legacy Software

Reduce Technical Debt

Legacy software is a growing but often ignored problem across all industries. KDAB helps you elevate your aging code base to meet the dynamic needs of the future.

Whether you want to migrate from an old to a modern GUI toolkit, update to a more recent version, or modernize your code base, you can rely on over 25 years of modernization experience.

Read More

Medical Medical

Extensible, Safety-compliant Software for the Medical Sector

Create intelligent, patient-focused medical software and devices and stay ahead with technology that adapts to your needs.

KDAB offers you expertise in developing a broad spectrum of clinical and home-healthcare devices, including but not limited to, internal imaging systems, robotic surgery devices, ventilators and non-invasive monitoring systems.

Read More

Industrial Industrial

Build on Advanced Expertise when creating Modern UIs

KDAB assists you in the creation of user-friendly interfaces designed specifically for industrial process control, manufacturing, and fabrication.

Our specialties encompass the custom design and development of HMIs, enabling product accessibility from embedded systems, remote desktops, and mobile devices on the move.

Read More

Vehicle Dashboards Vehicle Dashboards

Fluid animations and gesture-controlled UIs

Building digital dashboards and cockpits with fluid animations and gesture-controlled touchscreens is a big challenge.

In over two decades of developing intricate UI solutions for cars, trucks, tractors, scooters, ships, airplanes and more, the KDAB team has gained market leading expertise in this realm.

Read More

Security and Defense Systems

Reliable software for the public security and defense sector

KDAB is a trusted software partner for authorities and suppliers requiring ever more robust and reliable software in the public security and defense sector.

Read More

Services

Software Consulting, Development and Training

KDAB offers a wide range of services to address your software needs including consulting, development, workshops and training tailored to your requirements.

Our expertise spans cross-platform desktop, embedded and 3D application development, using the proven technologies for the job.

Software Consulting Software Consulting

Guidance for your Software Project across the Stack

Get expert advice on any phase of your project's journey, from inception to execution, across multiple platforms and hardware.

KDAB provides guidance on architectural approach, UI strategy, development tooling, test infrastructure, deployment model, runtime execution and more.

Read More

Qt Services Qt Services

Expert Qt Solutions for Your Needs

When working with KDAB, the first-ever Qt consultancy, you benefit from a deep understanding of Qt internals, that allows us to provide effective solutions, irrespective of the depth or scale of your Qt project.

Qt Services include developing applications, building runtimes, mixing native and web technologies, solving performance issues, and porting problems.

Read More

Embedded Development Embedded Development

Build rich embedded applications for your embedded UI

Turn your vision into reality and unleash the potential of your embedded development projects.

KDAB helps you navigate the complex landscape of embedded development, ensuring your software performs optimally on your chosen hardware.

Read More

Cross-platform Development Cross-platform Development

Get help with all Aspects of Desktop Applications

KDAB helps create commercial, scientific or industrial desktop applications from scratch, or update its code or framework to benefit from modern features.

Discover clean, efficient solutions that precisely meet your requirements.

Read More

3D Software 3D Software

Simplify the complexity of 3D

Creating 3D applications can be overwhelming due to terminology, visual concepts, and advanced math.

KDAB simplifies this task, providing you with the best solution for your 3D project, easing complexities and maximizing efficiency.

Read More

Developer Training Developer Training

Professional Developer Training Courses

Boost your team's programming skills with in-depth, constantly updated, hands-on training courses delivered by active software engineers who love to teach and share their knowledge.

Our courses cover Modern C++, Qt/QML, Rust, 3D programming, Debugging, Profiling and more.

Read More

Technologies

Make the right Technology Choices

The collective expertise of KDAB's engineering team is at your disposal to help you choose the software stack for your project or master domain-specific challenges.

Our particular focus is on software technologies you use for cross-platform applications or for embedded devices.

Qt / QML Qt / QML

Leading Qt Expertise

Since 1999, KDAB has been the largest independent Qt consultancy worldwide and today is a Qt Platinum partner. Our experts can help you with any aspect of software development with Qt and QML.

Read More

Modern C++ Modern C++

Deep understanding of Modern C++

KDAB specializes in Modern C++ development, with a focus on desktop applications, GUI, embedded software, and operating systems.

Our experts are industry-recognized contributors and trainers, leveraging C++'s power and relevance across these domains to deliver high-quality software solutions.

Read More

Rust Rust

Integrate Rust into your application

KDAB can guide you incorporating Rust into your project, from as overlapping element to your existing C++ codebase to a complete replacement of your legacy code.

Read More

Platforms Platforms

Unique Expertise for Desktop and Embedded Platforms

Whether you are using Linux, Windows, MacOS, Android, iOS or real-time OS, KDAB helps you create performance optimized applications on your preferred platform.

Read More

Slint Slint

A lightweight GUI toolkit

If you are planning to create projects with Slint, a lightweight alternative to standard GUI frameworks especially on low-end hardware, you can rely on the expertise of KDAB being one of the earliest adopters and official service partner of Slint.

Read More

Flutter Flutter

Flutter for Embedded and Desktop

KDAB has deep expertise in embedded systems, which coupled with Flutter proficiency, allows us to provide comprehensive support throughout the software development lifecycle.

Our engineers are constantly contributing to the Flutter ecosystem, for example by developing flutter-pi, one of the most used embedders.

Read More

3D / OpenGL / Vulkan 3D / OpenGL / Vulkan

Cutting-edge 3D / XR

Incorporating 3D into 2D UIs or creating compelling XR experiences can be challenging.

Create visually stunning, ultra-realistic 3D graphics, dynamic 2D user interfaces, or leveraging the power of hardware-accelerated computation.

The 3D experts at KDAB bring incisive know-how for your project.

Read More

Developer Tools Developer Tools

Developer Tools from KDAB

The right tools and libraries can skyrocket developers' productivity.

Take advantage of KDAB's popular open source tools for tasks including profiling, debugging and continuous integration (CI).

Read More

KDAB Labs KDAB Labs

Research & Development at KDAB

KDAB invests significant time in exploring new software technologies to maintain its position as software authority. Benefit from this research and incorporate it eventually into your own project.

Read More

Resources

Start here to browse information on the KDAB website(s) and take advantage of useful developer resources like blogs, publications and videos about Qt, C++, Rust, 3D technologies like OpenGL and Vulkan, the KDAB developer tools and more.

Blogs Blogs

KDAB engineers and designers constantly share cutting-edge technology insights with regard to Qt, QML, C++, Rust, Linux, Vulkan, OpenGL, Qt 3D, scalable UIs and more topics.

Stay up-to-date and be inspired with their blogs.

Read More

Events Events

Get a quick overview of events relevant to the software industry and with involvement of KDAB, be it as speakers, sponsors, exhibitors or organizer.

Take the opportunity to reach out to our experts directly. See you there!

Read More

Publications Publications

KDAB regularly publishes in-depth papers, brochures and other material on topics relevant to software developers and desicion makers.

Have a look at the list of KDAB publictions.

Read More

Videos Videos

The KDAB Youtube channel has become a go-to source for developers looking for high-quality tutorial and information material around software development with Qt/QML, C++, Rust and other technologies.

Click to navigate the all KDAB videos directly on this website.

Read More

Why KDAB

A software supplier you can rely on

In over 25 years KDAB has served hundreds of customers from various industries, many of them having become long-term customers who value our unique expertise and dedication.

Learn more about KDAB as a company, understand why we are considered a trusted partner by many and explore project examples in which we have proven to be the right supplier.

About KDAB About KDAB

Committed, compassionate, trustworthy

The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications.

Read more about the history, the values, the team and the founder of the company.

Read More

Proven Excellence Proven Excellence

Customer Success Stories

When working with KDAB you can expect quality software and the desired business outcomes thanks to decades of experience gathered in hundreds of projects of different sizes in various industries.

Have a look at selected examples where KDAB has helped customers to succeed with their projects.

Read More

Trusted Partner Trusted Partner

Benefit from a strong partner network

Lasting relationships reduce frictions in software development projects and help to guarantee success.

Benefit from the established relationships KDAB has with well-selected hardware suppliers and specialized domain experts.

Read More

Better Software Better Software

Constantly improving Software Quality

KDAB is committed to developing high-quality and high-performance software, and helping other developers deliver to the same high standards.

We create software with pride to improve your engineering and your business, making your products more resilient and maintainable with better performance.

Read More

ISO 9001 ISO 9001

ISO 9001 certified software services

KDAB has been the first certified Qt consulting and software development company in the world, and continues to deliver quality processes that meet or exceed the highest expectations.

Read More

Working at KDAB Working at KDAB

Looking for a new challenge?

In KDAB we value practical software development experience and skills higher than academic degrees. We strive to ensure equal treatment of all our employees regardless of age, ethnicity, gender, sexual orientation, nationality.

Interested? Read more about working at KDAB and how to apply for a job in software engineering or business administration.

Read More

Contact

Search

CODEBROWSER

KDAB|Training

AltStyle によって変換されたページ (->オリジナル) /