Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open include file: 'QPrintPreviewWidget': No such file or directory #48

Closed
schlenger opened this issue Oct 16, 2020 · 6 comments
Closed
Assignees
Labels

Comments

@schlenger
Copy link

It seems like the import changed with the newer Qt versions: When embedding the library, the error from above is shown. Changing the import to #include <QtPrintSupport/QPrintPreviewWidget> worked for me, but I don't know if it's the best solution.

E.g. this change solved my issue: master...schlenger:qt_print_support_fix

@jkriege2
Copy link
Owner

Hi!

which build-environment do you use? (Qt-Version, Compiler, OS, QMake/CMake)? ... Since I didn't see that problem until now ... I teste with up to Qt 5.15.

Note that Qt6 is not (yet?) supported!

Best,
JAN

@jkriege2
Copy link
Owner

I poked around a bit on the internet:

So could you let me know some more details about your build system?

@schlenger
Copy link
Author

Hi,

@jkriege2 thanks you for your answer. I tried the official Qt recommendation before I opened this ticket, but, it didn't worked out for me.

I'm currently building on Windows with the default Qt installation, version notes:

Qt Creator 4.13.0
Based on Qt 5.15.0 (MSVC 2019, 64 bit)

Built on Aug 25 2020 10:06:59

on

Windows 10 Pro
Version	10.0.18362 Build 18362

If this only affects me, you can also close the issue. I thought maybe someone else is experiencing the same issues.

Side note: Thank you for your awesome work, the plotter with all the examples is a really neat piece of work!

@jkriege2
Copy link
Owner

Hi!

could you try and add these two lines to lib\jkqtplotter\CMakeLists.txt

get_target_property(printsupp_inc Qt5::PrintSupport INTERFACE_INCLUDE_DIRECTORIES)
message("Qt5::PrintSupport::INTERFACE_INCLUDE_DIRECTORIES = ${printsupp_inc}")

... and check the output? I did a quick test with Qt 5.14, MSVC2017-64bit ... and for me it reads

Qt5::PrintSupport::INTERFACE_INCLUDE_DIRECTORIES = C:/development/Qt/5.13.2/msvc2017_64/include/;C:/development/Qt/5.13.2/msvc2017_64/include/QtPrintSupport

which should allow for writing #include

... or do you use QMake for building?

@jkriege2
Copy link
Owner

Hmmm ... I also checked with Qt 5.15.0/MSVC2019 ... and for me it works. Could you try my suggestion from above?

@jkriege2
Copy link
Owner

should be fixed via cc6a87c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants