Ableton in the Qt community

In addition to talking about the Push with Ableton, we had a chance to talk about joining the Qt Project as a contributor.

Ableton started contributing to Qt last year, what was the thing that got you started?

Working closely with the Qt Project is part of the Ableton Open Source strategy. It is just a natural step! Our products are invested in the Qt technology and it is unlikely that we will switch GUI frameworks in the coming years. Sometimes we hit the limits of Qt and we file specific bugs whenever we can, so becoming more involved with larger initiatives will help us ensure that Qt addresses our needs in the future.

We have already been working on contributing patches we made to Qt during our development process, some of which will be released as part of Qt 5.6 and 5.7, depending on when they reached the Qt repositories. The contributions to date have been related to QML plugins and use of QAbstractItemModel from QML. We expect to be able to make more significant contributions soon.

What would be an easy way to start contributing to Qt?

Filing bug reports is an easy way to contribute to Qt. Responses to bugs don’t always result in fixes in Qt, but sometimes result in good ways to redesign, using QML in a more-idiomatic way to avoid the bug. Adding minimal representative test cases with bug reports helps with getting quality responses from Qt developers.

Code contributions to Qt are a little bit more complicated, but the process of using gerrit is well-documented. We already use Git at Ableton, so from a tooling point of view, we didn’t have much more to learn after signing the Contribution Agreement.

Attending the Qt World Summit and previously the Qt Developer Days was a useful way to get in contact with Qt engineers to review some of those contributions.

Any tips for other companies that are thinking of having a stronger presence in the Qt community?

Start, then iterate. Filing quality bug reports is an easy and cheap way to begin exploring the community and to start to identify the people working on various areas of Qt. Reading the development mailing list and some commits in the Git repos also creates a broader picture of how Qt is made.

From there it’s just a case of turning from an accessor into a mutator. Getting to grips with Git and the contribution process is a hurdle, but it comes with the reward of not having to carry fixes or feature extensions in external patches.

Beyond that, a company needs to examine the benefits, come up with a strategy and think about how that presence fits into the structure of the organization.

What do you see as the benefits to Ableton in being present in the Qt community?

A recent blog post by Andy Wingo relates this to Conway’s Law, namely “To minimize your costs, you must somehow join the community of people that make your dependency”.

Contributing helps us to make more coherent software by ensuring that Qt has the interfaces we require and also by ensuring that we use the interfaces correctly and stay up to date with development and new releases. It is important to us that Qt is not a read-only black box.

Have you been active on the forums and mailing lists? Do you use them as information sources?

The forums and mailing lists are often good places to find information and best practices relating to Qt, but our engineers are not currently active in them. Often we find it is easier to walk to a knowledgeable colleague to ask a question instead of posting to the forums.

We expect to become more active on the development mailing list to discuss design issues relating to features we contribute.

How do you see the community being able to work together with you?

We are hoping for feedback on the design and implementation of code we submit to Qt in order to learn more from the experts. Unfortunately, a lot of the code which goes into Ableton products is not Open Source so we can’t get direct feedback on all of it, but it would also be great to get some feedback on the libraries we have already published for the community on Github.

One of those libraries, Aqt-Stylesheets was presented at Qt Developer Days 2014 and awarded the ‘Most valuable lightning talk‘.

The Aqt-Cassowary library is generally useful for particularly dynamic layouts and we think it fits well into the QML design model.

How do you balance work on the product and work on Qt?

We’re still trying to figure that out.

Our priority is to create the best quality products we can. There are already some cross-sectional teams in Ableton which work on internal libraries, and an extension of that structure might work for our Qt contributions. To date our contributions have been individual stories in our planning as needs arise. Adding the right balance of structure to that is something we would like to hear other opinions about in the comments!

Again, thank you very much for the discussion, it has been a pleasure to learn how Ableton is present in the Qt community and about the Ableton products.

Thanks again for taking the time to feature us on the Qt blog. We look forward to review feedback from the Qt contributor community, engaging in design discussions about use of Qt/QML in products like Push and our open-source offerings!

The post Ableton in the Qt community appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Yr3dcA

Introducing Long Term Support

With Qt 5.6 we are introducing the first Long Term Supported (LTS) release of the Qt 5 series. There will be several Qt 5.6.x patch level releases created during the next three years – also after the next Qt 5.x releases become available. Commercial licensees eligible for technical support will also be able to submit support requests longer for the LTS release.

Current LTS release has been Qt 4.8, and with its support ending at the end of 2015, it is time to introduce the next LTS release. Qt 5.0.0 was released three years ago and we have done a huge amount of improvements since then, as well as provided many good and widely used releases. Thanks to recent improvements in our releasing infrastructure we now have a sustainable way of developing parallel Qt releases with different sets of supported platforms and compilers.

As our LTS promise, we guarantee that Qt 5.6 will be supported for three years via standard support, after which additional extended support can be purchased. During this time period, even though following Qt releases (5.7 onwards) are already out, Qt 5.6 will receive patch releases providing bug fixes and security updates. Typically we have provided just one or two patch level releases for each Qt 5.x release, and this is planned to continue also in the future for the non-LTS releases. For Qt 5.6 LTS release the amount of patch releases will be higher, as we aim to provide these throughout the three year period.

With Qt 5.6 we will also roll out a change to the commercial support terms and conditions to recognize LTS versions of Qt, with the three year standard support period. At the same time we are reducing the standard support on non-LTS releases of Qt to be one year. There will be an option to purchase extended support for both LTS and non-LTS releases. The changed support terms do not affect already released Qt 5.x releases, these are supported two years from the release of next Qt version, as defined in the current support terms.

In addition to security fixes, error corrections and improvements provided by the LTS patch releases, we may also add support for new operating system and compiler versions to an LTS release of Qt, when possible. It should be noted that the deprecated modules and technology preview modules are not subject to the LTS.

We had a strong focus on improving quality and providing feature parity with Qt 5.5, for example in multimedia and connectivity areas, and have continued to improve further in Qt 5.6. Our aim is to provide a solid baseline with support for C++98 and C++11 compilers, just like before. The next release, Qt 5.7, will drop support for older compilers allowing us to leverage C++11 functionality in the Qt modules themselves. So for those wishing to use compilers such as VS2008, VS2010, and gcc 4.6, Qt 5.6 continues to be an excellent choice in the years to come.

The Qt 5.6 Beta release is now available, check it out if you have not yet done so. We are working hard to further fix and polish it with the target of having the Qt 5.6.0 final out in Q1/2016.

The post Introducing Long Term Support appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1T5A5RA

Qt 5.6 Beta Released

It is my pleasure to announce that we have released Qt 5.6 Beta today, with binary installers available for convenient installation. Qt 5.6 will be a long-term supported release as we announced at the Qt World Summit in the beginning of October. This means Qt 5.6 support for 3 years along with additional patch-level releases. Let’s take a look at some of the highlights of the forthcoming release!

Long-Term Support

Qt 5.0.0 was released 3 years ago and we have done a huge amount of improvements since then. Therefore, we believe that it is time to create a Long-Term Supported (LTS) release with Qt 5.6. Our previous LTS release was Qt 4.8, which is running out of support in December. Most of you have already upgraded to Qt 5, but if you still have active projects in Qt 4 we encourage to migrate now.

Qt 5.6 will be supported for 3 years, after which additional extended support can be purchased. During this time period, even though following Qt releases (5.7 onwards) are already out, Qt 5.6 will receive parallel patch releases bringing bug fixes and security updates. We will also aim to provide support for new operating system and compiler versions when possible, however this can not be fully guaranteed even for an LTS release. Furthermore, it should be noted that the deprecated modules and technology preview modules are not subject to the LTS.

If you wish to know more about LTS, please check a blog post describing how it works.

New CI system – More Power to Qt Releasing

To build a foundation for the LTS Qt 5 release, we have been developing our continuous integration and releasing infrastructure. After all, as Qt is released and thoroughly tested on a multitude of different platforms and configurations, there is quite an infrastructure behind making all this possible. A new CI system, called Coin for COntinuos INtegration, has been developed and taken into use with Qt 5.6.

With the new CI system we are also using the binaries produced during the CI run in the Qt release packages. This prevents us from having to make new builds for packaging, saving time on integrating changes and creating new packages. In addition to time, the new approach saves a significant amount of CPU cycles in our cluster. Qt 5.6 Beta is the first release with CI produced binaries, so we ask that you please report all issues you encounter. This will help us fine-tune the system for RC and final.

High-DPI Support

One of the biggest new features coming with Qt 5.6 is a fully rewritten cross-platform High-DPI support. It allows applications written for standard resolution displays to be automatically scaled when shown on high-pixel-density displays. Using the new High-DPI support, Qt automatically adjusts font sizes, window elements, icons and graphics in general in a Qt application based on the pixel density. High-DPI support allows applications to adjust automatically even when the user moves a window from one display to another with a different pixel density.

Windows 10 Fully Supported + VS2015 binaries!

We have supported Windows 10 to a large extent already with Qt 5.5 and will now provide full support to both the win32 and WinRT APIs of Windows 10. Qt applications run on Windows 10 desktop PC’s, tablets and phones – and can be distributed via the Windows Store. For native Windows win32 applications moving to Windows 10 and the new WinRT API means a major rewrite, but with Qt is is a matter of simply compiling your application for WinRT.

In addition to Windows 10 support, Qt 5.6 also provided pre-built binaries for the Visual Studio 2015 compiler. Unfortunately, VS Add-In no longer works with VS2015, but we’ll update the VS Add-In for users of earlier Visual Studio versions with the release of Qt 5.6.0.

Other New Features

In addition to things mentioned here, Qt 5.6 adds many other new features and improvements. Please check the wiki for the most important new things in Qt 5.6.

Webkit and Qt Quick 1 Removed

We have removed WebKit and Qt Quick 1 from Qt 5.6 release content. The source code is still available in the repositories, but these are not packaged with Qt 5.6 any more. Qt Script remains deprecated, but is included in Qt 5.6 release.

Qt 5.6 Timeline

With the Beta release now out, we hope to get a lot of feedback from you and will polish Qt 5.6 further towards the Release Candidate and 5.6.0 final in the coming months. We are targeting to release the Qt 5.6.0 LTS final in Q1/2016.

Get Qt 5.6 Beta

Qt 5.6 Beta is now available for download in the Qt Account web portal (register here) or from download.qt.io.

Known issues of Qt 5.6 Beta are listed in the wiki. As always, please provide feedback via the Qt Project mailing lists, IRC, and when appropriate, create bug report at bugreports.qt.io.

 

 

 

The post Qt 5.6 Beta Released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1PcGH1f

Qt Champions for 2015

As the year is coming to an end soon, it is time to announce the 2015 Qt Champions!

Qt_Champion_200

Qt Champions are the people who go the extra mile for Qt. They do amazing things and surprise you with their dedication to Qt.

As last year, we have four Qt Champions for 2015. The number is not fixed, but these four nominees have made a big difference in the Qt community in 2015.

Without further ado, the Qt Champions for 2015 are:

  • Jürgen Bocklage-Ryannel and Johan Thelin for their work on the Qt5 Cadaques book. The Qt5 book covers all the aspects of development with Qt5 with an emphasis on QML. The book is freely available under a Creative Commons license for anyone contribute to and download and it has been translated to several different languages. Jürgen and Johan together with other community members helping out have created an excellent resource for developers who are starting their journey to Qt.
  • Iori Ayane for his many books on Qt and active participation in multiple areas of the Qt community. Iori-san has written multiple books on Qt in Japanese. He is also very active in the Japanese Qt scene, and during the last year he has also started contributing patches to Qt! All this makes for an impressive contribution to the Qt community.
  • And last, but not least, Samuel Gaist, who has continued his incredible activity on the Qt forums. He has also stepped up his activity on the bugtracker and code contribution side of the Qt project. Altogether his continued participation level is so impressive, that he is being nominated a lifetime title of Qt Champion.

Every new Qt Champion will receive a one year full Qt commercial license in addition to special Qt Champion items and invites to major Qt events during 2016.

Congratulations to all the new (and old) Qt Champions!
We’ll be telling you more about the Qt Champions and what they have done in the Qt community in January.

The post Qt Champions for 2015 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1QrdhOo

Qt Creator 3.6.0 released

We are happy to announce the release of Qt Creator 3.6.0.

This release includes a big contribution: An editor for UML-style diagrams. It is in experimental state and needs to be turned on through Help > About Plugins > ModelEditor. Since it features too many diagram types and element styles to even scratch on in this blog post, I’ll not even try and just refer you to the documentation. Many thanks to Jochen Becher!

Clang Fix-it integrationThe Clang based C/C++ code model received many improvements. The Clang Fix-its are now integrated into Qt Creator’s refactoring actions. We turned on more warnings, and show the warning or error and the context in which it occurs in different styles. You can configure which warnings are shown in the C++ > Code Model options.

Qt Quick Designer now has an action for switching between a .ui.qml file and the usage in the corresponding .qml file, similar to the Switch Source/Form action in Qt Designer for widgets. We also made the previously commercial-only connection editor and path editor available to all users.

QMake projects got a build configuration type for profiling (release with separate debug symbols). CMake projects got build configuration types for Debug, Release, ReleaseWithDebugInfo and MinSizeRelease. On OS X you can now choose if Qt Creator should consider the file system as case-sensitive or case-insensitive (Preferences > Environment > System). There have been many more improvements and fixes. Please refer to our change log for a more detailed overview.

You find the opensource version on the Qt download page, and commercially licensed packages on the Qt Account Portal. If you are evaluating Qt you can go straight to http://ift.tt/XbP7NM. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on irc.freenode.net, and on the Qt Creator mailing list.

Note: Starting with Qt Creator 3.6 we no longer provide prebuilt binaries for Linux 32-bit. Building Qt Creator on that platform is still supported though.

The post Qt Creator 3.6.0 released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1YheGGh

Ableton Push – Qt in music making

Berlin-based music company Ableton recently released the new Push, a digital instrument to create and perform music. It is a really impressive tool, take a look:

As the Push UI is built with Qt, we had a chance to ask Stephen Kelly, Benjamin Jefferys and Nikolai Wuttke – developers at Ableton – about how it was built and how it works.

Ableton has been around for a long time, where did it all start?

It all started in an apartment in Berlin back in 1999. The three founders – Gerhard Behles, Bernd Roggendorf and Robert Henke – wanted to create an alternative to the linear workflow of established DAWs (Digital Audio Workstations). In 2001 Ableton released Live 1 and moved into the workspace that we still occupy today – just a few streets from the apartment where the first lines of code were written. We have since released nine major versions of Live, and in 2013 we announced our first hardware instrument: Push, which was designed by Ableton but manufactured by Akai. This was well received by the community, but we wanted to evolve the concept so we completely redesigned Push and took hardware engineering in-house. We released the new Push at the beginning of November, together with Live 9.5 and Link.

You mentioned Live and Push, can you give a short overview of the different products you have, and how Qt fits in there?

We make three products: Live, Push and Link. Live is software for creating musical ideas, turning them into finished songs, and also taking them onto the stage. Push is a hardware instrument that puts everything you need to make music with Live at your fingertips. We’ve also recently developed Link – a technology that keeps devices in time over a wireless network. It is embedded within Live but it is also inside an increasing number of iOS music-making apps. The new Push is our first released product using Qt technology – for its animated display.

Can you give a general overview of the architecture used in Live/Push?

The updated Push hardware is designed to enable new workflows for music makers. Part of the intention of the hardware product is to allow a music maker to stay in the creative flow, without needing to turn to a different interface on a computer. The hardware needs to be able to show the user everything they need to see, in order to make music, from detailed waveforms to browsing for samples.

The interaction between the Push hardware and Live is a little complicated, so let’s start with a diagram:

Push Architecture DiagramPush communicates with the computer via two protocols over a USB interface, one of which is standard MIDI. This is a bidirectional protocol. Live uses it to control the pad colors and button lights on the hardware. When the user presses a button or a pad, a signal is sent over the MIDI channel back to Live. The other protocol communicating over USB allows sending image data to the hardware display. This means Push doesn’t need a processor running a more complex operating system and application to show GUI elements on the screen. The processor on the Push hardware is optimized solely for handling user input from the pads and buttons. So although Qt is used as the display technology on Push, it is not actually running on the device. When Live and Push are used together, Live starts another process which is responsible for rendering all of the content shown on the Push screen.

This architecture forces a strong implementation of the Model-View-ViewModel pattern. MVVM emphasises division of the lowest level of the data representation, the Model, from the representation which is intended to appear in a View, that is ‘the model of the view’, aka the ViewModel. Using QObjects with signalling functionality for the ViewModel, and using the same system for the View in QML, gives a high level of compatibility between the components of the design.

The Data Model – the values of parameters, and the content of a song – of what is shown on Push is defined in the Live 9.5 process and then shared via an IPC channel with the Push display process using a JSON protocol. The Push display process creates a ViewModel – QObjects with properties representing what should be shown on screen – making it available in the context of a QML engine, which
then defines the View for the Push screen. The rendered pixels are transformed to the pixel format expected by the hardware and then transferred over USB to Push.

On Push

What were the biggest benefits of using Qt for Push?

We evaluated several GUI technologies when starting work on Push, such as HTML and JUCE. Qt stands out mainly for the QML language, the QtQuick technology, the Scene Graph API and easy integration with OpenGL.

The obvious advantages of the QML language for rapid prototyping have really stood out for us, as well as the ability to extend it with plugins written in C++. Qt contains a broad range of ready-to-use APIs which we wouldn’t have access to if we had written the UI in HTML, for example. We try to make sure we make full use of all Qt/QML functionality that is appropriate for us, and keep an eye on new releases to see what becomes available.

How did the team take the new tools? How was the learning curve?

Initially a small task force investigated the GUI technologies available and when Qt was selected for Push, that task force began sharing their knowledge with the rest of the team. From that point, we have heavily relied on the invaluable Qt documentation.

The Qt blog is also an important resource, because articles there often display a more philosophical approach to how to write QML. While the Qt Forum or Stack Overflow can be a useful resource for QML beginners on how to get specific things done with available APIs, they often don’t provide principles and details about the mindset required to write and design declaratively with QML.

Writing QML code as a beginner is relatively easy. Trying things is cheap and easy and it results in very fast feedback because of the interpreted nature of the language. However, figuring things out as we go does not always lead to the best design. So a more interesting topic is ‘how difficult is it to do QML right as a beginner?’.

There are certain traps that we found, such as over-use of procedural code like onFooChanged to try to enforce a particular order of operations. It is better to encapsulate tolerance of indeterminate order of operations in a declarative interface, but learning the details of exactly how to do that and how to recognise the traps before we fall into them (or create new ones) is something that comes only with experience in the real world!

Developers new to QML need to learn a different approach to programming which is declarative instead of imperative, and where things can change ‘spontaneously’ or in an unexpected order. As we grow the team working on Push here at Ableton, new developers might leave QML to others because of caution about ‘doing it right’, or worrying that ‘there must be a better way’.

We are extending our best practices on how to write QML code and how to interface it with non-Qt code as time goes on, so we have accumulated some good guidelines now.

Were there technical challenges in getting the remote screen to work properly?

The technical separation of the user interface from the screen requires that we implement an unusually rigorous MVC pattern. The screen is really just a View and it doesn’t have any way to offer user interaction. There is no way to take convenient shortcuts on the hardware directly in response to a user interaction.

That separation means there are no GUI events handled in QML at all such as mouse, keyboard, push of a button or press of a pad. The View for Push is simply a declarative response to ViewModel updates received from Live, so changes are represented as ‘this is now the selected track’ rather than ‘this track was just clicked’.

However, user interaction hints do sometimes need to be part of the communication with the display process. For example, a single long list of items is broken up into a multi-column list. Changes of the ‘currently highlighted item’ are animated vertically through the adjacent column when the user scrolls.

The user can also use directional buttons on the hardware to change selection horizontally, and that calls for horizontal animation. So, it is not enough to update the ViewModel with the information that the selected item is now ‘My Heart Will Go On’. The information about whether that is the result of horizontal or vertical movement must also be conveyed in the protocol.

How about timing? Music making is real time, how does it all fit together?

The parts of Live that concern playback of music run in a separate thread to the UI, so that operations that can stall the Live UI, such as loading a large drum rack, do not stall the sound playback.

The process separation for the Push display process is an extension of this isolation from expensive operations in Live, in a sense. If Live is stalled in an expensive operation, the Push display process remains responsive. It is not possible to have multiple independent GUI threads with Qt, so the multi-process solution is the next best thing. We did, in an early iteration, attempt to combine the event loop used in Live with the Qt event loop. Qt APIs made the integration possible, but it seemed impossible to achieve our 60 fps target for the Push GUI while the Live GUI shared the same 16 ms time slices.

In fact, there is another level of separation in the architecture for real-time GUI updates. The IPC mechanism described previously is used only for updates to the song definition and user interface events. Real-time information such as the playhead progress uses a separate channel between the Live engine thread and the Push display process, so it even bypasses the Live GUI thread entirely. This
channel contains much lower traffic and so the display on Push for the playhead more accurately reflects real-time information.

Did you find any other benefits of QML when creating the Push interface?

One of the impressive things about QML is how animations work and how easy they are to use. There is something slightly magical about them. They’re so smooth and easy to add that we are not afraid of adding them – our designers sometimes have to restrain us!

Because our QML doesn’t deal with user input events, the View is often heavier than it needs to be. Reusable generic widgets, such as Button, usually implement some form of mouse and keyboard handling which we don’t need. Using primitives such as Rectangles may be an option to avoid the weight of Button features that are not used, but there are extra features in Button which we do use, such as text that fades out towards the edge and consistent styling. Additionally, we want to reuse code as far as possible. These concerns make it worthwhile to use the Button instead of a simpler alternative.

Any future plans on Push that you can share?

We are always looking for opportunities to develop our products, but I’m afraid we can’t give information about future plans. As any product developer knows: things can change!

Thank you for sharing your experiences with Qt and QML on the Push. It really is an amazing piece of music hardware.

Thank you! We are very proud of Push and what it enables musicians to create. Thank you too, for taking the time to conduct this interview.

The post Ableton Push – Qt in music making appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1YheHKn

How to accelerate your embedded development

Over the last couple of years, I have been working on helping embedded device creators accelerate their embedded device development strategy. I’ve seen the challenges product managers face and we’ve worked together to find solutions that have enabled them to reduce their overhead, future-proof their platform and their strategy.

We see that unlike smartphones, which sells in millions, most embedded products such as ECG machines, PoS machines, Laboratory and Test equipment, Ticket vending machines, etc. have low sales volume. Furthermore, the product life of embedded devices ranges to 7+ years in contrast to the 15-18 months life for smartphones. Due to this limited sales volume and long product life, custom or chip-based development of embedded devices adds significant overheads in terms of supply chain inefficiencies, platform obsolescence, non-optimal cost structure, and barriers to adopt latest technologies. Read more on this, here.

Our team at Toradex, see opportunities of how you can leverage the synergies between such a platform as Toradex and a development framework like Qt to accelerate your product development.

A key starting aspect of this is to choose a compact platform that offers application-agnostic hardware and software. Irrespective of whether you are building a ECG machine or a home-automation device, the application-agnostic part remains same. I believe that OEMs and system designers should focus more on enhancing end-user experience and product differentiation, rather than spending effort on essential design commodities. By using an off-the-shelf platform like our System on Module (SOM), a.k.a. Computer on Module (COM), you can easily reduce your time-to-market by 8-10 months along with reduction in development cost and risk.

toradex soctoradex_carrier_board

Addressing supply chain inefficiencies

Component obsolescence leads to platform redesign and in turn, adds cost and resource effort. Finding a platform vendor that engages in large volume business with the leading SoC and memory vendors in the market will quickly reduce your costs, as the former gets better pricing deals. We do this for you at Toradex. We also mitigate the risk of component obsolescence with guaranteed SOM availability for more than 10 years.

Mitigating platform obsolescence

With Moore’s Law in action, the silicon components keep on maturing with smaller size, power efficiency and lower price. Customers’ demands for high performance and power-efficient products leads to frequent redesigns of the platform to accommodate latest technologies. However, such redesigns add to cost, thus compromise profits. With our pin-compatible SOMs, for example, upgrading a platform is as easy as plug-and-play. New SOMs can be attached to existing carrier boards with very less software changes. Thus, your platform remains future-proof.

Amortizing high NRE cost

Embedded product development involves high NRE cost. The high NRE cost is amortized over low sales volume, thus leading to non-optimal cost structure for the OEMs. Consequently, it’s imperative that you finds ways to reduce your development risk and decrease development time. You can achieve this by using an off-the-shelf platform, which is optimized for power efficiency and performance. At Toradex, we do this by carrying out in-house development of hardware and software. Our platforms are stress-tested in field conditions by numerous existing customers, resulting in a robust and mature platform. This way your project is mostly limited to application development and integration, thus shrinking the NRE cost.

Avoiding barriers to adopt latest technologies

SOM vendors enable the penetration of leading technologies in embedded market, by engaging with market leaders of processors. Usually, leading SoC vendors prefer high volume businesses. Toradex offers SOMs based on leading processors: Freescale® Vybrid™, Freescale® i.MX 6 and NVIDIA® Tegra™. A new SOM based on Freescale® i.MX 7 will be available by Q1 2016.

Bringing this all together

Toradex pursues direct online sales with publicly disclosed pricing. We have local warehouses that guarantees ex-stock supply, along with in-house hardware and software development. We provide free tools and libraries including Qt of course, 10+ years product availability, and then to wrap it all up we offer free support in local language by the developers. More info on this, here

Toradex SOM and Qt

I spoke earlier of the importance of the application-agnostic part of your product by providing a scalable and compact platform. (You can easily get a compatible carrier board as per your application’s requirement, here.) Then comes the application software. Build your application using the awesome and exciting features of Qt. Qt is easily used on Toradex SOMs with our Apalis iMX6, Colibri iMX6, and Colibri VF61 & VF50 among the reference platforms available for Qt for Device Creation.

Want to learn more?

Let’s talk about how we at Toradex can help you in your next product development. Contact us here:  support.arm@toradex.com

 

About the Guest Blogger: Prakash has over a decade of experience in engineering and marketing roles in the embedded industry and is currently a Product Manager at Toradex. He is passionate about exploring avenues on how to build products cost-effectively, without compromising on end-user experience.

The post How to accelerate your embedded development appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1NfJl1t

Qt Creator 3.6 RC1 released

We are happy to announce the release of Qt Creator 3.6 RC1.

Since the beta, we have fixed many bugs, including an ugly, evasive crash that could happen on code completion, depending on how you used the mouse while typing function arguments (QTCREATORBUG-15275).

We simplified the activation of the Clang code model, and added a global option for additional arguments. You can for example use this to disable warnings that you do not care about, or to enable warnings that Qt Creator disables by default.

For an overview of what has changed in 3.6 compared to 3.5 please take a look at the Qt Creator 3.6 Beta1 blog post or our change log.

You find the opensource version on the Qt download page, and commercially licensed packages on the Qt Account Portal. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on irc.freenode.net, and on the Qt Creator mailing list.

Note: Starting with Qt Creator 3.6 we no longer provide prebuilt binaries for Linux 32-bit. Building Qt Creator on that platform is still supported though.

The post Qt Creator 3.6 RC1 released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Sm9QWC

Qt Quick Controls Re-engineered – Status Update

Since announcing research on Qt Quick Controls optimized for embedded use, we’ve made good progress towards achieving feature parity with the original Qt Quick Controls. We’ve also added some new controls that didn’t exist (Drawer, RangeSlider, and SwipeView, to name a few).

The previous blog post cited performance reasons as the motivation for having one fixed style. However, we have found a way to make multiple styles available without sacrificing performance. So far, two new styles have been merged, implementing both Google’s Material Design and Microsoft’s Universal Design.

 

material

Material style

universal

Universal style

It’s important to note that these styles are not claiming to be native, but instead a 100% cross-platform implementation of the Material and Universal design guidelines. For example, the Material style does not adapt to any Sony or Samsung theme on Android. You can run these styles on any platform and they will look more or less identical.

We’re also working on a neutral, optimised base style, and a fancier “Qt” style, both in cooperation with our designers.

Earlier, we talked about separating the C++ logic and the visual QML layer. Thanks to the feedback from our users, we have realized the power of a pure C++ logic layer and have decided to expose it separately for those wanting to build their own custom user experience. We’ve named this layer “templates”. A template is the foundation of a control. They encapsulate the behaviour of controls and provide an interface for styles to do their thing, allowing a true separation of concerns. For an introduction to this concept, take a look at the following video taken from the 2015 Qt World Summit:

The styling system now uses a technique similar to file selectors to choose which style to load at application startup. There are currently two ways to choose the application style:

  • An environment variable:
    QT_LABS_CONTROLS_STYLE=universal
    
  • The “-style” application argument:
    -style material
    

A manifest file for specifying the preferred style and style-specific attributes is also being considered as a future addition.

The more complex beasts like TableView and TreeView are on our to-do list. We realise that these are some of the most important controls, remaining quite relevant even on touch devices. Given the great opportunity that we have (to completely redesign all of the controls), we’d like to take the time to design these particular controls to be as lean as possible. After all, they are typically showing the most data. Not using Loaders has already given us a substantial head start in this area.

Popups are also getting some love, with a new approach that uses Qt Quick items instead of native top-level windows. What this means is that:

  • All platforms will have full access to menus, even embedded systems that don’t support multiple top-level windows.
  • Controls like ComboBox will be fully styleable, which was not possible with native windows in Qt Quick Controls.
  • Internal focus and key event handling is simplified.
  • It is easier to auto test things like menus, resulting in greater test coverage.
  • Popups will be bound to the window in which they were created.

Controls that will take advantage of this approach include Menu, ComboBox and PieMenu, with ToolTip also being considered as a new addition.

Finally, with the new infrastructure, we’ve decided to consolidate some of the controls from Qt Quick Extras into the module, resulting in one less import to remember. Not all of the controls made the cut, as we’d like to get an idea of which of these are in demand so that we can focus on the core areas of the module. Creating suggestions on our bug tracker (under the component “QtQuick: Controls 2“) is a great way to let us know what you’d like to see as part of the offering.

Here’s a small example of a Qt Labs Controls application:

import Qt.labs.controls 1.0

ApplicationWindow {
    visible: true

    Button {
        text: "Hello World!"
    }
}

We will be releasing a technical preview of the new controls in Qt 5.6 (with the working title of Qt Labs Controls), with a proper release planned for 5.7. We’ve had some early adopters trying out what we have so far, and giving us feedback via the bug tracker, which is great! If you’d like to do the same, try out the latest Qt 5.6 snapshot.

The post Qt Quick Controls Re-engineered – Status Update appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1QZZMnw

Embedded Linux news in Qt 5.6

With Qt 5.6 approaching, it is time to look at some of the new exciting features for systems running an Embedded Linux variant, just like we did for Qt 5.5 a while ago.

Support for NVIDIA Jetson Pro boards

Boards like the Jetson TK1 Pro running a Yocto-generated Vibrante Linux image have support for X11, Wayland, and even running with plain EGL without a full windowing system. The latter is accomplished by doing modesetting via the well-known DRM/KMS path and combining it with the EGL device extensions. This is different than what the eglfs platform plugin’s existing KMS backend, relying on GBM, offers. Therefore Qt 5.5 is not functional in this environment. For more information on the details, check out this presentation.

Wayland presents a similar challenge: while Weston works fine due to having been patched by NVIDIA, Qt-based compositors built with the Qt Compositor framework cannot function out of the box since the compositor has to use the EGLStream APIs instead of Mesa’s traditional EGLImage-based path.

With Qt 5.6 this is all going to change. With the introduction of a new eglfs backed based on EGLDevice + EGLOutput + EGLStream, Qt applications will just work, similarly to other embedded boards:

eglfs on the Jetson K1 Pro

The well-known Qt Cinematic Experience demo running with Qt 5.6 and eglfs on a Jetson K1 Pro

Cross-compilation is facilitated by the new device makespec linux-jetson-tk1-pro-g++.

Wayland is going to be fully functional too, thanks to the patches that add support for EGL_KHR_stream, EGL_KHR_stream_cross_process_fd, and EGL_KHR_stream_consumer_gltexture in the existing wayland-egl backend of Qt Compositor.

Wayland on the Jetson with Qt

The qwindow-compositor example running on the Jetson with some Qt clients

All this is not the end of the story. There is room for future improvements, for example when it comes to supporting multiple outputs and direct rendering (i.e. skipping GL-based compositing and connecting the stream directly to an output layer à la eglfs to improve performance). These will be covered in future Qt releases.

Note that Wayland support on the Jetson should be treated as a technical preview for the time being. Compositors using the unofficial C++ APIs, like the qwindow-compositor example shown above, will work fine. However, QML and Qt Quick support is still work in progress at the time of writing.

Support for Intel NUC

Some of the Intel NUC devices make an excellent embedded platform too, thanks to the meta-intel and the included meta-nuc layers for Yocto. While these are ordinary x86-64 targets, they can be treated and used like ARM-based boards. When configuring Qt for cross-compilation, use the new linux-nuc-g++ device spec. Graphics-wise everything is expected to work like on an Intel GPU-based desktop system running Mesa. This includes both eglfs (using the DRM/KMS/GBM backend introduced in Qt 5.5) and Wayland.

Wayland on boards based on the i.MX6

Systems based on Freescale’s i.MX6 processors include a Vivante GC2000 GPU and driver support for Wayland. Qt applications have traditionally been working fine on the Weston reference compositor, see for example this previous post for Qt 5.4, but getting Qt-based compositors up and running is somewhat tricky due to some driver specifics that do not play well with QPA and eglfs. With Qt 5.6 this issue is eliminated as well: in addition to the regular Vivante-specific backend (eglfs_viv), eglfs now has an additional backend (eglfs_viv_wl) which transparently ensures proper functionality when running compositor applications built with the Qt Compositor framework. This backend will need to be requested explicitly, so for example to run the qwindow-compositor example, do QT_QPA_EGLFS_INTEGRATION=eglfs_viv_wl ./qwindow-compositor -platform eglfs (the -platform can likely be omitted since eglfs is typically the default).

OpenGL ES 3.0 and 3.1

As presented earlier, OpenGL ES 3 support is greatly enhanced in Qt 5.6. Using the new QOpenGLExtraFunctions class applications targeting embedded devices with GLES 3 capable drivers can now take the full API into use in a cross-platform manner.

libinput

Qt 5.5 introduced support for libinput when it comes to getting input events from keyboards, mice, touchpads, and touchscreens. Qt 5.6 takes this one step further: when libinput is available at build time, it will be set as the default choice in eglfs and linuxfb, replacing Qt’s own evdevkeyboard, mouse, and touch backends.

In some rare cases this will not be desirable (for example when using evdevkeyboard-specific keyboard layouts from the Qt 4 QWS times), and therefore the QT_QPA_EGLFS_NO_LIBINPUT environment variable is provided as a means to disable this and force the pre-5.6 behavior.

That’s it for now. Hope you will find the new Embedded Linux features useful. Happy hacking!

P.S. the Qt World Summit 2015 had a number of exciting talks regarding embedded development, for example Qt for Device Creation, Choosing the right Embedded Linux platform for your next project and many more. Browse the full session list here.

The post Embedded Linux news in Qt 5.6 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LjjXFO

Qt Creator 3.6 Beta1 released

We are happy to announce the release of Qt Creator 3.6 Beta1.

Clang Diagnostic WarningClang FixIt integrationIn addition to getting many under the hood improvements and fixes, the Clang based code model now shows more detailed diagnostics in the code editor. We turned on diagnostics for many more warnings, the text is more detailed, and the code editor shows the affected code and its context in different styles. Additionally we integrated the Clang Fix-its into Qt Creator’s refactoring actions. If you haven’t already done so, you can enable the Clang code model plugin via Help > About Plugins (Qt Creator > About Plugins on OS X), and set it active for C++ file types in the C++ options (see also our documentation).

Qt Quick Designer now has an action for switching between a .ui.qml file and the usage in the corresponding .qml file, similar to the Switch Source/Form action in Qt Designer for widgets. We also made the previously commercial-only connection editor and path editor available to all users.

This release also features a bigger contribution: The model editor plugin, which you can use to create UML-style diagrams. Many thanks to Jochen Becher! You can read more about it in our documentation. It is in experimental state, so you need to turn it on in Help > About Plugins (Qt Creator > About Plugins on OS X). After restarting you can begin with creating a new diagram set with New File or Project > Modeling > Model.

Qt Creator 3.6 brings many more enhancements and fixes. Please have a look at our change log for a more detailed overview.

You find the opensource version on the Qt download page, and commercially licensed packages on the Qt Account Portal. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on irc.freenode.net, and on the Qt Creator mailing list.

Note: Starting with Qt Creator 3.6 we no longer provide prebuilt binaries for Linux 32-bit. Building Qt Creator on that platform is still supported though.

The post Qt Creator 3.6 Beta1 released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1RbSVWf

Qt in the Driver’s Seat | TU Automotive Europe 2015

Join the Qt team in Stuttgart from November 2 – 3 for TU-Automotive Europe (formerly Telematics Munich), Europe’s largest conference & exhibition dedicated to the future of auto mobility, where you can meet the entire telematics ecosystem under one roof.

We’re excited to give TU Automotive Europe attendees a closed up look at the recently announced Qt Automotive Suite, which supports common In-Vehicle-Infotainment (IVI) system development needs of automotive OEMs & Tier1’s. Qt Automotive Suite aims to unite & simplify the tools and software components needed to create stunning, highly-performing and quickly adaptable IVI user interfaces devices to enable profitable growth & innovation. Features include, but are not limited to: additional Qt libraries & plugins, Over-The-Air (OTA) updates, GENIVI/AGL Linux Compliance and much more.

We welcome you to stop by with your questions and to learn more about the awesome announcement made at Qt World Summit 2015.

(Watch Now: Qt Automotive Suite Keynote @ #QtWS15)

We look forward to seeing you in Stuttgart!

The post Qt in the Driver’s Seat | TU Automotive Europe 2015 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1i6UjNA

All Qt World Summit 2015 session videos now available

Two weeks ago we wrapped up the Qt World Summit where we had a variety of sessions covering everything from technology strategy and product life-cycle management to in-depth technical talks on new APIs, best practices and live coding sessions – all presented by Qt contributors and industry experts from around the world.

In case you missed the event itself or just a session while you were there, we have now made video recordings of all the sessions for you to watch on-demand. You can take advantage of the various track collections, recommended playlists that we have pulled together for you, or simply browse the full session listing.

qtws15_videos_banner2

The post All Qt World Summit 2015 session videos now available appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1GsGioN

Qt 5.5.1 Released

Today we have released Qt 5.5.1, the first update to Qt 5.5. In addition to improvements and fixes to Qt functionality, it also packs in new Qt Creator 3.5.1.

Qt 5.5.0 released in July introduced many new features and refinements to existing functionality, and the Qt 5.5.1 patch release provides close to 1.000 improvements and fixes on top of it. One of the key drivers for Qt 5.5 has been quality and maturity and we have continued to address items reported by the Qt users with Qt 5.5.1. I am really happy about all the feedback and especially all the contributions we have received.

Qt WebEngine in Qt 5.5.1 includes a couple of security fixes for known vulnerabilities. The list of important changes in Qt 5.5.1 can be found from the change logs. Note that only the most important items are listed in the change logs, for full list of changes it is best to check the git logs.

The Qt 5.5.1 packages also include new Qt Creator 3.5.1. See Qt Creator 3.5.1 change log for the main improvements.

The Qt for Device Creation embedded Linux stack has been updated to use Qt 5.5.1. Support for a new reference device: Kontron SMARC-sAMX6i has also been added. Furthermore, Qt Virtual Keyboard version 1.3.1 is also released today, as well as a technology preview of Qt Virtual Keyboard 2.0.

If you are using the online installer, Qt 5.5.1 and Creator 3.5.1 can be updated using the maintenance tool. Offline packages are available for commercial users in the Qt Account portal and at qt.io/download for open-source and commercial evaluation users.

The post Qt 5.5.1 Released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LlZotP

Qt Creator 3.5.1 released

We are happy to announce the release of Qt Creator 3.5.1. We fixed many bugs in this release and also updated our binary packages to Qt 5.5.1. Please have a look at our change log for more details.

You find the opensource version on the Qt download page, and commercially licensed packages on the Qt Account Portal. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on irc.freenode.net, and on the Qt Creator mailing list.

The post Qt Creator 3.5.1 released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1GIccsp

Watch the replay of Qt World Summit 2015 Keynotes right now!

If you missed last week’s Qt World Summit 2015 inspirational keynotes, fear not.

This is your chance to get a look into what you may have missed at the global event for all things Qt. Whether you are a technology director, business decision maker, tech strategist, product manager, engineer or developer there is something here for you to watch. You certainly don’t want to miss the thought-provoking talk of Kenneth Cukier from The Economist.

qtws15-keynotes-replay-announcement

We have also recorded all the other sessions for you and will be publishing them as soon as they are ready!

Let us know if you have any questions; I’ll be in touch soon!

The post Watch the replay of Qt World Summit 2015 Keynotes right now! appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1VOerqj

Handwriting Recognition with Qt Virtual Keyboard 2.0

The Qt Virtual Keyboard has been available for a bit over one year and nicely adopted in various devices built with Qt. With the upcoming version 2.0 it will allow gesture based text input as well as typing. In addition to handwriting recognition (HWR) functionality the upcoming Qt Virtual Keyboard 2.0 is bringing performance optimizations, support for Traditional Chinese language, and a couple of other features requested by customers.  

The Qt Virtual Keyboard is a versatile text input component available for commercial Qt licensees. It provides a customizable framework for text input using a virtual keyboard – and now also handwriting recognition. The Qt Virtual Keyboard makes it easy to extent the provided set of input methods and to use different 3rd party engines for word prediction and character recognition. The core features of the Qt Virtual Keyboard are covered in a recent blog post about version 1.3 as well as the documentation.

The most important new features of Qt Virtual Keyboard 2.0 are:

  • Generic support for shape recognition based input methods
  • Full screen HWR mode (on-top writing)
  • A reference implementation of handwriting input method with open-source Lipi toolkit alphabetic + numeric recognizer integration (English)
  • Performance optimizations for Lipi toolkit and background processing of recognition results
  • Nuance T9 Write HWR integration (commercial product with support for over 40 languages)
  • Word reselect functionality using open-source Hunspell prediction framework
  • Support for runtime language switching and language selection from a Qt application
  • Traditional Chinese support and keyboard layout

We are eager to hear feedback of the new features, especially the handwriting recognition. If you are visiting the Qt World Summit, please drop by and see it in action. There will also be a technology preview release available for download in the coming weeks.

The post Handwriting Recognition with Qt Virtual Keyboard 2.0 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Q05ByQ

Download the #QtWS15 Mobile App Now

If you haven’t already headed over to http://ift.tt/1Rj5EH1 to download the #QtWS15 mobile app, you’re going to want to do that now. You can also search your app store for “Qt World Summit” if you don’t still have this post handy when you’re ready to download.

The app lets you:

  • browse full event schedule
  • personalize your agenda
  • read/favorite sessions
  • read speaker bios
  • look at floorplan maps
  • stay up to date with what is happening in the Network Lounge

A special shout-out to our pals iktwo and ndesai who did a great job. Thank you!

qtws15-event-app

The post Download the #QtWS15 Mobile App Now appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1jBHn3u

Watch Qt World Summit Keynotes Live this Tuesday at 09:00 CET

Not everybody is as lucky as those going to the Qt World Summit this Tuesday, so we have planned to bring it to you. We will be streaming the morning keynotes live at http://ift.tt/1ARpViz.

Agenda – Tuesday 6th October 09:00-12:00

  • Possibilities for an Innovative Tomorrow
    Juha Varelius, CEO & Petteri Holländer, Head of Product Management, The Qt Company
  • Bringing LG webOS and Qt to millions of smartTVs
    Torsten Rahn, LGE
  • Using Qt to Create a Cross-Target Integrated Luxury Audio Experience – Holoplot 3D Audio Wall
    Andreas Schmid, Entrepreneur, Holoplot & Till Adam, Services Director, Managing Director, KDAB
  • The In-Car User Experience is the Next Competitive Battleground, and It Will be Software-Defined & Updateable
    Jeff Payne, CEO, OpenCar Inc.
  • Big Data and the Future of Business Strategy
    Kenneth Cukier, Author, The Economist
  • Qt Today and Tomorrow – The Building Blocks and Path to the Future
    Lars Knoll, CTO, The Qt Company

Don’t miss out! Book some time in your calendar now. It all starts at 09:00 CET on Tuesday 6th October.

qtws15-live-stream-announcement

The post Watch Qt World Summit Keynotes Live this Tuesday at 09:00 CET appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LUQtDG

WOW! Have you seen our #QtWS15 Lightning Talks speaker line-up this year?

We’re excited to announce this year’s lightning talks at Qt World Summit!  After a healthy dose of keynotes and sessions covering business strategy and the code behind it, we will have 13 presenters take the floor on Tuesday, October 6th for lightning talks – short (under 10 minute) talks on a few different topics. Our program of lightning talks will be kicked off at 5:30pm and will last one hour.

Discover bold, powerful talks from diverse, exciting, and influential people. Walk away enlightened and informed.

Should be a great night so we hope to see you there! Don’t miss a front row seat, register now.

PS: There is still time to convince your boss to attend Qt World Summit 2015. Here’s a sample letter with just some of the reasons why anyone using or thinking of using Qt needs to attend this event.

The post WOW! Have you seen our #QtWS15 Lightning Talks speaker line-up this year? appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Rf4Oei

Qt for Native Client (and emscripten)

Qt for Native client has been in development for a while, and I’m pleased to announce that the project again has reached working status: running Qt applications (Qt Widgets and Qt Quick) sandboxed in the Chrome browser. In this post I’ll talk about the background of native code on the web and how to get started with Qt.

Qt for Native Client is available as an unsupported tech preview. Get the source code form code.qt.io:

git clone http://ift.tt/1LCdtao .
git checkout wip/nacl

The above “git clone” will give you qtbase only – If you are interested in using Qt Quick then you probably want a complete Qt checkout with the wip/nacl branch for QtBase.

See the presentation at the the Qt World Summit
Qt for Native Client will be presented at the Qt World Summit. Register today!

A brief history of Native Code on the Web

Native Client (NaCl) is a sandbox for native x86 code, first published back in 2009, and later extended to support x86_64 and ARM. Portable Native Client (PNaCl) is built on top of NaCl and defines an intermediate architecture-independent format for distribution. PNaCl binaries are translated to NaCl binaries on first load by the browser. Chrome runs PNaCl binaries from the Web, NaCl binaries from the Chrome App store or if enabled in browser settings. Other browser vendors have showed little interest in this line of technology.

Emscripten compiles native code to JavaScript which can run on all browsers. Later versions of Emscripten improves performance (on cooperating browsers) by using the ASM JS subset of JavaScript.

WebAssembly is a joint effort between some of the larger browser vendors, which target “is to promote early-stage cross-browser collaboration on a new, portable, size- and load-time-efficient format suitable for compilation to the web.” Compatibility for non-WebAssembly browsers is provided in the form of a WebAssembly loader implemented in JavaScript.

The Native Client SDK

The Native Client SDK is versioned along with Chrome and follows the same 6-week release cycle. The SDK contains an update script which fetches new versions and updates ‘canary’.

$ ls nacl_sdk/
        pepper_40
        pepper_41
        pepper_canary

‘pepper_NN/toolchain’ then contains PNaCl and NaCl toolchains. The “mac” in the names is the host, produced binaries are OS independent. The Qt tech preview currently supports the ‘pnacl’ and ‘newlib’ toolchains, using static builds.

$ ls nacl_sdk/pepper_41/toolchain
        mac_arm_newlib
        mac_pnacl
        mac_x86_glibc
        mac_x86_newlib

Finally we find the compiler binaries and conclude we are dealing with a cross-compiler:

$ ./nacl_sdk/pepper_41/toolchain/mac_pnacl/bin/i686-nacl-clang++ hello.cpp -o hello.nexe
$ file hello.nexe
hello.nexe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
$ ./hello
-bash: ./hello.nexe: cannot execute binary file

Emscripten

Emscripten is typically distributed by your platforms package manager. On OS X:

        brew install emscripten

This gives you the ‘em++’ compiler and friends – there are no versions or toolchain variants. em++ can produce “executable” .js files:

$em++ hello.cpp -o hello.js
node hello.js
“Hello World”

API and Platform

Programs that want to do something more interesting than printing to standard out need an API to interface against. In Qt, this is the domain of the QPA platform plugin. Native Client provides PPAPI (’Pepper’) which provides a C and C++ API for the features covered by the HTML (5) specification. For example, Pepper gives access to mouse and keyboard events, and provides 2D or 3D graphics contexts.

Emscripten also has a similar API. Qt could have used it but instead uses pepper.js, which is a re-implementation of the Pepper API on top of Html, which allows us to re-use the exiting pepper platform plugin. (It could be said that adding this level of indirection is in the spirit of compiling C++ to JavaScript). Emscripten support is still very expermental: QtCore and QtGui runs with raster graphics, the OpenGL, QtWidgets and QtQuick modules are largely untested.

Setting up Qt

The workflow is similar to using Qt for any other platform:
1. Configure and build Qt.
2. Build the application.
3. Deploy. (nacldeployqt)

The following is a simplified overview, complete getting started instructions are available at qtbase/README.md.

1. Use the provided configure script, select a NaCl toolchain or emscripten (We treat emscripten as a nacl variant.)

./nacl-configure mac_pnacl release

Build Qt:

make qtmodule-qtbase (or qtmodule-qtdeclarative)

2. Build the application

/path/to/qmake && make

3. Run nacldeployqt

/path/to/nacldeployqt application.nexe

This creates supporting files for the application: a html file, the qtloader.js script, manifest files.

In addition, nacldeployqt provides some convenience:

   -—run: Start Chrome, run the application
   -—debug: Start Chrome and nacl-gdb, run the applicatjon with attached debugger

Finally it runs:
nacl-controls-gallery

Questions? Interested in contributing to the development of Qt for Native Client? Contact us here or on #qt-labs on irc (freenode).

The post Qt for Native Client (and emscripten) appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LCdsTR

Using modern OpenGL ES features with QOpenGLFramebufferObject in Qt 5.6

QOpenGLFramebufferObject is a handy OpenGL helper class in Qt 5. It conveniently hides the differences between OpenGL and OpenGL ES, enables easy usage of packed depth-stencil attachments, multisample renderbuffers, and some more exotic formats like RGB10. As a follow up to our previous post about OpenGL ES 3 enhancements in Qt 5.6, we are now going to take a look at an old and a new feature of this class.

Qt 5.6 introduces support for multiple color attachments, to enable techniques requiring multiple render targets. Even though support for this is available since OpenGL 2.0, OpenGL ES was missing it up until version 3.0. Now that mobile and embedded devices with GLES 3.0 support are becoming widely available, it is time for QOpenGLFramebufferObject to follow suit and add some basic support for MRT.

Our other topic is multisample rendering to framebuffers. This has been available for some time in Qt 5, but was usually limited to desktop platforms as OpenGL ES does not have this as a core feature before version 3.0. We will now go through the basic usage and look at some common pitfalls.

Multisample framebuffers

By default our framebuffer will have a texture as its sole color attachment. QOpenGLFramebufferObject takes care of creating this texture, applications can then query it via textures() or can even take ownership of and detaching it from the FBO by calling takeTexture().

What if multisampling is desired? Requesting it is simple by using the appropriate constructor, typically like this:

    QOpenGLFramebufferObjectFormat format;
    format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
    format.setSamples(4);
    fbo = new QOpenGLFramebufferObject(width, height, format);

Here 4 samples per pixel are requested, together with depth and stencil attachments, as the default is to have color only. The rest of the defaults in QOpenGLFramebufferObjectFormat matches the needs of most applications so there is rarely a need to change them.

Now, the obvious question:

What if support is not available?

When support for multisample framebuffers is not available, either because the application is running on an OpenGL ES 2.0 system or the necessary extensions are missing, QOpenGLFramebufferObject falls silently back to the non-multisample path. To check the actual number of samples, query the QOpenGLFramebufferObjectFormat via format() and check samples(). Once the framebuffer is created, the returned format contains the actual, not the requested, number of samples. This will typically be 0, 4, 8, etc. and may not match the requested value even when multisampling is supported since the requests are often rounded up to the next supported value.

    ...
    fbo = new QOpenGLFramebufferObject(width, height, format);
    if (fbo->isValid()) {
        if (fbo->format().samples() > 0) {
            // we got a framebuffer backed by a multisample renderbuffer
        } else {
            // we got a non-multisample framebuffer, backed by a texture
        }
    }

What happens under the hood?

QOpenGLFramebufferObject’s multisample support is based on GL_EXT_framebuffer_multisample and GL_EXT_framebuffer_blit. The good thing here is that glRenderbufferStorageMultisample and glBlitFramebuffer are available in both OpenGL 3.0 and OpenGL ES 3.0, meaning that relying on multisample framebuffers is now feasible in cross-platform applications and code bases targeting desktop, mobile, or even embedded systems.

As usual, had Qt not cared for older OpenGL and OpenGL ES versions, there would have been some other options available, like using multisample textures via GL_ARB_texture_multisample or GL_ARB_texture_storage_multisample instead of multisample renderbuffers. This would then require OpenGL 3.2 (OpenGL 4.3 or OpenGL ES 3.1 in case of the latter). It has some benefits, like avoiding the explicit blit call for resolving the samples. It may be added as an option to QOpenGLFramebufferObject in some future Qt release, let’s see.

A note for iOS: older iOS devices, supporting OpenGL ES 2.0 only, have multisample framebuffer support via GL_APPLE_framebuffer_multisample. However, API-wise this extension is not fully compatible with the combination of EXT_framebuffer_multisample+blit, so adding support for it is less appealing. Now that newer devices come with OpenGL ES 3.0 support, it is less relevant since the standard approach will work just fine.

So what can I do with that renderbuffer?

In most cases applications will either want a texture for the FBO’s color attachment or do a blit to some other framebuffer (or the default framebuffer associated with the current surface). In the multisample case there is no texture, so calling texture() or similar is futile. To get a texture we will need a non-multisample framebuffer to which the multisample one’s contents is blitted via glBlitFramebuffer.

Fortunately QOpenGLFramebufferObject provides some helpers for this too:

    static bool hasOpenGLFramebufferBlit();
    static void blitFramebuffer(QOpenGLFramebufferObject *target, const QRect &targetRect,
                                QOpenGLFramebufferObject *source, const QRect &sourceRect,
                                GLbitfield buffers,
                                GLenum filter,
                                int readColorAttachmentIndex,
                                int drawColorAttachmentIndex);

Combined with some helpful overloads, this makes resolving the samples pretty easy:

    ...
    GLuint texture;
    QScopedPointer tmp;
    if (fbo->format().samples() > 0) {
        tmp.reset(new QOpenGLFramebufferObject(fbo->size()));
        QOpenGLFramebufferObject::blitFramebuffer(tmp.data(), fbo);
        texture = tmp->texture();
    } else {
        texture = fbo->texture();
    }
    ...

Checking for the availability of glBlitFramebuffer via hasOpenGLFramebufferBlit() is not really necessary because the multisample extension requires the blit one, and, on top of that, QOpenGLFramebufferObject checks for the presence of both and will never take the multisample path without either of them. Therefore checking format().samples(), as shown above, is sufficient. It is worth noting that creating a new FBO (like tmp above) over and over again should be avoided in production code. Instead, create it once, together with the multisample one, and reuse it. Note also that having depth or stencil attachments for tmp is not necessary.

And now on to the shiny new stuff.

Multiple render targets

In Qt 5.6 QOpenGLFramebufferObject is no longer limited to a single texture or renderbuffer attached to the GL_COLOR_ATTACHMENT0 attachment point. The default behavior does not change, constructing an instance will behave like in earlier versions, with a single texture or renderbuffer. However, we now have a new function called addColorAttachment():

void addColorAttachment(const QSize &size, GLenum internalFormat = 0);

Its usage is pretty intuitive: as the name suggests, it will create a new texture or renderbuffer and attach it to the next color attachment point. For example, to create a framebuffer object with 3 color attachments in addition to depth and stencil:

fbo = new QOpenGLFramebufferObject(size, QOpenGLFramebufferObject::CombinedDepthStencil);
fbo->addColorAttachment(size);
fbo->addColorAttachment(size);

The sizes and internal formats can differ. The default value of 0 for internalFormat leads to choosing a commonly suitable default (like GL_RGBA8). As for the sizes, the main rule is to keep in mind that rendering will get limited to the area that fits all attachments.

After this we will have a color attachment at GL_COLOR_ATTACHMENT0, 1 and 2. To specify which ones are written to from the fragment shader, use glDrawBuffers. As introduced in the previous post, QOpenGLExtraFunctions is of great help for invoking OpenGL ES 3.x functions:

QOpenGLExtraFunctions *f = QOpenGLContext::currentContext()->extraFunctions();
GLenum bufs[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2 };
f->glDrawBuffers(3, bufs);

We are all set. All we need now is a fragment shader writing to the different attachments:

...
layout(location = 0) out vec4 diffuse;
layout(location = 1) out vec4 position;
layout(location = 2) out vec4 normals;
...

The rest is up to the applications. QOpenGLFramebufferObject no longer prevents them from doing deferred shading and lighting, or other MRT-based techniques.

To check at runtime if multiple render targets are supported, call hasOpenGLFeature() with MultipleRenderTargets. If the return value is false, calling addColorAttachment() is futile.

Finally, now that there can be more than one texture, some of the existing QOpenGLFramebufferObject functions get either a new overload or a slightly differently named alternative. They need no further explanation, I believe:

QVector textures() const;
GLuint takeTexture(int colorAttachmentIndex);
QImage toImage(bool flipped, int colorAttachmentIndex) const;

That’s all for now, happy hacking!

The post Using modern OpenGL ES features with QOpenGLFramebufferObject in Qt 5.6 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1FXgDzd

Throwback Thursday: In my day, #QtWS15 tickets were only €427

If you aren’t celebrating Throwback Thursday (#tbt) yet, you should be. All the cool kids are doing it — and by that I mean our Qt World Summit 2015 speakers. Here are some of their Qt t-shirts.

qt tshirts

Do you remember your first lines of code with Qt? Or your first Qt event? Were you bright eyed, bushy tailed, and naive about the ways of cross-platform development? Do you still reminisce about a time when Qt World Summit tickets only cost €427?

Lucky for you, we’re throwing it back to our lowest price available — 30% off the regular price for the next 24 hours. That’s 427 € for a Two Day Conference Pass / €627 for a Three Day Combo Pass! Register for QtWS15 with the code “tbt70” to get €70 off your registration by Friday, September 18th, 3 pm CET / 6 am PDT.

Don’t be left out!

QtWS2015-tbt-flash-sale-badge

The post Throwback Thursday: In my day, #QtWS15 tickets were only €427 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LiFtPY

QtWS15 | Be like one of the Qt Support team!

Now that I have your attention then I can first kick off with a reminder that at the Qt World Summit in Berlin this year there will be members of the Qt Support team available on hand to help you out if you have any questions. Visit the Qt Prodigy Bar and ask them pretty much anything. To get you in the asking mode here are some of our Frequently Asked Questions:

  • “MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib “msvcrt.lib” conflicts with use of other libs; use /NODEFAULTLIB:library” — What does this mean and how can I fix it
  • How do I convert between a BSTR and a QString?
  • How can I access dynamic properties of QObject in JavaScript when the global object is not available e.g. with QQmlEngine?
  • How can I change the sorting order of a column in QTableView?
  • Why doesn’t the palette set on a QPushButton have any effect except in some cases?
  • Just how awesome are you guys really? – Ok, we don’t actually get asked that, but that is because everyone knows we are just plain awesome!
  • How do I get the Qt Quick Compiler source code so I can build it or how can I use the existing version with my version of Qt?
  • How can I internationalize my application using existing translations in Qt?
  • How can I get rid of all the margins in the QChartView?
  • How do I replace the Qt splash screen that is shown with my own?

But what if you don’t want to wait to find out the answers to any of these questions? Well then this is your lucky day, you can find the answers to these questions (and more!) already at http://ift.tt/1O52qrB. All you need is a valid Qt Account and be logged in to see it.

How does this help me be like one of the Qt support team I hear you ask? Well by utilizing this page you too can help out and amaze your colleagues and friends by being able to answer these support questions and dazzle them with your Qt support knowledge.

And remember, we are at the Qt World Summit Prodigy Bar, feel free to set up a time and ask for our help!

qtws15_prodigy_bar_announcement

The post QtWS15 | Be like one of the Qt Support team! appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1K1lO4W

A Stellar Qt World Summit 2015 Keynote You Can’t Afford To Miss!

Qt World Summit is going to be remarkable this year, with Kenneth Cukier, Data Editor of ‘The Economist’ as one of the key speakers of the event.

Kenn is the coauthor of the award-winning book “Big Data: Big Data: A Revolution That Will Transform How We Live, Work, and Think”, a New York Times Bestseller translated into 20 languages.

Focused on themes such as innovation and Internet Governance, Kenn has spent years immersed in big data, artificial intelligence, machine learning – and their impact of both on data-driven technology and design. His speech will offer a high-level view on the future of application development and device creation and how data connects human interaction.

Find your way to the plenary room on Tuesday, October 6 so you won’t miss a minute of Kenn’s powerful keynote. Can’t wait? Take 16 minutes now (or maybe snag your ticket and then watch) to see his TED talk which gives you a taste of what’s to come.

And with such a line-up at QtWS15, we think you’ll agree inspiration is going to be in plentiful supply… Tickets are available here – get yours today, and join us for a conference to remember!

qtws15_longbanner

The post A Stellar Qt World Summit 2015 Keynote You Can’t Afford To Miss! appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Qsl3Eu

Cross-platform OpenGL ES 3 apps with Qt 5.6

Now that the alpha release for Qt 5.6 is here, it is time to take a look at some of the new features. With the increasing availability of GPUs and drivers capable of OpenGL ES 3.0 and 3.1 in the mobile and embedded world, targeting the new features these APIs provide has become more appealing to applications. While nothing stops the developer from using these APIs directly (that is, #include <GLES3/gl3.h>, call the functions directly, and be done with it), the cross-platform development story used to be less than ideal, leading to compile and run-time checks scattered across the application. Come Qt 5.6, this will finally change.

Support for creating versioned OpenGL (ES) contexts has been available in Qt 5 for some time. Code snippets like the following should therefore present no surprises:

int main(int argc, char **argv) {
    QSurfaceFormat fmt;
    fmt.setVersion(3, 1);
    fmt.setDepthBufferSize(24);
    QSurfaceFormat::setDefaultFormat(fmt);

    QGuiApplication app(argc, argv);
    ...
}

It is worth pointing out that due to the backwards compatible nature of OpenGL ES 3 this may seem unnecessary with many drivers because requesting the default 2.0 will anyway result in a context for the highest supported OpenGL ES version. However, this behavior is not guaranteed by any specification (see for example EGL_KHR_create_context) and therefore it is best to set the desired version explicitly.

The problem

So far so good. Assuming we are running on an OpenGL ES system, we now have a context and everything ready to utilize all the goodness the API offers. Except that we have no way to easily invoke any of the 3.0 or 3.1 specific functions, unless the corresponding gl3.h or gl31.h header is included and Qt is either a -opengl es2 build or the application explicitly pulled in -lGLESv2 in its .pro file. In which case we can wave goodbye to our sources’ cross-platform, cross-OpenGL-OpenGL ES nature.

For OpenGL ES 2.0 the problem has been solved for a long time now by QOpenGLFunctions. It exposes the entire OpenGL ES 2.0 API and guarantees that the functions are resolved correctly everywhere where an OpenGL context compatible with either OpenGL ES 2.0 or OpenGL 2.0 plus the FBO extension is available.

Before moving on to introducing the counterpart for OpenGL ES 3.0 and 3.1, it is important to understand why the versioned OpenGL function wrappers (for example, QOpenGLFunctions_3_2_Core) are not a solution to our problem here. The versioned wrappers are great when targeting a given version and profile of the OpenGL API. However, they lock in the application to systems that support that exact OpenGL version and profile, or a version and profile compatible with it. Building and running the same source code on an OpenGL ES system is out of question, even when the code only uses calls that are available in OpenGL ES as well. So it turns out that strict enforcement of the compatibility rules for the entire OpenGL API is not always practical.

Say hello to QOpenGLExtraFunctions

To overcome all this, Qt 5.6 introduces QOpenGLExtraFunctions. Why “extra” functions? Because adding all this to QOpenGLFunctions would be wrong in the sense that everything in QOpenGLFunctions is guaranteed to be available (assuming the system meets Qt’s minimum OpenGL requirements), while these additional functions (the ES 3.0/3.1 API) may be dysfunctional in some cases, for example when running with a real OpenGL (ES) 2.0 context.

The usage is identical to QOpenGLFunctions: either query a context-specific instance from QOpenGLContext via QOpenGLContext::extraFunctions() or subclass and use protected inheritance. How the functions get resolved internally (direct call, dynamic resolving via dlsym/GetProcAddress, or resolving via the extension mechanism, i.e. eglGetProcAddress and friends) is completely transparent to the applications. As long as the context is OpenGL ES 3 or a version of OpenGL with the function in question available as an extension, it will all just work.

As an example let’s try to write an application that uses instanced drawing via glDrawArraysInstanced. We want it to run on mobile devices with OpenGL ES 3.0 and any desktop system where OpenGL 3.x (compatibility profile) is available. Needless to say, we want as little branching and variation in the code as possible.

For the impatient, the example is part of Qt and can be browsed online here.

Now let’s take a look at the most important pieces of code that allow the cross-OpenGL-OpenGL ES behavior.

Context versioning

int main(int argc, char *argv[])
{
    QSurfaceFormat fmt;
    fmt.setDepthBufferSize(24);
    if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
        fmt.setVersion(3, 3);
        fmt.setProfile(QSurfaceFormat::CompatibilityProfile);
    } else {
        fmt.setVersion(3, 0);
    }
    QSurfaceFormat::setDefaultFormat(fmt);
    QGuiApplication app(argc, argv);
    ...
}

This looks familiar. Except that now, in addition to opting for version 3.0 with OpenGL ES, we request 3.3 compatibility when running with OpenGL. This is important because we know that instanced drawing is available there too. Therefore glDrawArraysInstanced will be available no matter what.

The fact that we are doing runtime checks instead of ifdefs is due to the dynamic OpenGL implementation loading on some platforms, for example Windows, introduced in Qt 5.4. There it is not necessarily known until runtime if the implementation provides OpenGL (opengl32.dll) or OpenGL ES (ANGLE).

Note that it may still be a good idea to check the actual version after the QOpenGLContext (or QOpenGLWidget, QQuickView, etc.) is initialized, just to be safe. QOpenGLContext::format(), once the context is sucessfully create()’ed, always contains the actual, not the requested, version and other information.

Astute readers may now point out that it should also be possible to request an OpenGL ES context unconditionally in case GLX_EXT_create_context_es2_profile or similar is supported. This would mean that instead of branching based on openGLModuleType(), one could simply set the format’s renderableType to QSurfaceFormat::OpenGLES. The disadvantage is obvious: that approach just won’t work on many systems. Hence we stick to compatibility profile contexts when running with OpenGL.

Shader version directive

    if (QOpenGLContext::currentContext()->isOpenGLES())
        versionedSrc.append(QByteArrayLiteral("#version 300 es\n"));
    else
        versionedSrc.append(QByteArrayLiteral("#version 330\n"));

What’s this? Our shader code is written in the modern GLSL syntax and is simple and compatible enough between GLSL and GLSL ES. However, there is a one line difference we have to take care of: the version directive. This is easy enough to fix up.

Note that with OpenGL implementations supporting GL_ARB_ES3_compatbility this is not needed as these should be able to handle 300 es shaders too. However, in order to target the widest possible range of systems, we avoid relying on that extension for now.

Calling ES 3 functions

    QOpenGLExtraFunctions *f = QOpenGLContext::currentContext()->extraFunctions();
    ...
    f->glDrawArraysInstanced(GL_TRIANGLES, 0, m_logo.vertexCount(), 32 * 36);

And here’s why this is great: the actual API call is the same between OpenGL and OpenGL ES, desktop and mobile or embedded platforms. No checks, conditions, or different wrapper objects are needed.

Below a screenshot of the application running on a Linux PC and on an Android tablet with no changes to the source code. (What’s better than a single Qt logo? A Qt logo composed of 1152 Qt logos of course!)

OpenGL ES 3 test app

The hellogles3 example running on Linux. Make sure to check it out live in all its animated glory as the photos do no justice to it.

GLES3 demo app on Android

The exact same app running on Android

Summary

To summarize which API wrapper to use and when, let’s go through the possible options:

  • QOpenGLFunctions – The number one choice, unless OpenGL 3/4.x features are desired and the world outside the traditional desktop platforms is not interesting to the application. Cross-platform applications intending to run on the widest possible range of systems are encouraged to to stick to this one, unless they are prepared to guard the usage of OpenGL features not in this class with appropriate runtime checks. QOpenGLFunctions is also what Qt Quick and various other parts of Qt use internally.
  • QOpenGLExtraFunctions – Use it in addition to QOpenGLFunctions whenever OpenGL ES 3.0 and 3.1 features are needed.
  • Versioned wrappers (QOpenGLFunctions_N_M_profile) – When an OpenGL 3/4.x core or compatibility profile is needed and targeting OpenGL ES based systems is not desired at all.

Bonus problem: the headers

Before going back to coding, an additional issue needs explaining: what about the GL_* constants and typedefs? Where do the OpenGL ES 3.x specific ones come from if the application does not explicitly include GLES3/gl3.h or gl31.h?

As a a general rule Qt applications do not include OpenGL headers themselves. qopengl.h, which is included by the QOpenGL class headers, takes care of this.

  • In -opengl es2 builds of Qt, which is typical on mobile and embedded systems, qopengl.h includes the header for the highest possible ES version that was found when running configure for Qt. So if the SDK (sysroot) came with GLES3/gl31.h, then applications will automatically have everything from gl31.h available.
  • In -opengl desktop and -opengl dynamic builds of Qt the ES 3.0 and 3.1 constants are available because they are either part of the system’s gl.h or come from Qt’s own internal copy of glext.h, where the latter conveniently gives us all constants up to OpenGL 4.5 and is included as well from qopengl.h.

So in many cases it will all just magically work. There is a problematic scenario, in particular on mobile, though: if only gl2.h was available when building Qt, then applications will not get gl3.h or gl31.h included automatically even if the SDK against which applications are built has those. This can be a problem on Android for example, when Qt is built against an older NDK that does not come with ES 3 headers. For the time being this can be worked around in the applications by explicitly including gl3.h or gl31.h guarded by an ifdef for Q_OS_ANDROID.

That is all for now. For those wishing to hear more about the exciting news in Qt’s graphics world, Qt World Summit is the place to be. See you there in October!

The post Cross-platform OpenGL ES 3 apps with Qt 5.6 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Fxz8dj