qt-designer

Is there any way to set the visibility of QLabel in Qt Designer

╄→гoц情女王★ 提交于 2021-02-04 22:10:33
问题 I'm trying to make a QLabel not visible by default in Qt Designer. I can hard code it but I was wondering if there was a way to set this using the designer. m_uiForm.aLabel->setVisible(false); 回答1: As far as I know, this is not possible from QtDesigner. The only way to access setVisible directly from QtDesigner is when modifying connects you can find it as a slot. The simplest way is just to set the visibility to false just like you are doing already. 来源: https://stackoverflow.com/questions

Is there any way to set the visibility of QLabel in Qt Designer

点点圈 提交于 2021-02-04 22:10:30
问题 I'm trying to make a QLabel not visible by default in Qt Designer. I can hard code it but I was wondering if there was a way to set this using the designer. m_uiForm.aLabel->setVisible(false); 回答1: As far as I know, this is not possible from QtDesigner. The only way to access setVisible directly from QtDesigner is when modifying connects you can find it as a slot. The simplest way is just to set the visibility to false just like you are doing already. 来源: https://stackoverflow.com/questions

Window closes immediatelly after run

三世轮回 提交于 2021-02-04 21:56:12
问题 My code calls one window with a button. When the button is clicked, call another window. But the second window closes immediately "basic" and "windows_two" are .py libraries genereted by pyuic5 from .ui files import basic, windows_two from PyQt5 import QtCore, QtGui, QtWidgets if __name__ == "__main__": #Declarations import sys app = QtWidgets.QApplication(sys.argv) def Call_Second_Window(): #Second Screen Form = QtWidgets.QWidget() ui = windows_two.Ui_Form() ui.setupUi(Form) Form.show() def

Window closes immediatelly after run

爱⌒轻易说出口 提交于 2021-02-04 21:55:07
问题 My code calls one window with a button. When the button is clicked, call another window. But the second window closes immediately "basic" and "windows_two" are .py libraries genereted by pyuic5 from .ui files import basic, windows_two from PyQt5 import QtCore, QtGui, QtWidgets if __name__ == "__main__": #Declarations import sys app = QtWidgets.QApplication(sys.argv) def Call_Second_Window(): #Second Screen Form = QtWidgets.QWidget() ui = windows_two.Ui_Form() ui.setupUi(Form) Form.show() def

popup closeEvent code with code from QtDesigner [duplicate]

一世执手 提交于 2021-01-29 09:02:22
问题 This question already has answers here : QtDesigner changes will be lost after redesign User Interface (2 answers) Closed 11 months ago . I'm trying to create a pop up message box when the "close" button is pressed. my code looks like as follow: from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMessageBox class Ui_Form(object): def __init__(self): super().__init__() self.stop_request_1 = False self.stop_request_2 = False def setupUi(self, Form): Form.setObjectName("Form"

Adding widgets to Qt Designer

核能气质少年 提交于 2021-01-27 14:07:55
问题 I have recently discovered that Qt supports custom widgets, and that there are sites that provide this kind of widgets ( like Qt-Apps ). If it is relevant, I am interested in getting this widget. I have downloaded the source code for it, I have extracted it etc. I haven't tried to build it yet, but what I am interested in is having that widget in the widget list in the left side of the Qt Designer so that I can use it my applications. I either don't know how to search what I am looking for,

QVBoxLayout: How to align widgets to the top using Qt designer

十年热恋 提交于 2021-01-27 04:38:22
问题 I'm using qt designer only for ui layout This is almost the same question as this one : QVBoxLayout: How to vertically align widgets to the top instead of the center but i'm interested on how to do that in qt designer. I don't see any option in QVBoxLayout for that top alignment. 回答1: Right-click the relevant widget and select Layout alignment > Top. (NB: the new alignment will only be shown in preview mode). 来源: https://stackoverflow.com/questions/42741396/qvboxlayout-how-to-align-widgets-to

How to convert a .ui file to .py file

北城以北 提交于 2021-01-20 16:10:07
问题 This .ui file is made by Qt Designer. It's just a simple UI. All the commands or codes for doing this on the websites I have looked through are not for windows. 回答1: The pyuic tool works in exactly the same way on all platforms: C:\>pyuic4 -h Usage: pyuic4 [options] <ui-file> Options: --version show program's version number and exit -h, --help show this help message and exit -p, --preview show a preview of the UI instead of generating code -o FILE, --output=FILE write generated code to FILE

How to convert a .ui file to .py file

送分小仙女□ 提交于 2021-01-20 16:09:27
问题 This .ui file is made by Qt Designer. It's just a simple UI. All the commands or codes for doing this on the websites I have looked through are not for windows. 回答1: The pyuic tool works in exactly the same way on all platforms: C:\>pyuic4 -h Usage: pyuic4 [options] <ui-file> Options: --version show program's version number and exit -h, --help show this help message and exit -p, --preview show a preview of the UI instead of generating code -o FILE, --output=FILE write generated code to FILE

How to convert a .ui file to .py file

感情迁移 提交于 2021-01-20 16:09:07
问题 This .ui file is made by Qt Designer. It's just a simple UI. All the commands or codes for doing this on the websites I have looked through are not for windows. 回答1: The pyuic tool works in exactly the same way on all platforms: C:\>pyuic4 -h Usage: pyuic4 [options] <ui-file> Options: --version show program's version number and exit -h, --help show this help message and exit -p, --preview show a preview of the UI instead of generating code -o FILE, --output=FILE write generated code to FILE