diff --git a/src/dialogs/titletemplatedialog.h b/src/dialogs/titletemplatedialog.h --- a/src/dialogs/titletemplatedialog.h +++ b/src/dialogs/titletemplatedialog.h @@ -24,6 +24,8 @@ #include "ui_templateclip_ui.h" +class QResizeEvent; + class TitleTemplateDialog : public QDialog { Q_OBJECT @@ -33,6 +35,9 @@ QString selectedTemplate() const; QString selectedText() const; +protected: + void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; + private: Ui::TemplateClip_UI m_view; diff --git a/src/dialogs/titletemplatedialog.cpp b/src/dialogs/titletemplatedialog.cpp --- a/src/dialogs/titletemplatedialog.cpp +++ b/src/dialogs/titletemplatedialog.cpp @@ -82,6 +82,12 @@ return m_view.description->toPlainText(); } +void TitleTemplateDialog::resizeEvent(QResizeEvent *event) +{ + updatePreview(); + QWidget::resizeEvent(event); +} + void TitleTemplateDialog::updatePreview() { QString textTemplate = m_view.template_list->comboBox()->itemData(m_view.template_list->comboBox()->currentIndex()).toString(); diff --git a/src/ui/templateclip_ui.ui b/src/ui/templateclip_ui.ui --- a/src/ui/templateclip_ui.ui +++ b/src/ui/templateclip_ui.ui @@ -39,6 +39,12 @@ + + + 0 + 0 + + 300 @@ -54,19 +60,6 @@ - - - Qt::Vertical - - - - 20 - 28 - - - - - Qt::Horizontal