mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
0eed45ae67
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
29 lines
605 B
C++
29 lines
605 B
C++
#include "DebugPopup.hpp"
|
|
|
|
#include "util/DebugCount.hpp"
|
|
|
|
#include <QFontDatabase>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QTimer>
|
|
|
|
namespace chatterino {
|
|
|
|
DebugPopup::DebugPopup()
|
|
{
|
|
auto *layout = new QHBoxLayout(this);
|
|
auto *text = new QLabel(this);
|
|
auto *timer = new QTimer(this);
|
|
|
|
timer->setInterval(300);
|
|
QObject::connect(timer, &QTimer::timeout, [text] {
|
|
text->setText(DebugCount::getDebugText());
|
|
});
|
|
timer->start();
|
|
|
|
text->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
|
|
|
|
layout->addWidget(text);
|
|
}
|
|
|
|
} // namespace chatterino
|