Hello!

Help me to delete this:

441.png

Qt Code:
  1. #include "Dialog.h"
  2. #include "ui_Dialog.h"
  3.  
  4. Dialog::Dialog(QWidget *parent) :
  5. QDialog(parent),
  6. ui(new Ui::Dialog),
  7. x( 20 ),
  8. y( 20 )
  9. {
  10. ui->setupUi(this);
  11.  
  12. connect( &m_timer, SIGNAL( timeout() ),
  13. this, SLOT( slotUpdate() ) );
  14. m_timer.start( 50 );
  15. //this->setStyleSheet( "background-color: rgb(177, 177, 177);" "color: black;" );
  16. }
  17.  
  18. Dialog::~Dialog()
  19. {
  20. delete ui;
  21. }
  22.  
  23. void Dialog::slotUpdate()
  24. {
  25. QPushButton *horse1 = new QPushButton( this );
  26. horse1->setGeometry( 20+x, 20+y, 50, 50 );
  27. //horse1->setStyleSheet("background-color: rgb(177, 177, 177);" "color: black;");
  28.  
  29. //m_horses.push_back( horse1 );
  30.  
  31. horse1->show();
  32. ++x;
  33. ++y;
  34. //this->setStyleSheet( "background-color: rgb(177, 177, 177);" "color: black;" );
  35. update();
  36. }
To copy to clipboard, switch view to plain text mode