Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QBS and ui in StaticLibrary
Qt 6.11 is out! See what's new in the release blog

QBS and ui in StaticLibrary

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    johngull
    wrote on last edited by
    #1

    Hello,

    I'm trying to move quite big project to qbs. And we have library with a self-made widget inside.
    Problem that in header of this widget we have
    @#include "ui_SomeWidget.h"@

    and when we then include this widget from main project, compiler can't find ui_*.h files. And thats correct because this files are inside "GeneratedFiles"
    So, what i want to do is to export this path as includePaths from StaticLibrary, something like
    @Export {
    Depends { name: "cpp" }
    cpp.includePaths: project.AllincludePathes
    }@

    But i can't find what should i say as value for cpp.includePaths.
    Any help and tips highly appreciated.

    Thank you.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      johngull
      wrote on last edited by
      #2

      Ok, i found working solution:
      @Export {
      Depends { name: "cpp" }
      cpp.includePaths: product.buildDirectory + "/GeneratedFiles/" + product.name
      }@

      But it is looks ugly, because of hardcoded "GeneratedFiles".
      Does anybody know better way?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved