Important: Please read the Qt Code of Conduct -

How to use custom imports/modules in qbs

  • Hi
    I'm trying to learn qbs because I think it's pretty decent. But I can't understand some thing ore there is some inconsistency.

    When I use import from qbs library I must import the directory which contain the import. For example if I want to use CppApplication I must import qbs.base or just qbs

    import qbs //valid
    import qbs.base //valid

    (qbs is parent directory of base in /usr/share/qtcreator/qbs/share/qbs/imports/qbs/)
    But if I want to import my own import from /home/kalin/projects/QBS_test/Helpers/imports/myimport/something/
    I must import it like that

    import myimport.something //valid
    import myimport // not valid 
    import something //not valid

    and using it like that


    Which for me is some kind of inconsistent.
    Can someone explain

Log in to reply