有个不必现错误,预览初步完成

This commit is contained in:
2025-03-25 18:35:28 +08:00
parent c84b88a422
commit d86f80982d
25 changed files with 967 additions and 393 deletions

View File

@@ -8,32 +8,36 @@
#include <QVBoxLayout>
#include <QToolButton>
#include <QSpacerItem>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QUrl>
#include <QNetworkReply>
#include <QClipboard>
#include <QCheckBox>
#include <QGuiApplication>
#include "tchttpservice.h"
class FrmImgShow : public QWidget
{
Q_OBJECT
public:
explicit FrmImgShow(QString& url, QWidget *parent = nullptr);
explicit FrmImgShow(QWidget *parent = nullptr);
void loadImage(const QUrl& imageUrl);
void setImage(const QPixmap& pixmap);
void setLoadingState(bool loading);
QSize sizeHint();
private:
QLabel* labImg;
QToolButton* btnCopy;
QToolButton* btnDelete;
// QLabel* labLoading;
// QMovie* movieLoading;
QPushButton* btnCopy;
QPushButton* btnDelete;
QSpacerItem* horizenSpacer;
QHBoxLayout* hLayout;
QCheckBox* ckbSelect;
QVBoxLayout* vLayout;
QNetworkAccessManager* manager;
QString url;
protected:
virtual bool eventFilter(QObject* watched, QEvent* event);
// virtual bool eventFilter(QObject* watched, QEvent* event);
private slots:
void onFinished(QNetworkReply *reply);
@@ -41,10 +45,9 @@ private slots:
private:
void initForm();
void initWidget();
void initManager();
signals:
QString m_requestId;
QUrl m_currentUrl;
};
#endif // FRMIMGSHOW_H