Questions tagged [pyuic]

A command-line tool included with PyQt. It converts Qt Designer files into python modules, and is equivalent to Qt's uic command-line tool.

99 questions
3
votes
1 answer

pyuic4 generates wrong layout?

pyuic4 seems to generate a wrong layout based on a .ui file from Qt Designer. The UI file is here: Dialog
Oleg
  • 33
  • 4
3
votes
1 answer

How to reconstruct a .ui file from pyuic .py file

A while back I made a project using PyQt. I created some .ui files and generated the corresponding .py files using pyuic4. I want to start work on it again, but I have lost the .ui files (I formatted my PC and took a backup, but the .ui files were…
user2185770
  • 31
  • 1
  • 2
2
votes
1 answer

PyQt5: Object has no attribute 'exec_' with two main windows

I am new to PyQt, so when I am creating UI files, I just copied one Mainwindow (mainfile.ui) and changed it to produce another UI file (Intro.ui). I know this is not a good way to create UI files, as it always gives the error: object has no…
user6901947
  • 107
  • 1
  • 1
  • 5
2
votes
1 answer

My pyuic converted file is not opening

I am currently a beginner in learning python and trying to make an application with Qt Designer. In all the tutorials I have followed after they convert the .ui file to .py using pyuic they just click on the new .py and it displays what they made in…
ThomasH
  • 67
  • 2
  • 8
2
votes
2 answers

PyQt with custom slots works, Qt designer does not

I am trying to build a GUI around some code that I already have. I understand how to do this when building the GUI manually, but am stuck when adding this to the python code generated by Qt Designer and pyuic. As an example, I might need a button…
2
votes
1 answer

PyQt5 dialog widgets look glitchy when run with pyuic

So I'm making an app in PyQt5, which has a dialog. But the dialog is looking really glitchy when run with pyuic. Here's a video of what's going on: https://youtu.be/3oJ7EMiJxO0 As you can see, the dialog shows fine with the "preview" function, but…
TheInitializer
  • 566
  • 7
  • 20
2
votes
1 answer

Convert UI file to Python Using pyuic4 Issue

I'm trying to convert a ui file to python using pyuic4 but I get "The system cannot find the path specified". (pyuic4 Mainwindow.ui > MainWindow.py) I'm not sure why since I've given the command line the exact location of the file (pyuic4) in…
user3723727
  • 142
  • 1
  • 4
  • 15
2
votes
1 answer

Main Window resize in Python with Qt

I have a gui in ui_main.py file (designed in Qt Designer). I load it in my main *.py file in this way: from PyQt4 import QtGui, QtCore from ui_main import Ui_MainWindow class MyForm(QtGui.QMainWindow): def __init__(self, parent=None): …
jsnjack
  • 2,630
  • 2
  • 21
  • 21
1
vote
3 answers

PyQt4 pyuic4 spacerItem as a member of class

I have no idea how to force pyuic4 to generate QSpacerItem's as a class members in a .py file. Everything else is generate as a members of a class, for example gridLayout self.gridLay = QtGui.QGridLayout() Everything except QSpacerItem spacerItem =…
Dejwi
  • 4,393
  • 12
  • 45
  • 74
1
vote
1 answer

Set text in PYQT5 python

My program is AI based. I have seen all post regarding Pyqt set text in stackoverflow. I want to setText in lineEdit when Auto(AI) button is clicked. def AI_click(self): #self.lineEdit.setText("YO") os.system('python detect_video.py…
1
vote
1 answer

I can't install PyQt5-tools

I am trying to install PyQt5-tools but I'm having trouble with it. I'm getting the error that you can see below: Collecting pyqt5-tools Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB) Collecting pyqt5==5.15.4 Using cached…
1
vote
1 answer

Change the import path of rcc module from Qt Designer

I'm looking for a way to change the import path of the rcc module in the pyuic generated python file. An example pyuic generated python code from a ui file: from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): …
tonyjosi
  • 717
  • 1
  • 9
  • 17
1
vote
0 answers

How to open a specific Qwidget depending on the account logged in? Also how can I move from one window to another?

I'm currently creating a sort of student appointment system where students can set appointments to their respective instructors. Currently, I've made 3 widgets named main.py for the login, admin.py, and faculty.py, converted from the ui files that…
Sieg
  • 31
  • 5
1
vote
1 answer

In pyqt, button click connect not working in the new window

I have two windows in my code first I want to open class first() window which contains btn1. When I click btn1, I want to open a new window and replace it with my previous window (i.e. open new window in the current window itself) so upon clicking…
1
vote
2 answers

PyQt5 pyuic Import error: DLL load failed

I have downloaded python 3.6.2 from python.org and pyqt 5.9.2 using pip to install but I am having a problem when converting code from .ui to .py C:\Users\pc\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\pyqt5-tools>pyuic5 -x…
irakli
  • 51
  • 2
  • 7