May 8, 2012

nimingzhe2008 nimingzhe2008
Ant Farmer
60 posts

[Solved] one problem with QDialogButtonBox

 

Hello everyone.
This is part of my code.

  1. ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);//buttonBox is a QDialogButtonBox widget I added in Qt //Creator's design mode                                                                                            

When I compiled,Qt Creator said that sentence is” error:invalid use of incomplete type ‘struct QPushButton’ “
I don’t know why and how to solve it.
Thank you for your attention.

2 replies

May 8, 2012

Hostel Hostel
Hobby Entomologist
187 posts

Try add:

  1. #include <QPushButton>

May 9, 2012

nimingzhe2008 nimingzhe2008
Ant Farmer
60 posts

It’s OK now.Thank you

 
  ‹‹ Focus/Activation/Update problem for widget in nested QGraphicsScenes      [SOLVED] the qt-way for creating sqlite-databases ››

You must log in to post a reply. Not a member yet? Register here!