[Interest] Include error in a ui generated code

Andreas Pakulat apaku at gmx.de
Fri Apr 17 14:24:12 CEST 2015


Hi,

On Fri, Apr 17, 2015 at 10:35 AM, Etienne Sandré-Chardonnal <
etienne.sandre at m4x.org> wrote:

> Dear all,
>
> I'm struggling with this compilation error since this morning:
>
> ui_mainwindow.h:13: error: QtGui/QAction: No such file or directory
> #include <QtGui/QAction>
>
> As the file name suggests, this is a header generated by qmake from a .ui
> The QAction header is in QWidgets and not in QtGui, so the error is clear.
>
> What I did:
>  - This is a project ported from Qt4
>  - I did add "QT += gui widgets" in the .pro
>  - I did delete the old build directory so that Qt5 re-generates all files
>
>
> Any idea? Could it be that the .ui needs manual fix?
>

The header is generated by uic, so either its not run at all because the
header is still there or the wrong uic is run. I'd start with a fresh empty
directory, copy a freshly extracted version of the software into that
directory so there cannot be any hidden directories with cached files and
then ensure that PATH does not contain any qt4 binary, in particular not
uic, qmake, moc or rcc. If that works then you'll most likely find some
screwup in your environment or some leftovers still in your original
project directory. If it still fails I'd check what the Makefile contains
for uic invocation and what version that is. if its qt4 but inside a qt5
install I'd reinstall qt5.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150417/c5aa2089/attachment.html>


More information about the Interest mailing list