A
A
Alexey Lebedev2013-03-28 13:38:08
linux
Alexey Lebedev, 2013-03-28 13:38:08

Associate a browser and a QT program

I have such a task. There is a project that will consist of 2 parts:
A web browser (either Chromium or based on Firefox 2)
A program written in QT of an ancient version, which I don't know exactly, but you can forget about the Webkit component.

I need to link these 2 programs in Linux, roughly speaking, 2 things should be done:
1) I clicked on the button in the QT program, the content in the browser changed.
2) clicked on the button in the browser, the content in the QT program changed.

1st point, I roughly understand how to implement:
Write commands to a QT file, the browser reads a few seconds and executes. And what about the 2nd?

Personally, I have no idea how to connect the browser and the program on QT.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
ertaquo, 2013-03-28
@swanrnd

As an option, modify the browser for the operation of your commands (or write your own mini-browser, for example, with a newer version of Qt, where there is QtWebKit), and send the commands themselves through signals or pipes.

U
Urvin, 2013-03-28
@Urvin

WebSockets, even without plugins, e.g.
github.com/ant-lafarge/QtWebsocket

A
Andrey Burov, 2013-03-28
@BuriK666

A reasonable solution is to port the program to fresh Qt.
You can also write a browser plugin and communicate via sockets.

D
Dolios, 2013-03-28
@Dolios

IMHO, through an http server, which can be your program, or through a browser extension. As for the second option, I pointed my finger at the sky, I didn’t work with extensions, I don’t know what and how.

D
dotsquid, 2013-03-28
@dotsquid

I came to advise WebSockets, but they already outstripped me. So, +1 to WS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question