Skip to content

Demo Qt Quick application for use with linuxdeployqt

License

Notifications You must be signed in to change notification settings

linuxdeploy/QtQuickApp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtQuickApp Build Status

Demo Qt Quick application for use with linuxdeployqt.

Application icon

The application icon has been set in main.cpp like this:

QFileInfo fi(app.applicationDirPath() + "/../share/pixmaps/qtquickapp.png");
QGuiApplication::setWindowIcon(QIcon(fi.absoluteFilePath()));

Note that absoluteFilePath must be used, otherwise it will not work on Ubuntu Unity.

Installability

In order to make it easier for linuxdeployqt to generate an AppImage, icon and desktop files have been added and have been configured in QtQuickApp.pro like this:

unix {
    isEmpty(PREFIX) {
        PREFIX = /usr
    }

    target.path = $$PREFIX/bin

    shortcutfiles.files = qtquickapp.desktop
    shortcutfiles.path = $$PREFIX/share/applications/
    data.files += qtquickapp.png
    data.path = $$PREFIX/share/pixmaps/

    INSTALLS += shortcutfiles
    INSTALLS += data
}

INSTALLS += target

DISTFILES += \
    qtquickapp.desktop \
    qtquickapp.png

Note that the word release was added to the line

CONFIG += c++11 release

in the same file, so that the release configuration gets built.

This allows for the application to be installed with make install, and for linuxdeployqt to generate an AppImage.

Generating an AppImage

See .travis.yml for how to compile the application on Travis CI, generate an AppImage, and upload it to transfer.sh.

If you rather would not like to use Travis CI, you should be able to use the same commands on a local Ubuntu trusty machine.

About

Demo Qt Quick application for use with linuxdeployqt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 54.0%
  • CMake 16.5%
  • QML 13.6%
  • QMake 9.6%
  • C++ 6.3%