I think it\'s unreasonable for a library to require preprocessing of my source code with a special tool. That said, several people have recommended the Qt library to me for cros
Using Qt while avoiding moc
will be more difficult than just using them together as intended. You will also sacrifice most of the interesting features that motivated others to recommend Qt.
Without moc
you can't
If you want to use Qt, use moc
. In fact, don't even worry about moc
-- just use QMake. You can write a QMake .pro file that looks like this:
TARGET = myApp
FORMS += MainWindow.ui
HEADERS += MainWindow.h
SOURCES += MainWindow.cpp
SOURCES += main.cpp
Everything will be taken care of automatically. Or you can spend all your time trying to figure out how to avoid moc
.
See https://doc.qt.io/archives/qt-4.7/metaobjects.html and https://doc.qt.io/archives/qt-4.7/moc.html#moc