[Interest] Question Regarding Porting Gtk To PyQt

Christoph Feck cfeck at kde.org
Mon Jun 17 03:57:01 CEST 2019


On 06/17/19 03:29, Samuel Banya wrote:
> Hello everyone,
>
> I'm having a bit of difficulty of helping the Lubuntu team port a
> program called RedShift from Gtk to PyQT.
>
> The reason is that the Qt docs are primarily C++ based, and though I
> know there is a PyQt variant that focuses on Python, its not as up to
> date as the ones present for the C++ variant of the docs.

Qt docs include PySide documentation, but not PyQt documentation:

* https://doc.qt.io/qtforpython/PySide2

> That being said, I have my current progress of trying to port this Gtk
> program to PyQt here:
>
> https://github.com/SBanya/redshift-1.12
>
> If someone could take a look at the commented sections in the
> controller.py for starters, I'd really appreciate it since I'm having
> difficulty on finding the exact Gtk variant present:
>
> https://github.com/SBanya/redshift-1.12/blob/master/redshift-1.12qt/src/redshift-qt/controller.py
>
> Thank you for reading my message!

Spawning external processes is done with QProcess:

* https://doc.qt.io/qtforpython/PySide2/QtCore/QProcess.html

Note that QProcess is an QIODevice, so the output streams of the
external process can be monitored with its signals.
QFileSystemWatcher is used for 'inotify' handling, so unrelated.

For low-level (Linux) signal handling use QProcess.processId().

HTH,
Christoph

-- 
Christoph Feck




More information about the Interest mailing list