qt-designer

How to create exe file in qt designer with visual studio?

若如初见. 提交于 2019-12-13 08:40:43
问题 I create a qt application in visual studio. After building the project , the exe file not running and I have error message for missing a lot of dll files such as Qt5Core.dll and the others. How can I fix it? 回答1: let suppose your exe file name in MyApp.exe . copy MyApp.exe in a new folder. for example myfolder . open myfolder press shift and right click at myfolder's window in opened right click menu select Open command window here execute C:\Qt\Qt5.9.3\5.9.3\msvc2015_64\bin\windeployqt.exe

PyQT4 Combobox changes the list of another combobox [closed]

我是研究僧i 提交于 2019-12-13 04:48:25
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I just started using pyqt4 and am stuck on how to change a combobox list from another combobox. Is there a example of sometype that shows how to work this method. Do I use a if, else statement to change the

How to create a circular button in Qt Designer

僤鯓⒐⒋嵵緔 提交于 2019-12-13 04:34:12
问题 I'm working on Python project using Qt Designer as the GUI creator. I tried to create a circular button, but there is only QPushButton , which is a square. I also tried to bind a click event to a circular image, but I do not know how to do that. 回答1: You should be able to get a round button by using a stylesheet. Add a QPushButton in Qt Desgner and set its width and height to 40. Then right-click the button, select "Change stylesheet...", and paste in the following stylesheet: QPushButton {

how to use multiple .ui files in the main python file

妖精的绣舞 提交于 2019-12-13 02:35:22
问题 i have two .ui files that converted to python using pyuic5. first converted ui file is (LoginWindowUI.py) as below: from PyQt5 import QtCore, QtGui, QtWidgets class Ui_LoginWindow(object): def setupUi(self, LoginWindow): LoginWindow.setObjectName("LoginWindow") LoginWindow.setWindowModality(QtCore.Qt.NonModal) LoginWindow.setEnabled(True) LoginWindow.resize(446, 182) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0)

showing an image with Graphics View widget

落花浮王杯 提交于 2019-12-12 10:59:40
问题 I'm new to qt designer and python. I want to created a simple project that I should display an image. I used "Graphics View" widget and I named it "graphicsView". I wrote these function: def function(self): image=cv2.imread('C:/Users/Hamid/Desktop/1.jpg',1) self.show_frame_in_display(image) def show_frame_in_display(self,frame): image = QImage(frame, frame.shape[1], frame.shape[0], frame.strides[0], QImage.Format_RGB888) self.graphicsView.setPixmap(QPixmap.fromImage(image)) but It gives this

Custom QDockWidget display

孤者浪人 提交于 2019-12-12 08:40:41
问题 How would you get a display of dockwidgets/centralwidget in which the dockwidget in the Qt::BottomDockWidgetArea or Qt::TopDockWidgetArea doesn't take Qt::LeftDockWidgetArea nor Qt::RighDockWidgetArea space? This is the actual display, with 2 dockwidgets and the central widget at the top right: This would be the preferred display: 回答1: you probably should use the QMainWindow's corner functionality to get the behavior you wanted. Something like this may work (can't test whether its compiles,

PyQt5, click menu and open new window

大兔子大兔子 提交于 2019-12-12 04:38:44
问题 I have used Qt designer to create two different windows, input_window.ui and help_window.ui. Here is the python scripts for showing the input window. In input window, there is a menu bar("About>>Help"). How could it pop up a help_window when "Help" is clicked? Here is init .py import sys from input_window import Ui_MainWindow from PyQt5.QtWidgets import QMainWindow, QApplication from help_window import Ui_Help class MainWindow(QMainWindow, Ui_MainWindow): def __init__(self, parent=None):

Converting Qt compliant C++ to ui XML(QtDesigner) format:

倖福魔咒の 提交于 2019-12-12 04:28:59
问题 I have C++ widget code that was generated by QtDesigner (Qt open source v 4.7.3, using the Form->View Code menu in QtDesigner). I have modified that code in a manner that is entirely Qt compliant - just hand coded a few more signals, slots and wigdets based on the patterns of the generated code - code runs perfectly when built with Code::Blocks. Now I'd like to convert my modified C++ source back into the ui XML format that QtDesigner uses. I'm looking for a quick way of doing that (Win7-32

Qt buttons style varying from ui preview to original window

我与影子孤独终老i 提交于 2019-12-12 03:29:10
问题 I am trying to design a virtual keyboard using qt creator and PyQt5, the problem is, the buttons looked modern in the qt creator and when i executed the python file, I got a very old styling for the buttons. How can i get the original styling? The code for buttons used are, self.Q = QtWidgets.QPushButton(self.KEYBOARD) self.Q.setGeometry(QtCore.QRect(0, 0, 80, 60)) font = QtGui.QFont() font.setPointSize(20) self.Q.setFont(font) self.Q.setObjectName("Q") This is the ui rendering in qt creator.

PyQt4 Qt Designer making dynamic GUIs

醉酒当歌 提交于 2019-12-11 18:13:25
问题 I'm trying to figure out a way of using Qt Designer to make a dynamic GUI. For example, let's say I have a main window with a horizontal layout. I have a push button on one side and an empty area on the other. When I click the button the empty area will be filled with a widget that I've made in Qt Designer. When the button is pressed again the widget will be replaced with another widget that I've made in Qt Designer. Would I have to go about making all my widgets, to fill the empty area,