QT 5.0 QDebug compilation error

前端 未结 3 2036
无人及你
无人及你 2021-01-11 15:58

I am having trouble compiling my code with QDebug, but i really need it.

#include 
#include 
int main(int argc, char          


        
3条回答
  •  独厮守ぢ
    2021-01-11 16:36

    The problem here is that QDebug does not have a default constructor. QDebug() << "hello"; would work if it did have one.

    These are the available constructors:

    QDebug(QIODevice* device);
    QDebug(QString* string);
    QDebug(QtMsgType type);
    // and the copy constructor of course.
    

    duDE's answer gives you what you're looking for.

提交回复
热议问题