Header file not found
-
In the latest version of QtCreator, I used add new to create a class, both header and sources files were created. I promoted a Widget in Design to the new class, renamed and checked autoFill Background. Then when I started to add
ui->canvas->setBackgroundRole(QPalette::Base);
I see the message canvas.h not found.An aside, one note also about the editor: I found using ui. and having the editor change it to ui-> very helpful, but that has been removed.
How do I get a header file, that was created by Qt, found?
-
I think it's a regression in Qt Creator 8. Please open a bug report at https://bugreports.qt.io/
Thank you.
-
@ofmrew I forgot to ass additional information:
QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
You can make your code fail to compile if it uses deprecated APIs.
In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES +=
main.cpp
mainwindow.cpp
mycanas.cppHEADERS +=
mainwindow.h
mycanas.hFORMS +=
mainwindow.uiDefault rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target{noformat}
Qt 6.3.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.3.1 20210422 (Red Hat 10.3.1-1)) on "xcb"
OS: Linux Mint 20.1 [linux version 5.4.0-58-generic]Kit compiler Desktop qt 6.3.1 GCC 64bit