bool BlWidget::event ( QEvent * event ) { if (event->type() == QEvent::HideToParent) { emit hided(this); } else if (event->type() == QEvent::ShowToParent) { emit showed(this); } // end if return QWidget::event(event); }
Skore::Skore(QWidget *parent) : QDialog(parent), ui(new Ui::Skore) { ui->setupUi(this); model = new QSqlQueryModel; ui->skoreView->horizontalHeader()->setStretchLastSection(true); connect(this,SIGNAL(showed()),this,SLOT(inicializujSe())); ui->skoreView->setModel(model); inicializujSe(); }
void Skore::showEvent(QShowEvent *event){ emit showed(); }