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

Compilation error in class LightingWidget #147

Closed
wants to merge 1 commit into from
Closed

Compilation error in class LightingWidget #147

wants to merge 1 commit into from

Conversation

colingeniet
Copy link

I have the following error when compiling under Linux:

src/ui/widgets/lightingwidget.cpp:72:76: error: incomplete type ‘QAction’ used in nested name specifier
  connect( ui->btnLighting, &QToolButton::toggled, atns.value(3), &QAction::setEnabled );
                                                                            ^~~~~~~~~~

The proposed change fixes it for me, and the program compiles and runs correctly (although I did not do any in depth tests).

Replace abstract class declaration 'class QAction' with
'#include <QAction>'.
This fixes the compilation error:
"incomplete type ‘QAction’ used in nested name specifier"
@hexabits
Copy link
Member

hexabits commented Aug 8, 2018

You're not specifying what Qt version you're targeting. The current branch compiles just fine under Linux. Both on Travis CI and in my VM with Ubuntu.

https://travis-ci.org/niftools/nifskope/jobs/345104342
https://travis-ci.org/niftools/nifskope/jobs/345104344

If you're using something like Qt 5.10 or Qt 5.11, NifSkope doesn't support these versions yet and that's intentional and due to things other than compile errors.

@hexabits
Copy link
Member

hexabits commented Aug 8, 2018

Actually, this error may be down to your GCC version, which may or may not be indirectly related to what Qt version you chose. I'd need to know what GCC version you're using as well.

@colingeniet
Copy link
Author

colingeniet commented Aug 8, 2018

It is Qt 5.11 indeed, I did not notice that it is not supported.
GCC version is 8.2.0.

@hexabits
Copy link
Member

hexabits commented Aug 8, 2018

OK well it's likely the GCC version of 8.2 though, being stricter about forward declarations or something. I will look into it. Is the precompiled binary for 5.11 on Linux actually using GCC 8.2 or did you compile Qt yourself with 8.2?

Because even if you downgraded to Qt 5.7, and compiled that with 8.2 you still may get the error.

I will try to sort out the issues keeping me from using 5.10/5.11 on Windows soon enough, and then that will lead to me attempting to compile on Ubuntu with 5.11 as well.

Looking here though, https://doc.qt.io/qt-5.11/supported-platforms-and-configurations.html, the highest GCC I see that is listed as supported is GCC 7, so you may just want to downgrade your GCC version anyway and I assume then you compiled Qt yourself.

@JayFoxRox
Copy link

Same issue on linux, gcc (GCC) 8.3.0 and Qt 5.12.3

The proposed change prevents this issue.

@hexabits
Copy link
Member

hexabits commented Sep 4, 2023

I've handled this on my dev8 branch as part of #230 so I'm closing this, after 5 years. 🤡

@hexabits hexabits closed this Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants