3

I tried to create a progress bar using below sequence of code, but showed me an error, which is

incomplete type is not allowed

.

The code snippet is as follows:-

QProgressBar *bar;

bar= new QProgressBar(0);//error: incomplete type is not allowed at QProgressBar
Myanju
  • 1,135
  • 1
  • 11
  • 23

1 Answers1

0

Don't forget to use #include <QProgressBar>.

If you use a forward declaration for QProgressBar, you can include its header in your cpp file.

AntonyG
  • 861
  • 9
  • 22