is there an easy way to view GUI created in Qt Designer - pyqt via web browser?
-
Recently I've developed a control application on BeagleBone (similar to RaspberryPi). I'm controlling it remotely using TCP slot and client application with GUI wrote in Qt designer - pyqt.
Now I want to do a step forward and replace the TCP slot with web app, so the hardware connected to the BeagleBone will be controlled via browser. It should be a simple app like wireless router configuration.
My question: is there a simple way to publish QT designer - pyqt application into web? All I want is to have a possibility to make GUI quickly and easly and then access it via www. -
Hi, welcome to devnet.
I don't think so, no. PyQt is just a binding to native Qt libraries. There's no way to publish that to web the same there's no way to publish, say, the Notepad. You can of course write a web server in PyQt and serve some html with it, but I don't think that's what you mean.
The closest I know to "Qt on the web" is the Wt project. It has an interface very similar to Qt. They provide bindings to some other languages but not python. There are 3rd party bindings though, e.g. pywt, but I never used that so I'm not in a position to say what state it is in.
-
I've already had a look at the Wt, but personally I think that making and editing the GUI using text editors is way to time taking. In my app there's a lot of indicators and parameters so making and aligning it in Wt will take a week ;)
I think that I'll use GUI forwarding via ssh and maybe in the future there'll be a simpler solution. -
@Tomasz-Ciesla said in is there an easy way to view GUI created in Qt Designer - pyqt via web browser?:
Recently I've developed a control application on BeagleBone (similar to RaspberryPi). I'm controlling it remotely using TCP slot and client application with GUI wrote in Qt designer - pyqt.
Now I want to do a step forward and replace the TCP slot with web app, so the hardware connected to the BeagleBone will be controlled via browser. It should be a simple app like wireless router configuration.
My question: is there a simple way to publish QT designer - pyqt application into web? All I want is to have a possibility to make GUI quickly and easly and then access it via www.Yes, there are ways to publish a PyQt application as a web app to provide browser-based access to your GUI. One approach is to use a technology called PyQtWebEngine, which allows you to embed a web browser component within a PyQt application and display HTML content.
Here's a general outline of the steps involved:
Design your GUI using PyQt and Qt Designer as you would for a desktop application. Integrate PyQtWebEngine into your application. PyQtWebEngine provides a bridge between the PyQt framework and the underlying browser engine (Chromium). It allows you to load and display web content within a PyQt application. Create the web pages or web app interface using HTML, CSS, and JavaScript. You can design the UI using web technologies and incorporate interactivity and functionality as needed. Use PyQtWebEngine to load your HTML content within the PyQt application. You can load the web pages directly from local files or host them on a web server. Set up the necessary server infrastructure to handle communication between the web app and your BeagleBone device. This may involve implementing a server component that communicates with the BeagleBone over a network protocol such as TCP or WebSocket. Access the web app by running your PyQt application and opening the browser window. Users can then interact with the GUI via the web interface, controlling the BeagleBone remotely.
Keep in mind that deploying a web app using PyQtWebEngine may have certain limitations and dependencies, and it may not be as straightforward as deploying a traditional web application. Additionally, you may need to consider security measures, such as authentication and encryption, to protect the communication between the web app and the BeagleBone device.