diff --git a/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp b/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp index d01e04d18..66d3b6769 100644 --- a/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp +++ b/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp @@ -1,5 +1,5 @@ -#ifndef DATE_TIME_AS_SECS_SINCE_EPOCH_ITEM_DELEGATE_HPP_ -#define DATE_TIME_AS_SECS_SINCE_EPOCH_ITEM_DELEGATE_HPP_ +#ifndef DATE_TIME_AS_SECS_SINCE_EPOCH_DELEGATE_HPP_ +#define DATE_TIME_AS_SECS_SINCE_EPOCH_DELEGATE_HPP_ #include #include @@ -7,11 +7,11 @@ #include #include -class DateTimeAsSecsSinceEpochItemDelegate final +class DateTimeAsSecsSinceEpochDelegate final : public QStyledItemDelegate { public: - DateTimeAsSecsSinceEpochItemDelegate (QObject * parent = nullptr) + DateTimeAsSecsSinceEpochDelegate (QObject * parent = nullptr) : QStyledItemDelegate {parent} { } diff --git a/item_delegates/ForeignKeyDelegate.cpp b/item_delegates/ForeignKeyDelegate.cpp index 576f677d2..09df6a731 100644 --- a/item_delegates/ForeignKeyDelegate.cpp +++ b/item_delegates/ForeignKeyDelegate.cpp @@ -37,5 +37,6 @@ QWidget * ForeignKeyDelegate::createEditor (QWidget * parent editor->setFrame (false); candidate_key_filter_->set_active_key (index); editor->setModel (candidate_key_filter_.data ()); + editor->setSizeAdjustPolicy (QComboBox::AdjustToContents); return editor; }