简体   繁体   English

基于PyQt GUI的CRUD应用程序

[英]PyQt GUI based CRUD application

I am new to the world of PyQt.I am using PyQt designer for designing the UI and coding to provide functionality in it.But unfortunately I am getting confused to link with the UI.By importing the class we generally doing in examples.But when I try my own code its not happening. 我是PyQt的新手,正在使用PyQt Designer设计UI并进行编码以在其中提供功能,但不幸的是,我很困惑与UI链接,方法是导入我们通常在示例中执行的类。我尝试自己的代码没有发生。

Any hints for how designer and other parts interacts will be super helpful. 有关设计师和其他零件如何相互作用的任何提示将非常有帮助。

Thanks in advance! 提前致谢!

Have you tried: 你有没有尝试过:

class ImageViewer(QtGui.QMainWindow, ImageViewerUI.Ui_MainWindow):

because by default pyuic4 create the class Ui_MainWindow and not Ui_mainWindow 因为默认情况下pyuic4创建类Ui_MainWindow而不是 Ui_mainWindow

winBase, winForm = uic.loadUiType("mainWindow.ui") # this is the 
                                                     file created whith Qt Designer
class Window(winBase, winForm):
   def __init__(self, parent = None)
     super(winBase, self).__init__(parent)
     self.setupUi(self)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM