summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-10-24 12:27:27 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-10-25 08:57:17 +0200
commit2db9f1c08e28d0ae06be7db5a20912f9198468f0 (patch)
treec676506422f0f2dd59ff9035784667ede11864d2 /vcl/inc
parent4b1a85ec15de0c0aa3e6537e0b2fb10ccc0e38fe (diff)
tdf#130857 qt weld: Notify about weld::Entry text/cursor changes
In QtInstanceEntry, notify about cursor and text changes by connecting to the corresponding QLineEdit signals and calling weld::Entry::signal_cursor_position and weld::Entrysignal_changed accordingly. This is made use of e.g. in the "Tools" -> "Options" -> "Languages and Locales" -> "Writing Aids" -> "New" dialog" in a WIP branch where that dialog's .ui file ("cui/ui/optnewdictionarydialog.ui") was added to the list of supported files for QtInstanceBuilder. Without this commit, the "OK" button would remain greyed out even after typing a new name in the edit. Change-Id: I006ed711652c65b0af1d8af5ae5c4dc80691a9b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175545 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/qt5/QtInstanceEntry.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/inc/qt5/QtInstanceEntry.hxx b/vcl/inc/qt5/QtInstanceEntry.hxx
index 001d6714bcc4..4007765a41f8 100644
--- a/vcl/inc/qt5/QtInstanceEntry.hxx
+++ b/vcl/inc/qt5/QtInstanceEntry.hxx
@@ -13,8 +13,10 @@
#include <QtWidgets/QLineEdit>
-class QtInstanceEntry : public QtInstanceWidget, public virtual weld::Entry
+class QtInstanceEntry : public QObject, public QtInstanceWidget, public virtual weld::Entry
{
+ Q_OBJECT;
+
QLineEdit* m_pLineEdit;
public: