Add C++ clipboard image provider
Will be used to show a preview before uploading image from clipboard. Transforming the clipboard image to PNG (or any other real format) is slow and freezes the GUI, with the provider we can display it directly.
This commit is contained in:
@@ -82,6 +82,7 @@ public:
|
||||
}
|
||||
|
||||
signals:
|
||||
void contentChanged();
|
||||
void textChanged();
|
||||
void imageChanged();
|
||||
void hasImageChanged();
|
||||
@@ -91,6 +92,7 @@ private:
|
||||
QClipboard *clipboard = QGuiApplication::clipboard();
|
||||
|
||||
void mainClipboardChanged() {
|
||||
contentChanged();
|
||||
this->hasImage() ? this->imageChanged() : this->textChanged();
|
||||
this->hasImageChanged();
|
||||
};
|
||||
|
Reference in New Issue
Block a user