This is a document which purpose is to help people who wants to port applications from GTK to Qt.
Some resources are written for C++ and some for Python, both are very similar, the changes I've seen are mainly sintax and some things that work in C++ but not in Python (TODO: insert info here)
Here is a good page to start from:
https://wiki.lxde.org/en/Migrate_from_GTK%2B_to_Qt
I add to which is mentioned there:
- classes:
GtkBox (box_driver_action) ->QGroupBox
- methods:
set_sensitive() ---> setEnabled()
set_visible ---> setVisible()
set_text ---> setText()
set_halign(Gtk.Align.CENTER) ---> setAlignment(Qt.AlignHcenter)
set_valign(Gtk.Align.START) ---> setAlignment(Qt.AlignTop)
set_halign(Gtk.Align.START) ---> setAlignment(Qt.AlignLeft)
radio_button.set_active() ---> radio_button.setChecked()
set_label() ---> setText()
box_driver_action.pack_end() #put item at the end of Box
- others:
Icons in label should be put as pixmap, example:
driver_status = Gtk.Image()
driver_status.set_valign(Gtk.Align.START)
driver_status.set_halign(Gtk.Align.CENTER)
driver_status.set_from_icon_name(icon, Gtk.IconSize.MENU)
to:
driver_status = QLabel()
driver_status.setAlignment(Qt.AlignTop)
driver_status.setAlignment(Qt.AlignHCenter)
pixmap = QIcon.fromTheme(icon).pixmap(QSize(16, 16))
driver_status.setPixmap(pixmap)