1

QT Designer is different from pyqt. QT Designer is the Wysiwyg editor that creates .ui files that you can either compile to python code or import into the python code. Pyqt is a library / module for writing python code for qt.

To get QT Designer (QT Creator )
https://www1.qt.io/download-open-source/?hsCtaTracking=f977210e-de67-475f-a32b-65cec207fd03%7Cd62710cd-e1db-46aa-8d4d-2f1c1ffdacea

To use qt creator with pyqt, here is the documentation

http://pyqt.sourceforge.net/Docs/PyQt5/designer.html

Qt is excellent, but honestly I think it it more suited to C++.

I have found the TKinter is actually extremely powerful, fwiw.

0

I was looking around the web for a "selectable label" in tkinter, everyone seems to point to a disabled text entry. I wanted to share mine thus far. I plan to modify this so that when the label is selected, you can click an "edit" button elsewhere in the program and then do something to the label.

import tkinter as tk

class SelectableLabel(tk.Label):
    def __init__(self, parent, text="", bg="white", fg="black"):
        tk.Label.__init__(self, parent)
        self.text = text
        self.bg = bg
        self.fg = fg
        self.config(text=text, bg=bg, fg=fg)
        self.bind('<Enter>', lambda x: self._label_enter())
        self.bind('<Leave>', lambda x: self._label_leave())
        self.bind('<Button-1>', lambda x: self._label_action())

    @staticmethod
    def _label_enter():
        label.config(bg="black", fg="white")

    @staticmethod
    def _label_leave():
        label.config(bg="white", fg="black")

    @staticmethod
    def _label_action():
        print("Label Selected")

root = tk.Tk()
root.geometry("400x400")
label = SelectableLabel(root, text="Test Label")
label.pack()

root.mainloop()