I was trying to use this code on a Mac (m1) qt 6.7;
But at run-time was getting a nasty crash.
The solution (for me) was in the PRO file
Mine looks like this now
QT += core gui multimedia
Note - I have removed printer support
And I added a DEFINES
DEFINES += QT_NO_PRINTER
In case there still is confusion - this is the entire .PRO defintion
QT += core gui multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
SOURCES += \
qcustomplot.cpp \
main.cpp \
mainwindow.cpp \
wavfft.cpp
HEADERS += \
qcustomplot.h \
mainwindow.h \
wavfft.h
FORMS += \
mainwindow.ui
INCLUDEPATH += /usr/local/include
LIBS += -L /usr/local/lib/ -lfftw3
DEFINES += QT_NO_PRINTER
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
resource.qrc
Hope that assists someone