L
L
LNK2016-08-09 18:15:13
Programming
LNK, 2016-08-09 18:15:13

How to interact with browser from Qt program?

Я хочу открывать уже установленный в системе браузер по умолчанию, т.е. хром/mozilla/ie, открывать свою html страницу и потом взаимодействовать с браузером из своей программы, например обновлять страницу. Это можно как-то осуществить? Вообще, я хочу сделать нечто, похожее на LivePreview в Brackets. Что делает Brackets, когда открывает LivePreview по адресу localhost:3727/filename, Brackets создает какой-то свой сервер? Может стоит как-то создавать сервер и с ним взаимодействовать? Возможно ли встроить окно браузера(установленного в системе по умолчанию) прямо в один из виджетов qt?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Яков Е, 2016-08-09
@NikHaker

Свой сервер? Почему бы и нет: https://github.com/azadkuh/qhttp

R
Rou1997, 2016-08-09
@Rou1997

You can interact - you can put an extension in the browser and already interact with it, or intercept and change traffic (requests) through a local proxy, you won't be able to embed the browser into the widget, but there are "engines" for this: QWebView, Gecko, Awesomium, CEF, IWebBrowser2 (IE), they provide a fairly flexible interaction with the page, and it's best to make your own builds of browsers, but this is very expensive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question