Important: Please read the Qt Code of Conduct -

How to add logo

  • Hi, I'm editing a pc program in PyQT4, how can I add my logo anywhere in the program?

  • @priscilla-v You can add the logo anywhere where You want. If You want to add logo to the window title:


    for example to the button:


  • @Volodymyr14 said in How to add logo:


    Hello, I try but nothing happens, in what folder should I place the image?

  • @priscilla-v You need to find the folder with PyQt application, then find the file with main application (, In this file find the class which realizes the application window and usually in the init function of this class add something like this:


    or if

    window = QtGui.QWidget()

    with buttons, labels, other elements, they are usually in the init function of the application/widget class




    the names of the buttons (any elements) can be any.
    Usually, buttons have a declaration:

    self.some_but = QtGui.PushButton()

    but it will not necessarily be like this.
    Need to read by the content in the app files.
    The images is recommended to place in the one folder with app. For example, if app path App/ can create in the App folder Icons folder and put to Icons folder logo.png file.
    The path will be:


    You can put here some part of the file with the application if You have a problems with code.

Log in to reply