feat: add clipboard support
This commit is contained in:
parent
0229edc410
commit
f2ce61142b
|
@ -78,6 +78,9 @@ DOS_API void DOS_CALL dos_qguiapplication_quit(void);
|
|||
/// \note A QGuiApplication should have been already created through dos_qguiapplication_create()
|
||||
DOS_API void DOS_CALL dos_qguiapplication_delete(void);
|
||||
|
||||
|
||||
DOS_API void dos_qapplication_clipboard_setText(const char* text);
|
||||
|
||||
/// @}
|
||||
|
||||
/// \defgroup QApplication QApplication
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <QtGui/QIcon>
|
||||
#include <QtQml/QQmlContext>
|
||||
#include <QtCore>
|
||||
#include <QClipboard>
|
||||
#include <QtQml/QQmlApplicationEngine>
|
||||
#include <QtQuick/QQuickView>
|
||||
#include <QtQuick/QQuickImageProvider>
|
||||
|
@ -86,6 +87,11 @@ void dos_qguiapplication_create()
|
|||
new QGuiApplication(argc, argv);
|
||||
}
|
||||
|
||||
void dos_qapplication_clipboard_setText(const char* text)
|
||||
{
|
||||
QApplication::clipboard()->setText(text);
|
||||
}
|
||||
|
||||
void dos_qguiapplication_delete()
|
||||
{
|
||||
delete qGuiApp;
|
||||
|
|
Loading…
Reference in New Issue