qt-designer

Stylesheet does not work properly in PyQt

情到浓时终转凉″ 提交于 2021-01-07 02:54:23
问题 I am trying to build an app using PyQt, so I decided to first develop the UI using qt Designer. I want to style my elements, so I am using stylesheets to specify the styles I need. After making the UI in qt Designer, I used the preview button to see if everything works, and everything was working as expected. Then, I used pyuic5 to convert the UI file to the python version. Now, almost everything is OK, but SOME stylesheets do not work properly. For example, I used stylesheet for QComboBox,

Stylesheet does not work properly in PyQt

浪尽此生 提交于 2021-01-07 02:53:38
问题 I am trying to build an app using PyQt, so I decided to first develop the UI using qt Designer. I want to style my elements, so I am using stylesheets to specify the styles I need. After making the UI in qt Designer, I used the preview button to see if everything works, and everything was working as expected. Then, I used pyuic5 to convert the UI file to the python version. Now, almost everything is OK, but SOME stylesheets do not work properly. For example, I used stylesheet for QComboBox,

Qt Designer - window won't get smaller than a QLabel with pixmap

荒凉一梦 提交于 2021-01-02 05:38:27
问题 I'm creating a program (in Qt Creator 2.8.1, Qt 5.1.1) that basically shows an image, in this case a playing card (along with a few buttons, labels, and a line edit). All widgets are in vertical/horizontal layouts, and the window layout is a grid layout. I reimplemented the main window's resize event to get the image to resize correctly and ajust the pixmap to it's size - basically, the label expands vertically as much as it can (vertical size policy set to Expand(1)), and then the image is

How to install QtDesigner?

☆樱花仙子☆ 提交于 2020-12-27 08:24:31
问题 I just installed Qt 5.4.1 on Windows 7. And there is no QtDesigner. Also there is no QtDesigner in MaintenanceTool. How can I install it? 回答1: You can install and find QT Designer as follows (Windows environment): Install latest QT (I'm using 5.8) from QT main site Make sure you include "Qt 5.8 MinGW" component QT Designer will be installed in C:\Qt\5.8\mingw53_32\bin\designer.exe Note that the executable is named "designer.exe" UPDATE - there is an easier way to install QT Designer without

How to install QtDesigner?

好久不见. 提交于 2020-12-27 08:24:19
问题 I just installed Qt 5.4.1 on Windows 7. And there is no QtDesigner. Also there is no QtDesigner in MaintenanceTool. How can I install it? 回答1: You can install and find QT Designer as follows (Windows environment): Install latest QT (I'm using 5.8) from QT main site Make sure you include "Qt 5.8 MinGW" component QT Designer will be installed in C:\Qt\5.8\mingw53_32\bin\designer.exe Note that the executable is named "designer.exe" UPDATE - there is an easier way to install QT Designer without

How to install QtDesigner?

ⅰ亾dé卋堺 提交于 2020-12-27 08:24:16
问题 I just installed Qt 5.4.1 on Windows 7. And there is no QtDesigner. Also there is no QtDesigner in MaintenanceTool. How can I install it? 回答1: You can install and find QT Designer as follows (Windows environment): Install latest QT (I'm using 5.8) from QT main site Make sure you include "Qt 5.8 MinGW" component QT Designer will be installed in C:\Qt\5.8\mingw53_32\bin\designer.exe Note that the executable is named "designer.exe" UPDATE - there is an easier way to install QT Designer without

AttributeError: QDialog object has no attribute setCentralWidget

最后都变了- 提交于 2020-11-28 09:01:12
问题 I'm trying to create a GUI with QT Designer. I've converted my .ui designer file to a .py file using the following tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html. I have the following code: # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QDialog class Ui_ImageDialog(object): def setupUi(self, MainWindow): MainWindow.setObjectName(

AttributeError: QDialog object has no attribute setCentralWidget

假如想象 提交于 2020-11-28 08:57:29
问题 I'm trying to create a GUI with QT Designer. I've converted my .ui designer file to a .py file using the following tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html. I have the following code: # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QDialog class Ui_ImageDialog(object): def setupUi(self, MainWindow): MainWindow.setObjectName(

AttributeError: QDialog object has no attribute setCentralWidget

ε祈祈猫儿з 提交于 2020-11-28 08:57:06
问题 I'm trying to create a GUI with QT Designer. I've converted my .ui designer file to a .py file using the following tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html. I have the following code: # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QDialog class Ui_ImageDialog(object): def setupUi(self, MainWindow): MainWindow.setObjectName(

How to create toggle switch button in qt designer?

白昼怎懂夜的黑 提交于 2020-11-28 02:20:44
问题 I am trying to create toggle button in qt designer. I refer on internet also but i couldn't find how to do that. Can anyone know how to do toggle switch button. I have attached a sample button image. EDIT I created a text box below that i want this toggle button. When i try to add it throws me error. How to add the button below the text area? i have attached the code snippet also. from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QPropertyAnimation, QRectF, QSize, Qt,