diff --git a/src/newfiledialog.cpp b/src/newfiledialog.cpp index abc30c87..a1731bda 100644 --- a/src/newfiledialog.cpp +++ b/src/newfiledialog.cpp @@ -174,7 +174,7 @@ void NewFileDialog::on_createButton_clicked() { // Close dialog and open create new file dialog close(); - createNewDialog* n = new createNewDialog(nullptr); + createNewDialog* n = new createNewDialog(this); n->exec(); } diff --git a/src/optionsdialog.cpp b/src/optionsdialog.cpp index 208fb88e..ad3498d9 100644 --- a/src/optionsdialog.cpp +++ b/src/optionsdialog.cpp @@ -243,7 +243,7 @@ void OptionsDialog::on_cancelButton_clicked() this->core = NULL; // Close dialog and open OptionsDialog close(); - NewFileDialog* n = new NewFileDialog(nullptr); + NewFileDialog* n = new NewFileDialog(this); n->show(); } diff --git a/src/widgets/commentswidget.cpp b/src/widgets/commentswidget.cpp index 9d9c27c6..1dd3e85e 100644 --- a/src/widgets/commentswidget.cpp +++ b/src/widgets/commentswidget.cpp @@ -28,6 +28,7 @@ CommentsWidget::CommentsWidget(MainWindow *main, QWidget *parent) : ui->frame->hide(); // Resize eventfilter + this->installEventFilter(this); ui->commentsTreeWidget->viewport()->installEventFilter(this); } @@ -133,5 +134,4 @@ bool CommentsWidget::eventFilter(QObject *obj, QEvent *event) { } } } - return false; //allow the event to be handled further } diff --git a/src/widgets/commentswidget.h b/src/widgets/commentswidget.h index 28e8b6e8..3af90b9a 100644 --- a/src/widgets/commentswidget.h +++ b/src/widgets/commentswidget.h @@ -36,7 +36,7 @@ private slots: void on_actionVertical_triggered(); - bool eventFilter(QObject *obj, QEvent *event) override; + bool eventFilter(QObject *obj, QEvent *event); private: Ui::CommentsWidget *ui; diff --git a/src/widgets/functionswidget.cpp b/src/widgets/functionswidget.cpp index e652a6de..d6ef5738 100644 --- a/src/widgets/functionswidget.cpp +++ b/src/widgets/functionswidget.cpp @@ -39,6 +39,7 @@ FunctionsWidget::FunctionsWidget(MainWindow *main, QWidget *parent) : this, SLOT(showTitleContextMenu(const QPoint &))); // Resize eventfilter + this->installEventFilter(this); ui->functionsTreeWidget->viewport()->installEventFilter(this); } @@ -362,7 +363,7 @@ void FunctionsWidget::on_nestedFunctionsTree_itemDoubleClicked(QTreeWidgetItem * bool FunctionsWidget::eventFilter(QObject *obj, QEvent *event) { if (this->main->responsive) { - if (event->type() == QEvent::Resize && obj == this && this->isVisible()) { + if (event->type() == QEvent::Resize && obj == this && this->isVisible() == true) { QResizeEvent *resizeEvent = static_cast(event); //qDebug("Dock Resized (New Size) - Width: %d Height: %d", // resizeEvent->size().width(), @@ -376,5 +377,4 @@ bool FunctionsWidget::eventFilter(QObject *obj, QEvent *event) { } } } - return false; //allow the event to be handled further } diff --git a/src/widgets/functionswidget.h b/src/widgets/functionswidget.h index 4ef04cae..7312551e 100644 --- a/src/widgets/functionswidget.h +++ b/src/widgets/functionswidget.h @@ -41,7 +41,7 @@ private slots: void on_nestedFunctionsTree_itemDoubleClicked(QTreeWidgetItem *item, int column); - bool eventFilter(QObject *obj, QEvent *event) override; + bool eventFilter(QObject *obj, QEvent *event); private: Ui::FunctionsWidget *ui; diff --git a/src/widgets/sectionswidget.cpp b/src/widgets/sectionswidget.cpp index f04ac303..660fa258 100644 --- a/src/widgets/sectionswidget.cpp +++ b/src/widgets/sectionswidget.cpp @@ -15,6 +15,9 @@ SectionsWidget::SectionsWidget(MainWindow *main, QWidget *parent) : setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); //setStyleSheet("QSplitter::handle:horizontal { width: 3px; } QSplitter::handle:vertical { height: 3px; }"); setStyleSheet("QSplitter::handle { height: 2px; background-color: rgb(255, 255, 255); image: url(:/new/prefix1/img/icons/tabs.png); }"); + + // Resize eventfilter + this->installEventFilter(this); } /* @@ -110,5 +113,4 @@ bool SectionsWidget::eventFilter(QObject *obj, QEvent *event) { } } } - return false; //allow the event to be handled further }