Substitute for sleep function in Qt/C++

后端 未结 3 1890
生来不讨喜
生来不讨喜 2021-01-26 01:43

So I am writing a program that displays each letter of a word for 1 second with a 1 second interval between the letters. (It\'s for a spelling exercise for grade 1). I am curren

3条回答
  •  轮回少年
    2021-01-26 02:13

    I still don't know what the problem is, but I found a make-shift solution. In my program I include one class (eg class1) into my mainwindow.cpp and from that class I include the timer class. I solved the problem by removing the timer class and adding all those functions to class1. Doesn't make sense to me, but it works.

提交回复
热议问题