error: undefined reference to `Widget::SetTime()' appears in QT

Problem description: error: undefined reference to `Widget::SetTime()' appears in QT:

Cause Analysis:

Because we only declared the function in the header file and did not implement the function under the corresponding (XXX.C) file:

Insert image description here
Insert image description here

solution:

Just implement this function under the corresponding .c file:
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_44236302/article/details/124110215