Qt 5.7 released



  • Qt 5.7 released

    Published Thursday June 16th, 2016
    6 Comments on Qt 5.7 released
    Posted in Biz Circuit & Dev Loop, News, Qt, Releases

    I’m very happy to announce that Qt 5.7 is now available. It’s been only 3 months since we released Qt 5.6, so one might expect a rather small release with Qt 5.7. But apart from the usual bug fixes and performance improvements, we have managed to add a whole bunch of new things to this release.

    Updated licensing

    Before going into the content and all the cool new features, I should mention the changes to our licensing that have been implemented with Qt 5.7.

    Qt has always been available as Free Software, and will continue to be so in the future. Qt is being developed as an open source project, The Qt Company is fully committed to this, and in addition, the agreement with the KDE Free Qt Foundation legally ensures this.

    With Qt 5.7, we are slightly adjusting our licensing of the Open Source version to bring it more in line with the philosophy of the Free Software movement. From this version onwards, Qt will not be available under LGPL version 2.1 anymore. Instead, Qt will be licensed under two main licenses: LGPL version 3 (and GPL version 2) for all almost all frameworks and libraries, and GPL version 3 for our tools like e.g. Qt Creator. In addition, we’re open sourcing some formerly closed Qt add-ons and tools under GPL version 3.

    Please check our our licensing pages or the licensing FAQ for all details around this. You can also have a look at my blog post from January where I announced this change.

    Unifying Qt for Application Development

    The license change gives us a unique opportunity to unify our Qt for Application Development offering between the Open Source and Commercial versions. Starting with Qt 5.7, both packages come with exactly the same content.

    This means that all the parts of Qt for Application Development that previously have been available only to commercial users are now available in the Open Source package as well.

    This includes the following modules:

    Qt Charts (GPLv3)
    Qt Data Visualization (GPLv3)
    Qt Virtual Keyboard (GPLv3)
    Qt Purchasing (LGPLv3)
    Qt Quick 2D renderer (GPLv3)
    The only exception is the Qt Quick Compiler where we need some more time to finish the required changes to be able to support this feature in the Open Source Edition.

    Qt Virtual Keyboard - Now available for GPL Qt users as well!
    Qt Virtual Keyboard – Now available under GPL!

    Qt Charts
    Qt Charts

    C++11

    It has been possible to use a C++11 compliant compiler together with Qt (and thus use C++11 in your application) for many releases. But Qt itself didn’t make use of it except for some integration points in our API.

    With Qt 5.6 being a long-term release that we will support for three years, we have taken the opportunity with Qt 5.7 to start modernizing our own code base. As one of the core strengths of Qt comes from it being a C++ framework, we want to follow the progress of modern C++ more closely.

    Starting with Qt 5.7, we will require a C++11 compliant compiler to build and use Qt. This allows us to use many of the new features in Qt itself, and renew our codebase using features such as constexpr, move semantics, range-for and auto. These efforts are well under way and will continue throughout the next versions.

    Apart from adding previously commercial-only modules to the Open Source version, we also have quite a bit of new content in Qt 5.7.

    Qt 3D

    We want to provide you the tools to create the required WOW-effect to amaze your end users. Modern UIs in many areas require the integration of 3D graphics, or even creating the whole user experience in three dimensions. In past years we’ve been improving our developer offering to make it easier for you to add this dimension into your UIs. With Qt 5.7, we are bringing in the Qt 3D module. This module has been available as a Technology Preview for two releases now, and I’m happy to announce that it has now reached the state where it is becoming a fully supported member of the Qt family!

    Qt 3D complements the 3D GUI offering of Qt consisting of integration to OpenGL, Qt Canvas 3D, and Qt Data Visualization modules. Qt 3D provides you with a 3D engine, that comes with both C++ and QML APIs. It makes it a lot easier to embed and handle 3D content within Qt Applications. In general, Qt 3D is much more than just a renderer, it serves as an extensible 3D framework for all kind of simulations. The architecture and most of the development on Qt 3D over the past years has been done by our partner KDAB, a huge thanks goes to them for their work. For a proper introduction, please see the guest blog post from Sean Harmer from KDAB.

    Qt Quick Controls 2

    Qt 5.7 also comes with a fully supported version of our new Qt Quick Controls, the library of QML-based UI controls. Qt Quick Controls 1 were targeted at the desktop, and came with all the bells and whistles required for desktop applications. This implied an overhead that often made them too slow for usage on embedded devices.

    Qt Quick Controls 2 solve these issues. They have been built from the ground up with performance and memory consumption in mind. So while they are fully usable on the desktop, they have slightly more limited functionality and e.g. don’t come with native styling integration. But they are vastly faster, and use a lot less memory than the old controls, making them ideal for many embedded and mobile solutions. Qt Quick Controls 1 are still part of the offering and a suitable API for desktop development. For instance, the Qt Quick Layouts work nicely with both of the control sets.

    Architecturally, Qt Quick Controls are based on templates that allow you to create your completely own set of controls ground-up. They also come with a flexible system that allows the rapid creation of custom styles and user experiences. In addition, the existing controls come with three predefined styles:

    Default style – a simple and minimal all-around style that offers the maximum performance
    Material style – a style based on the Google Material Design Guidelines
    Universal style – a style based on the Microsoft Universal Design Guidelines
    For a good overview, more details and a teaser video, please see the blog post from J-P Nurmi.

    New functionality in existing modules

    A lot of new functionality has been added to existing modules, and this blog can’t cover them all. Some of the highlights are:

    Qt Core

    Qt uses poll() instead of select() in it’s event loop allowing for more than 1024 file descriptors
    Qt now uses std::atomic for it’s atomic classes
    Qt Gui

    NEON optimizations for image scaling in Qt Gui
    Optimized the OpenGL function wrappers in Qt for size and speed
    Qt QML and Quick

    JIT support for WinRT, and 64bit ARM platforms in Qt QML, leading to much better QML performance on these platforms
    The debugger now supports debugging multiple QJSEngine instances at the same time
    Improved profiler and inspector integration
    Qt WebEngine

    Qt WebEngine is now based on Chromium 49 and can now print to PDF
    Support for DRM-protected HTML5 video in WebEngine
    Qt NFC

    Support for Android
    For all the details, please have a look at our New Features page and the Changes file for Qt 5.7.

    Qt for Device Creation

    Also Qt for Device creation has received an update and does now ship with Qt 5.7. In this release, we added out of the box support for a set of new hardware:

    The NVIDIA DRIVE CX boards (Tegra X1, 64 bit ARM)
    The Rasberry Pi 3 (32 bit mode)
    i.MX7 based devices (without GPU, uses the Linux framebuffer and the Qt Quick 2D renderer)
    Microsoft Windows is now a fully supported as a host platform for developing for embedded Linux. While Qt for Device Creation 5.7 does no longer support Windows Embedded, we now have full support for QNX, including pre-built binaries.

    To read more about changes in Qt for Device Creation, please see the separate blog post.

    Qt Creator 4.0

    Qt 5.7 ships with Qt Creator 4.0, more precisely with the new Qt Creator 4.0.2 version. Qt Creator 4.0 is a full development environment for all desktop, mobile and embedded development and now with version 4, we’ve especially emphasized the designer-developer workflow with the integration of Qt Quick Designer visual layout editor and the new Qt Quick Controls 2. Together, they provide a really nice way to rapidly create touch-based UIs for your embedded and mobile applications. Check out the separate video about the workflow from this blog post.

    Qt Creator 4.0 also comes with a set of nice new features, such as Clang integration and extended QML profiler, please find the details from the Qt Creator 4.0 blog post. For the updates regarding Qt 4.0.2, please see the change files.

    New Technology previews

    In addition, Qt 5.7 also adds a couple of new modules as Technology Previews.

    The first one is the Qt Wayland Compositor. The module makes it very easy to create your own Wayland Compositor. This is especially useful for embedded devices that require multi process support. The module has existed as unsupported technology for some time, but has had issues in both the API and implementation. With Qt 5.7, we’ve invested a lot of time and effort to clean up implementation and stabilize the API. It now comes with a full QML API and an improved C++ API with a lot of convenience. We also added a convenience API to create Wayland extensions and use them from both QML and C++. You can read more about it from the blog post from Paul.

    The next new module is Qt SCXML. It’s a completely new module that makes it very easy to integrate SCXML based state machines into Qt. It builds directly on top of the Qt Statemachine framework and extends it with with both a SCXML to C++ compiler and a runtime that allows loading SCXML based state machines.

    Qt Gamepad is another nice small addition. It makes it possible to ingrate gamepad support into both C++ and QML applications. It currently supports Windows, Linux, Android and iOS.

    With Qt for Device Creation, we’re also introducing the first preview of Qt-based Over-the-Air (OTA) updates mechanism. For an overview of this crucial IoT-technology, please see the blog post from Gatis.

    Finally, Qt 5.7 also includes a technology preview of the new Qt SerialBus module that allows you to use Qt APIs for device bus communications and protocols. It’s a generic API, but with this version it includes implementations for CAN and Modbus.

    Go and get it

    Finally, I’d like to give my thanks to everybody who has helped create this release. Again, a special thanks goes to KDAB for its tremendous work on Qt 3D.

    You can get Qt 5.7 from your Qt Account or the download page on qt.io.

    For an overview of the Qt 5.7, you can take a look at the release page, or for more details check the change files and known issues.

    Enjoy the release and have a great, Qt-filled summer!



  • 谢谢realfan大大的分享~~~



  • @realfan 有没有网盘分流?

    我要 window + android 的。


Log in to reply
 

最近的回复

  • 在USD安装好之后,我们就要研究如何编写USDView的插件了,因为我们的二次开发功能都是在USD上做的,所以我们要理解USDView的各种机制才能够达到我们研发的目标。这里介绍一下如何编写USDView的插件。

    USDView是USD项目中比较重量级的应用了,基于Qt(PySide,PySide2)和PyOpenGL的应用。底层渲染依然是Hydra。这是一款渲染影视的渲染框架。后端可以接入OpenGL以及英特尔提出的Embree。它在设计的时候也预留了插件的功能。它在官网有详细的教程解释。

    插件本身

    这里我在Linux下演示如何载入USDView的插件。我写好了一个USDView的插件,名叫TutorialPlugin。它由三个插件组成的:

    tutorialPlugin ├── __init__.py ├── plugInfo.json └── printer.py

    写法和官网的一致。这里我贴出来吧。
    init.py

    from pxr import Tf from pxr.Usdviewq.plugin import PluginContainer import printer class TutorialPluginContainer(PluginContainer): def registerPlugins(self, plugRegistry, usdviewApi): self._printMessage = plugRegistry.registerCommandPlugin( "TutorialPluginContainer.printMessage", "Print Message", printer.printMessage ) def configureView(self, plugRegistry, plugUIBuilder): tutMenu = plugUIBuilder.findOrCreateMenu("Tutorial") tutMenu.addItem(self._printMessage) Tf.Type.Define(TutorialPluginContainer)

    painter.py

    print("Imported printer!") def printMessage(usdviewApi): print("Hello, World!")

    plugInfo.py文件在Windows测试中,使用pluginfo.py也能被认识。果然Linux是大小写敏感的,Windows并不敏感。

    { "Plugins": [ { "Type": "python", "Name": "tutorialPlugin", "Info": { "Types": { "tutorialPlugin.TutorialPluginContainer": { "bases": ["pxr.Usdviewq.plugin.PluginContainer"], "displayName": "Usdview Tutorial Plugin" } } } } ] }

    最后就是自己编写USDView调用的脚本了。因为是Linux,所以脚本是Shell脚本。内容大概是这样的:

    #!/bin/sh export LD_LIBRARY_PATH=/usr/local/USD/lib64:$LD_LIBRARY_PATH export PYTHONPATH=$PYTHONPATH:/usr/local/USD/lib/python # 这里非常重要,目的是设置usdView的环境变量,让usdView能够顺利地载入插件 currentDir=$(cd `dirname $0`; pwd) export PXR_PLUGINPATH_NAME=$currentDir/tutorialPlugin /usr/local/USD/bin/usdview $currentDir/model/7_29_1.usda

    比较重要的是设置PXR_PLUGINPATH_NAME变量。为的是让USDView顺利地找到插件位置。大家也可以设置TF_DEBUG为PLUG_SEARCH_INFO来检查当PXR_PLUGINPATH_NAME变量设置了以后,究竟有哪些插件得到了载入。
    给一个效果图:
    21d97c31-58ef-41ed-92c3-c27aff391dcc-image.png ![0_1573535993045_在Linux运行带有插件的USDView.gif](正在上传 93%)

    注意其中Tutorial菜单,这就是我们载入的插件。
    如果你对我分享的资产、插件或者是脚本感兴趣,可以加入我创建的小组,在文件分享里找到它。
    上海USD研究小组

    read more
  • 就在不久前我分享了USD在Windows上的构建方法,其实我也一直没有放弃在开发领域最擅长的Linux中构建USD。不过,在Linux中要成功地构建USD,比Windows的要难不少。尤其是各种麻烦的依赖库,仍然要解决才行。之前一直在CentOS 7构建,没有成功,而且CentOS构建的话,相关的资料更少,坑更多,而Deepin是国产的Linux桌面系统,友好一些,这样可以少一些困难。目前成功地在Deepin Linux上顺利地编译成功了。

    那么,咱们开始在Linux构建USD吧。

    测试并且安装Python

    有些Linux发行版,默认安装了Python,有的则没。如果你安装了Python,可以测试一下,命令是:

    python --version

    如果报错,那么使用apt安装吧。

    sudo apt install python

    为了安装PyOpenGL等库,还是推荐安装pip。有关安装pip的资料还是挺多的,pip类似npm,是一个包管理器,非常方便,推荐安装。这里有一个获取pip的脚本。我发出来。获取pip的命令是:

    python -m get-pip.py

    拿到USD的代码

    毕竟是在github中获取的USD代码,那么最好安装git,并且设置github的账户以及公钥。然后熟练利用git命令进行如下的操作:

    git clone https://github.com/PixarAnimationStudios/USD

    获取USD依赖的库

    由于依然在github上获取相关的库,获取库的速度大家都知道比较慢,于是我将库上传到我创建的USD小组里了,大家感兴趣的话,可以加入这个QQ群(小组),获取相关的库,然后解压之。
    上海USD小组

    获取USD其它的依赖(包括cmake)

    由于Linux开源的特性,很多底层的库都要到包管理器中寻找,如果编译出错了。记得勤用apt来搜索相关的库。命令是:

    apt search cmake
    pip install pyside2

    值得注意的是,USD在19.11的时候,明确说不支持cmake2了,看来大家要在apt中安装cmake3了。

    编译

    USD在Linux的编译和Windows的差不多,差别在于一个是用Shell脚本,另外一个是用bat脚本。这里我将Shell脚本贴出来给大家参考:

    #!/bin/sh # 最后构建USD项目 baseDir=${baseDir:=$(cd `dirname $0`; pwd)} echo $baseDir pushd $baseDir sudo python $baseDir/USD/build_scripts/build_usd.py -j 4 -v --python --build-args=USD,"-DPYSIDE_USE_PYSIDE2=TRUE -DPYSIDE_BIN_DIR=/usr/local/lib/python2.7/dist-packages/PySide2 -DBOOST_LIBRARYDIR=" /usr/local/USD popd 编译可能遇到的问题 权限问题。这个是最常见的了。Windows的权限问题没有那么严重,而Linux是权限everywhere。于是安装USD的时候,它推荐的位置是/usr/local/USD,这个地方是要权限的。所以记得用sudo,没有设置密码的赶紧用passwd root设置密码了。 遇到找不到编译器的问题。很简单,没有安装编译器呗。Linux默认编译器是g++,所以一定要执行

    sudo apt install g++

    这样才能够解决找不到编译器的问题。同样的,如果想要以后对USD进行调试,那么gdb也是必不可少的,推荐一同安装。

    编译完成

    如果你到了这一步,那么非常恭喜,你已经克服了超多的难关,到达了胜利的彼岸。但是不是要测试一下是否成功地运行了USD呢?我们还是要运行一下USDView来测试一下的嘛。于是我们还是要写一段shell脚本来测试USDView的运行情况:

    #!/bin/sh export LD_LIBRARY_PATH=/usr/local/USD/lib64:$LD_LIBRARY_PATH export PYTHONPATH=$PYTHONPATH:/usr/local/USD/lib/python /usr/local/USD/bin/usdview /media/jiangyimin/Data/models/UsdSkelExamples/HumanFemale/HumanFemale.walk.usd

    由于要寻找库的路径,因此记得及时设置LD_LIBRARY_PATH环境变量。如果一切顺利的话,那么会出现这样的效果:Linux运行USDView

    read more
  • 记住了哦,USD不是咱们所说的美元哦,是迪士尼皮克斯工作室推出的一款动画全流程的工具,简单地说,是用来串流程的,USD的使用借鉴了脚本编程的一些思想,让动画的资产变得可配置,也变得可维护。让同时其提出的几个工具,使得它变成一个较为完整的工具链。
    USD的官方网站(开源)在这里。

    https://openusd.org

    接下来我将告诉大家如何在Windows下构建USD。

    安装Python

    首先呢,是安装USD的依赖项。USD的依赖项挺多,最重要的是Python,因为USD的构建脚本就是用Python写的。所以去Python官网下载Python吧,目前测试成功的是Python2.7。当然你也可以安装Python 3.5,只是我没有测试过,不清楚是否可用。Python的下载地址是:

    https://www.python.org/downloads

    一般来说,安装好了Python,它会给你设置环境变量,或者有一些教程让你们设定环境变量,不过呢,这里我不建议设定环境变量,这样让我们的所有软件运行环境都污染了(可能没有什么事),之后我会写一个脚本来教大家如何书写批处理来让简化操作,真正做到“即用即走”。

    下载Visual Studio 2017

    这不用强调了吧。目前VS2017是必备的软件了,而且有免费社区版,再也不用破解了,赶紧下载一个。安装在合适的位置就好了。

    安装Maya 2018

    一般来说,Maya每年都有发布一个版本,但是2018的格外稳定,推荐安装。为什么要安装Maya呢?因为Maya是一款几乎全能的DCC,可以导出很多模型到USD中,所以USD顺便构建了Maya的插件(这个插件名字叫usdMaya,不过核心代码转到了Autodesk里了,详见https://github.com/Autodesk/maya-usd,此插件除了PXR的USD,还有AL的USD),我也将Maya 2018放在了我们讨论小组群中,大家可以下载。
    USD研究小组.jpg
    我将Maya 2018安装到D:\Develop\Autodesk\Maya2018中。

    安装USD的其余依赖项

    由于USD的python脚本会使用curl或者是powershell的下载功能进行下载,但是由于很多依赖项是从github下载的,下载速度实在是太慢了,所以我将其余的依赖项打包好了,放在USD_dependencies文件夹中,供需要的朋友下载。USD的依赖项已经上传到我们讨论小组群群里了,大家可以下载。
    USD研究小组.jpg

    编写构建USD的脚本

    我的USD安装的位置是D:\Develop\USD,打算安装的位置是D:\Develop\USD_build_19_11,根据这两个路径开始编写构建USD的脚本:

    :: 构建USD的脚本 :: 设置编译器的很多环境变量 set Path=D:\Develop\Python27;^ D:\Develop\Python27\Scripts;^ D:\Develop\NASM;^ D:\Develop\Autodesk\Maya2018\bin;^ D:\Develop\cmake\bin;^ %Path% set PYTHONPATH=%PYTHONPATH%;D:\Develop\Autodesk\Maya2018\Python\Lib\site-packages;D:\Develop\Autodesk\Maya2018\Python\Lib\site-packages :: 复制pyside2-uic到pyside-uic.exe 中,使其造成能够找到pyside2-uic.exe的假象 copy D:\Develop\Autodesk\Maya2018\bin\pyside2-uic D:\Develop\Autodesk\Maya2018\bin\pyside2-uic.exe :: 使用pip安装PyOpenGL pip install PyOpenGL :: 复制本地build_usd_local.bat 到 目标的路径上 copy /Y %cd%\build_usd_local.py D:\Develop\USD\build_scripts call D:\Develop\VS2017\VC\Auxiliary\Build\vcvars64.bat :: 最后构建USD项目 python D:\Develop\USD\build_scripts\build_usd_local.py ^ -j4 ^ --build-args "USD,-DPYSIDE_USE_PYSIDE2=TRUE -DPYSIDE_BIN_DIR=D:\Develop\Autodesk\Maya2018\bin" ^ --maya --maya-location "D:\Develop\Autodesk\Maya2018\bin" ^ --materialx ^ D:\Develop\USD_build_19_11 :: 最后删除build_usd_local文件 del D:\Develop\USD\build_scripts\build_usd_local.py pause

    大家成功了吗?肯定有遇到很多问题,包括我遇到的一直卡住的Boost编译问题。大家遇到什么编译问题,可以在此留言,我会尽可能回答大家问题。

    成功编译USD后,可以编写插件来试试USDView,大家可以试试看吧,不过仍然要设置环境变量。USDView运行的脚本如下:

    set Path=^ D:\Develop\Python27;^ D:\Develop\USD_Build\lib;^ D:\Develop\USD_Build\bin;^ D:\Develop\USD_Build\third_party\maya\lib;^ D:\Develop\Autodesk\Maya2018\bin;^ %Path% set MAYA_PLUG_IN_PATH=%MAYA_PLUG_IN_PATH%;^ D:\Develop\USD_Build\third_party\maya\plugin set PYTHONPATH=%PYTHONPATH%;^ D:\Develop\USD_Build\lib\python;^ D:\Develop\Autodesk\Maya2018\Python\Lib\site-packages set MAYA_SCRIPT_PATH=%MAYA_SCRIPT_PATH%;^ D:\Develop\USD_Build\third_party\maya\lib\usd\usdMaya\resources;^ D:\Develop\USD_Build\third_party\maya\plugin\pxrUsdPreviewSurface\resources set XBMLANGPATH=%XBMLANGPATH%;^ D:\Develop\USD_Build\third_party\maya\lib\usd\usdMaya\resources @python "D:\Develop\USD_Build\bin\usdview" %cd%\7_29_1.usda

    USDView运行的截图是这样的:
    USDView运行效果

    看到最终结果,还是很有成就感的。

    read more
  • @天幸健 要么程序一启动就camera.start(),然后再camera.stop(),接着需要的时候再camera.start()。

    read more

关注我们

微博
QQ群