diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-06-14 12:40:57 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-06-14 16:55:22 +0200 |
commit | a50e0b1bcb120e097a2b23dbfb71533b2f9c4d6c (patch) | |
tree | 73d21016ebd10b3d729585aa793ab84a70debfd2 /src/qt/transactionoverviewwidget.cpp | |
parent | 9e4fbebcc8e497016563e46de4c64fa094edab2d (diff) |
qt, refactor: Add `transactionoverviewwidget.cpp` source file
Required for better/simpler interaction with CMake AUTOMOC.
Diffstat (limited to 'src/qt/transactionoverviewwidget.cpp')
-rw-r--r-- | src/qt/transactionoverviewwidget.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/qt/transactionoverviewwidget.cpp b/src/qt/transactionoverviewwidget.cpp new file mode 100644 index 0000000000..360a1364fb --- /dev/null +++ b/src/qt/transactionoverviewwidget.cpp @@ -0,0 +1,27 @@ +// Copyright (c) 2021 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include <qt/transactionoverviewwidget.h> + +#include <qt/transactiontablemodel.h> + +#include <QListView> +#include <QSize> +#include <QSizePolicy> + +TransactionOverviewWidget::TransactionOverviewWidget(QWidget* parent) + : QListView(parent) {} + +QSize TransactionOverviewWidget::sizeHint() const +{ + return {sizeHintForColumn(TransactionTableModel::ToAddress), QListView::sizeHint().height()}; +} + +void TransactionOverviewWidget::showEvent(QShowEvent* event) +{ + Q_UNUSED(event); + QSizePolicy sp = sizePolicy(); + sp.setHorizontalPolicy(QSizePolicy::Minimum); + setSizePolicy(sp); +} |