%general-entities; ]> $LastChangedBy$ $Date$ Qt-&qt5-version; Qt Introduction to Qt5 Qt5 is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt5 is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for servers. &lfs75_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &qt5-md5sum; Download size: &qt5-size; Estimated disk space required: &qt5-buildsize; Estimated build time: &qt5-time; Qt5 Dependencies Required , , , , , and Recommended , , , , , , , , , , , , , and Optional , (QtWebKit HTML5 Video Support), (GTK+ Theme Support), IBus, libxkbcommon, or , , , and User Notes: Installation of Qt5 If you did not install some of the recommended dependencies, examine ./configure --help output to check how to disable them or use internal versions bundled in the source tarball. If Qt5 is being reinstalled into the same directory as an existing instance, run the following commands from a console or non-Qt5 based window manager. It overwrites Qt5 libraries that should not be in use during the install process. Method 1: Installing in /usr Install Qt5 by running the following commands: export QT5LINK=/usr ./configure -prefix /usr \ -sysconfdir /etc/xdg \ -bindir /usr/bin \ -headerdir /usr/include/qt5 \ -archdatadir /usr/lib/qt5 \ -datadir /usr/share/qt5 \ -docdir /usr/share/doc/qt5 \ -translationdir /usr/share/qt5/translations \ -examplesdir /usr/share/doc/qt5/examples \ -confirm-license \ -opensource \ -dbus-linked \ -openssl-linked \ -system-sqlite \ -no-nis \ -nomake examples \ -opengl es2 \ -optimized-qmake && make This package does not come with a test suite. Remove references to the build directory from the .pc files by running the following command: find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \; Now, as the root user: make install Remove references to the build directory from installed files by running the following commands as the root user: sed -e "s:$PWD/qtbase:/usr/lib/qt5:g" \ -i /usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri && find /usr/lib/lib{qgsttools_p,Qt5*}.prl -exec sed -i -r \ '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' {} \; Method 2: Installing in /opt/qt-&qt5-version; This section provides for installing Qt4 almost all of the files in the /opt directory. export QT5DIR=/opt/qt-&qt5-version; && export QT5LINK=/opt/qt5 && ./configure -prefix $QT5DIR \ -sysconfdir /etc/xdg \ -confirm-license \ -opensource \ -dbus-linked \ -openssl-linked \ -system-sqlite \ -no-nis \ -nomake examples \ -opengl es2 \ -optimized-qmake && make Now, as the root user: make install && ln -svfn $QT5DIR /opt/qt5 Remove references to the build directory from installed files by running the following commands as the root user: find $QT5DIR -name qt_lib_bootstrap_private.pri \ -exec sed -i -e "s:$PWD/qtbase:/$QT5DIR/lib/:g" {} \; && find $QT5DIR -name \*.prl \ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; Continuing for Both Methods For all methods, install images and create the menu entries for installed applications. Be sure that the QT5LINK variable is defined in root's environment and as the root user: install -v -dm755 /usr/share/pixmaps/ && install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \ /usr/share/pixmaps/assistant-qt5.png && install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \ /usr/share/pixmaps/designer-qt5.png && install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \ /usr/share/pixmaps/linguist-qt5.png && install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \ /usr/share/pixmaps/qdbusviewer-qt5.png && install -dm755 /usr/share/applications && cat > /usr/share/applications/assistant-qt5.desktop << EOF [Desktop Entry] Name=Qt5 Assistant Comment=Shows Qt5 documentation and examples Exec=$QT5LINK/bin/assistant Icon=assistant-qt5.png Terminal=false Encoding=UTF-8 Type=Application Categories=Qt;Development;Documentation; EOF cat > /usr/share/applications/designer-qt5.desktop << EOF [Desktop Entry] Name=Qt5 Designer GenericName=Interface Designer Comment=Design GUIs for Qt5 applications Exec=$QT5LINK/bin/designer Icon=designer-qt5.png MimeType=application/x-designer; Terminal=false Encoding=UTF-8 Type=Application Categories=Qt;Development; EOF cat > /usr/share/applications/linguist-qt5.desktop << EOF [Desktop Entry] Name=Qt5 Linguist Comment=Add translations to Qt5 applications Exec=$QT5LINK/bin/linguist Icon=linguist-qt5.png MimeType=text/vnd.trolltech.linguist;application/x-linguist; Terminal=false Encoding=UTF-8 Type=Application Categories=Qt;Development; EOF cat > /usr/share/applications/qdbusviewer-qt5.desktop << EOF [Desktop Entry] Name=Qt5 QDbusViewer GenericName=D-Bus Debugger Comment=Debug D-Bus applications Exec=$QT5LINK/bin/qdbusviewer Icon=qdbusviewer-qt5.png Terminal=false Encoding=UTF-8 Type=Application Categories=Qt;Development;Debugger; EOF Command Explanations sed -e "..." -e "..." -i ...: This command fixes detection of libmng 2.0. -confirm-license: Accept license without prompting user during configuration. -opensource: Install the opensource version of Qt. -release: This switch disables building with debugging symbols. -nomake examples: This switch disables building of the example programs included in the source tarball. Remove it if you want to build them. -system-harfbuzz: This switch enables use of the system version of Harfbuzz which fixes some font rendering issues in Qt5 applications. -system-sqlite: This switch enables use of the system version of SQLite. -no-nis: This switch disables support for Network Information Service (NIS) which has been removed from recent versions of Glibc. -dbus-linkend -openssl-linkend: These switches enable explicit linking of the D-Bus and OpenSSL libraries into Qt5 libraries instead of dlopen()-ing them. -opengl es2: This switch enables OpenGL ES2 support in Qt5. -optimized-qmake: This switch enables building of the optimized qmake program. Configuring Qt5 Configuration Information Create the menu entries for installed applications by running the following commands root user: If you installed Qt5 in /usr, create an environment variable needed by certain packages. As the root user: cat > /etc/profile.d/qt5.sh << EOF # Begin /etc/profile.d/qt5.sh QT5DIR=/usr export QT5DIR # End /etc/profile.d/qt5.sh EOF If you installed Qt5 in a location other than /usr, you need to update the following configuration files so that Qt5 is correctly found by other packages and system processes. As the root user, update the /etc/ld.so.conf file and the dynamic linker's run-time cache file: cat >> /etc/ld.so.conf << EOF # Begin Qt addition /opt/qt5/lib # End Qt addition EOF ldconfig /etc/ld.so.conf As the root user, create the /etc/profile.d/qt5.sh file: cat > /etc/profile.d/qt5.sh << EOF # Begin /etc/profile.d/qt5.sh QT5DIR=/opt/qt5 pathappend /opt/qt5/bin PATH pathappend /opt/qt5/lib/pkgconfig PKG_CONFIG_PATH export QT5DIR # End /etc/profile.d/qt5.sh EOF Contents Installed Programs Installed Libraries Installed Directories assistant, designer, lconvert, linguist, lrelease, lupdate, moc, pixeltool, qcollectiongenerator, qdbuscpp2xml, qdbus, qdbusviewer, qdbusxml2cpp, qdoc, qhelpconverter, qhelpgenerator, qmake, qml1plugindump, qmlbundle, qmlimportscanner, qmlmin, qmlplugindump, qmlprofiler, qml, qmlscene, qmltestrunner, qmlviewer, qtpaths, rcc, syncqt.pl, uic, xmlpatterns, and xmlpatternsvalidator libqgsttools_p.so, libQt5Bluetooth.so, libQt5Bootstrap.a, libQt5CLucene.so, libQt5Concurrent.so, libQt5Core.so, libQt5DBus.so, libQt5Declarative.so, libQt5DesignerComponents.so, libQt5Designer.so, libQt5Gui.so, libQt5Help.so, libQt5MultimediaQuick_p.so, libQt5Multimedia.so, libQt5MultimediaWidgets.so, libQt5Network.so, libQt5Nfc.so, libQt5OpenGLExtensions.a, libQt5OpenGL.so, libQt5PlatformSupport.a, libQt5Positioning.so, libQt5PrintSupport.so, libQt5QmlDevTools.a, libQt5Qml.so, libQt5QuickParticles.so, libQt5Quick.so, libQt5QuickTest.so, libQt5Script.so, libQt5ScriptTools.so, libQt5Sensors.so, libQt5SerialPort.so, libQt5Sql.so, libQt5Svg.so, libQt5Test.so, libQt5UiTools.a, libQt5WebKit.so, libQt5WebKitWidgets.so, libQt5Widgets.so, libQt5X11Extras.so, libQt5XmlPatterns.so, and libQt5Xml.so /usr/include/qt5, /usr/lib/qt5, /usr/share/doc/qt5, and /usr/share/qt5 OR /opt/qt5 and /opt/qt-&qt5-version; Short Descriptions assistant is a tool for presenting on-line documentation. assistant designer is a full-fledged GUI builder. It includes powerful features such as preview mode, automatic widget layout, support for custom widgets, and an advanced property editor. designer linguist provides support for translating applications into local languages. linguist lrelease is a simple command line tool. It reads a Qt project file and produces message files used by the application. lrelease lupdate reads a Qt project file, finds the translatable strings in the specified source, header and Qt Designer interface files, and produces or updates the translation files listed in the project file. lupdate moc generates Qt meta object support code. moc pixeltool is a desktop magnifier and as you move your mouse around the screen it will show the magnified contents in its window. pixeltool qmake uses information stored in project files to determine what should go in the makefiles it generates. qmake rcc is a resource compiler used in conjunction with designer. rcc uic is a Qt user interface compiler. uic