qt-designer

Unable to build GUI from the code from PyQt Designer

好久不见. 提交于 2019-12-28 18:14:39
问题 I made a GUI file from pyqt designer,which i converted to .py file.but when i load that .py code in my IDE (Pycharm and sublime text),and i try to run it,it runs without errors,but the physical aspect of GUI isn't loaded,i tried a custom code from the internet,which worked great,GUI shows up when i run that code. i will give simpler code than the one i'm currently working on,as it seems all of the code generated from pyqt designer doesn't work at all for me regarding its physical aspect. from

What is the proper way to manage windows in pyqt5?

我们两清 提交于 2019-12-24 10:16:06
问题 In the application I am building I have a few "windows" I am working with. I am trying to figure out, according to python/industry standards, how to properly manage them. I have a warning screen, disclaimer screen, main gui, and essentially a message box for communicating errors. What my customer would like to transpire is the program displaying the warning screen (QDialog), and then the disclaimer screen (QDialog) on button click, then the main gui (QMainWindow) after the user has agreed to

Qt Designer PyQt5 overwrite CloseEvent child window don't work

十年热恋 提交于 2019-12-24 07:31:00
问题 I have three windows designed in QtDesigner. The main window calls the two childs windows using buttons. If I close the main window the childs windows also close, I did this by overwriting the closeEvent in the main window. I need to implement some stuff in the closeEvent of the child window so I overwritten the closeEvent of the child class but it does nothing. Please help. Class of the main window made in Qt Designer from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ventanaPrincipal

Size of verticalLayout is different in Qt Designer and PyQt program

 ̄綄美尐妖づ 提交于 2019-12-24 05:58:18
问题 In Qt Designer 5.9 the verticalLayout in test.ui had a certain distance to the edge of the window, but after loading test.ui with PyQt 5.11.3 in main.py the verticalLayout extend to the edge of the window. main.py : #!/usr/bin/python3 import sys from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.uic import loadUi class MainWindow(QMainWindow): def __init__(self, parent=None): super().__init__() loadUi("test.ui", self) def main(): app = QApplication(sys.argv) main_window =

Size of verticalLayout is different in Qt Designer and PyQt program

我怕爱的太早我们不能终老 提交于 2019-12-24 05:58:15
问题 In Qt Designer 5.9 the verticalLayout in test.ui had a certain distance to the edge of the window, but after loading test.ui with PyQt 5.11.3 in main.py the verticalLayout extend to the edge of the window. main.py : #!/usr/bin/python3 import sys from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.uic import loadUi class MainWindow(QMainWindow): def __init__(self, parent=None): super().__init__() loadUi("test.ui", self) def main(): app = QApplication(sys.argv) main_window =

change QMainWindow PyQt5 after pressed button

自闭症网瘾萝莉.ら 提交于 2019-12-24 04:47:08
问题 I have generated my UI with Qt Designer: like this I have used the .ui file with the following python code: Ui_MainWindow, QtBaseClass = uic.loadUiType("vault.ui") Ui_Credentials, QtBaseClass = uic.loadUiType("credentials.ui") class Credentials(QMainWindow): def __init__(self): super(Credentials, self).__init__() self.ui = Ui_Credentials() self.ui.setupUi(self) class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self)

QToolBox looks different then in the designer

拈花ヽ惹草 提交于 2019-12-23 15:57:35
问题 I'am using QToolBox, and in the application this widget looks different then in the designer. I'am curious, how i can fix it? OS is ubuntu 14.04 with gnome3. QToolBox in the app (simple buttons): QToolBox in designer (has that fancy lines): 来源: https://stackoverflow.com/questions/35482641/qtoolbox-looks-different-then-in-the-designer

QToolBox looks different then in the designer

谁说胖子不能爱 提交于 2019-12-23 15:54:16
问题 I'am using QToolBox, and in the application this widget looks different then in the designer. I'am curious, how i can fix it? OS is ubuntu 14.04 with gnome3. QToolBox in the app (simple buttons): QToolBox in designer (has that fancy lines): 来源: https://stackoverflow.com/questions/35482641/qtoolbox-looks-different-then-in-the-designer

Qt Designer Shortcut to another tab

旧街凉风 提交于 2019-12-23 12:14:58
问题 I was wondering if it were possible to create my own shortcut key to a QTabWidget. So if I put an ampersand infront of the letter, that means that ALT+'letter' will display that tab; however, I want it so that CTRL+'letter' will display that tab (not ALT). Is there an easy way to do this in Qt Designer? If not, is there a simple way to do it in code? QTabWidget doesn't seem to have any direct methods for setting shortcuts. 回答1: I don't know of a way to do this via the Designer, not familiar

UI Application not loading PyQt5

强颜欢笑 提交于 2019-12-23 05:50:21
问题 I don't know why this application doesn't load my ui. I've written the exact codes that I've found on the internet but didn't get any result. from PyQt5.uic import loadUi from PyQt5.QtWidgets import QApplication, QMainWindow import sys class Receipt(QMainWindow): def __init__(self): super().__init__() self.ui = None self.load_ui() self.load_signals() def load_ui(self): self.ui = loadUi('window.ui') self.show() def load_signals(self): pass app = QApplication(sys.argv) receipt = Receipt() sys