/
githubmirror
/
x64dbg
Обзор
Документация
Войти
/
githubmirror
/
x64dbg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
development
src/gui/Src/Gui/ImageTextBrowser.h
34 строки
721 B
Duncan Ogilvie
Fix release notes dialog
20 апр 2026, 21:48
20 апр 2026, 21:48
c0f6567
Код
Авторство
О чём код?
#pragma once #include <QMap> #include <QTextBrowser> #include <QTextCursor> #include <QTimer> #include <functional> class ImageTextBrowser : public QTextBrowser { Q_OBJECT public: explicit ImageTextBrowser(QWidget* parent = nullptr); void resizeImages(); using DownloadFn = std::function<QImage(const QString &)>; void setDownloadFn(DownloadFn fn) { mDownloadFn = std::move(fn); } protected: QVariant loadResource(int type, const QUrl & name) override; private: int imageMaxWidth() const; qreal mSavedScrollPercentage = 0.0; QTimer* mResizeTimer = nullptr; DownloadFn mDownloadFn; QMap<QString, QImage> mImageCache; };