MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / paintEvent

Method paintEvent

ElaWidgetTools/ElaProgressBar.cpp:54–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52void ElaProgressBar::paintEvent(QPaintEvent* event)
53{
54 Q_D(ElaProgressBar);
55 if (!d->_isBusyAnimation && minimum() == 0 && maximum() == 0)
56 {
57 QStyleOptionProgressBar option;
58 option.initFrom(this);
59 d->_isBusyAnimation = true;
60 d->_busyAnimation->setStartValue(-75);
61 if (orientation() == Qt::Horizontal)
62 {
63 d->_busyAnimation->setEndValue(this->width());
64 }
65 else
66 {
67 d->_busyAnimation->setEndValue(this->height());
68 }
69 d->_busyAnimation->start();
70 }
71 QProgressBar::paintEvent(event);
72}
73
74void ElaProgressBar::resizeEvent(QResizeEvent* event)
75{
76 Q_D(ElaProgressBar);
77 if (orientation() == Qt::Horizontal)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected