diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index 215b4701c11..db1695f20b3 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -47,11 +47,25 @@ #include #include #include +#include #include namespace Debugger { namespace Internal { +class LeftElideDelegate : public QStyledItemDelegate +{ +public: + LeftElideDelegate(QObject *parent) : QStyledItemDelegate(parent) {} + + void paint(QPainter *pain, const QStyleOptionViewItem &option, const QModelIndex &index) const override + { + QStyleOptionViewItem opt = option; + opt.textElideMode = Qt::ElideLeft; + QStyledItemDelegate::paint(pain, opt, index); + } +}; + class SmallTextEdit : public QTextEdit { public: @@ -681,6 +695,7 @@ BreakTreeView::BreakTreeView() { setWindowIcon(Icons::BREAKPOINTS.icon()); setSelectionMode(QAbstractItemView::ExtendedSelection); + setItemDelegateForColumn(2, new LeftElideDelegate(this)); connect(action(UseAddressInBreakpointsView), &QAction::toggled, this, &BreakTreeView::showAddressColumn); }