summaryrefslogtreecommitdiff
path: root/Ladybird/main.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-03 21:07:53 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-25 07:58:58 -0700
commit88d256c109f8097f723748bbe51ad9e334cbab8e (patch)
tree4d67adf76ebfadf04173d8109ad5c6734ab45f80 /Ladybird/main.cpp
parent9b8fe16e3dc07520f818f41b997b0b25ca3ed982 (diff)
downloadserenity-88d256c109f8097f723748bbe51ad9e334cbab8e.zip
Ladybird: Show hovered link URLs in the status bar :^)
Diffstat (limited to 'Ladybird/main.cpp')
-rw-r--r--Ladybird/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Ladybird/main.cpp b/Ladybird/main.cpp
index 94f56d5906..2b87ee22c6 100644
--- a/Ladybird/main.cpp
+++ b/Ladybird/main.cpp
@@ -11,6 +11,7 @@
#include <LibMain/Main.h>
#include <QApplication>
#include <QMainWindow>
+#include <QStatusBar>
#include <QWidget>
extern void initialize_web_engine();
@@ -36,6 +37,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
WebView view;
window.setCentralWidget(&view);
+ QObject::connect(&view, &WebView::linkHovered, window.statusBar(), &QStatusBar::showMessage);
+ QObject::connect(&view, &WebView::linkUnhovered, window.statusBar(), &QStatusBar::clearMessage);
+
auto qt_event_loop_driver = Core::Timer::create_repeating(50, [&] {
app.processEvents();
});