Important: Please read the Qt Code of Conduct -

How to customise Qt5's search paths (on OSX)?

  • Hi,

    I would like to customise Qt5's search paths in such a way that my Qt5 installation on OSX will use special absolute paths within a user-definable prefix in order to set up a "CI system for KF5":

    Using the following two configure options I tell the build system which paths should be used:

    -DDATA_INSTALL_DIR="Library/Application Support"@

    and then on OSX some application-specific files would be searched by Qt below

    /Library/Application\ Support/@

    BUT - I would like to tell my Qt5 during its installation that it should use another prefix like

    /opt/kdeci/inst/Library/Application\ Support/@

    How could something like that be achieved?

    Is there any way to configure Qt5 to allow for that during build time


    would the Qt5 sources themselves need some patching for QStandardPaths as suggested by "this review for Windows":


  • You can use QApplication::addLibraryPath() or QApplication::setLibraryPaths() for set custom paths.

  • thanks alex for that hint. I wonder whether there are similar functions for the the other relevant folders...

    Good to know that those two exist. Will check on that.

    THANKS big time!

Log in to reply