qt-designer

AttributeError: 'MyMainWindow' object has no attribute 'pushButton'

江枫思渺然 提交于 2021-02-18 18:17:49
问题 Trying to proceed click button event in my code but got some issue. AttributeError: 'MyMainWindow' object has no attribute 'pushButton' Seems, like clicked event can`t find pushbutton from my subclass. Probably i did some mistakes in syntax, so really waiting for your help guys. Sorry if the question very banal, pyQt5 is simply new for me, trying to figure out in all of this. Here is my files. ui_main.py # -*- coding: utf-8 -*- # Form implementation generated from reading ui file '1.ui' # #

how do i create a custom (widget) plugin for qt designer with cmake ( and visual studio )

怎甘沉沦 提交于 2021-02-18 12:11:28
问题 The amount of tutorials, how to create a qt designer plugin is very thin..and the ones i found always use qt creator ( like this one : http://qt-project.org/doc/qt-4.8/designer-customwidgetplugin.html ). Where i have to add some qt definitions in the .pro file CONFIG += designer plugin I use CMake and Visual Studio for coding, so it would be really awesome if someone could tell me how i successfully create a .dll that i can put in the plugins/designer folder to have the custom widget show up

access element from .ui

旧巷老猫 提交于 2021-02-10 20:27:26
问题 I have problem to access my button and label from my dialog.ui. I am using Python 3.x and QT Designer 5.x. from PyQt5 import uic, QtWidgets from PyQt5.QtWidgets import QApplication Form, Window = uic.loadUiType("dialog.ui") #load ui (GUI) file app = QApplication([]) #create a QApplication window = Window() form = Form() form.setupUi(window) def on_click(): # self.qlFreeText.text("hello") alert = QMessageBox() alert.setText("You clicked the button!") alert.exec_() class Ui(QtWidgets

access element from .ui

扶醉桌前 提交于 2021-02-10 20:25:52
问题 I have problem to access my button and label from my dialog.ui. I am using Python 3.x and QT Designer 5.x. from PyQt5 import uic, QtWidgets from PyQt5.QtWidgets import QApplication Form, Window = uic.loadUiType("dialog.ui") #load ui (GUI) file app = QApplication([]) #create a QApplication window = Window() form = Form() form.setupUi(window) def on_click(): # self.qlFreeText.text("hello") alert = QMessageBox() alert.setText("You clicked the button!") alert.exec_() class Ui(QtWidgets

How to make the actual table adjust its size to the QTableWidget container?

末鹿安然 提交于 2021-02-07 20:24:00
问题 I do not even know how to ask this question. I have the following table: You can see how the QTableWidget is selected, but the actual table is smaller. How can I make the table to be the same size of the QTableWidget container? I am using QT-Designer. Thanks! 回答1: from Qt Designer there are horizontalHeaderStretchLastSection and verticalHeaderStretchLastSection properties on QTableWidget. 来源: https://stackoverflow.com/questions/13689184/how-to-make-the-actual-table-adjust-its-size-to-the

How to fix buttons not showing properly using Python, PyQt5, and Pyinstaller

别等时光非礼了梦想. 提交于 2021-02-05 11:12:29
问题 I created an interface using Qt Designer and integrated it into my python code using PyQt5. I then created an exe file using Pyinstaller and the interface shows up fine on my laptop using Windows 10 Home. However testing on a different windows machine using Windows 10 Pro shows the buttons and labels all cut out , with wrong font and all as shown below. For example, the top title should be GEODISTANCE CALCULATOR' but only shows 'GEODISTANCE CA'. What causes this incompatibility and how can I

Picture not showing on my loading screen in QLabel

ε祈祈猫儿з 提交于 2021-02-05 11:12:28
问题 I'm currently using QT designer to show a picture on my loading screen. It should look like this: However, it looks like this: This is because for some reason its not showing my picture, when it registers in my IDE that the filepath is correct as seen here: The only time the picture actually shows in my loading GUI is when I use the FULL file path which is: C:\Users\myalt\OneDrive\Desktop\GUINEW\assets\PostmonkeyLogo.png But of course, this is not viable when this software will be used on

Picture not showing on my loading screen in QLabel

只谈情不闲聊 提交于 2021-02-05 11:12:13
问题 I'm currently using QT designer to show a picture on my loading screen. It should look like this: However, it looks like this: This is because for some reason its not showing my picture, when it registers in my IDE that the filepath is correct as seen here: The only time the picture actually shows in my loading GUI is when I use the FULL file path which is: C:\Users\myalt\OneDrive\Desktop\GUINEW\assets\PostmonkeyLogo.png But of course, this is not viable when this software will be used on

How to fix buttons not showing properly using Python, PyQt5, and Pyinstaller

∥☆過路亽.° 提交于 2021-02-05 11:10:29
问题 I created an interface using Qt Designer and integrated it into my python code using PyQt5. I then created an exe file using Pyinstaller and the interface shows up fine on my laptop using Windows 10 Home. However testing on a different windows machine using Windows 10 Pro shows the buttons and labels all cut out , with wrong font and all as shown below. For example, the top title should be GEODISTANCE CALCULATOR' but only shows 'GEODISTANCE CA'. What causes this incompatibility and how can I

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

狂风中的少年 提交于 2021-02-04 22:11:20
问题 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