Hi, Adjust your CMakeLists.txt to contain something like
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) find_package(Qt6 REQUIRED COMPONENTS QuickPrivate) target_link_libraries(YourTarget PRIVATE Qt6::GuiPrivate Qt6::QuickPrivate) If your project has multiple targets (executables, libraries), you should add such a target_link_libraries call to each of them that use the specific private headers. > On 2. Oct 2025, at 14:04, Nuno Santos via Interest <[email protected]> > wrote: > > Marius, > > Thanks for your reply. > > Can you please share a snippet on how to import it properly? > > I’m still adapting to CMake. > > Thanks! > > Regards, > > Nuno > >> On 2 Oct 2025, at 12:57, Marius Kittler <[email protected]> wrote: >> >> Hi, >> >>> Has anyone been faced with similar problems? >> >> I don't have any problems using private headers when compiling for Android >> on >> a recent dev build of Qt. I can only tell you that the way you're adding >> header search paths for private Qt modules is probably not how it is >> supposed >> to be done. Just use the target of private modules in the same way you would >> add the target of regular modules, so e.g. use CorePrivate just like you add >> Core. Also, avoid altering the global build env with functions like >> include_directories and set target properties instead. >> >> Regards, >> Marius_______________________________________________ >> Interest mailing list >> [email protected] >> https://lists.qt-project.org/listinfo/interest > > _______________________________________________ > Interest mailing list > [email protected] > https://lists.qt-project.org/listinfo/interest _______________________________________________ Interest mailing list [email protected] https://lists.qt-project.org/listinfo/interest
