开发者

Help Me: Loading Qt dialogs from python Scripts

开发者 https://www.devze.com 2022-12-30 17:14 出处:网络
im a novice into developing an application using backend as Python (2.5) and Qt(3) as front end GUI designer. I have 5 diffrent dialogs to implement the scripts. i just knowto load the window (main wi

im a novice into developing an application using backend as Python (2.5) and Qt(3) as front end GUI designer. I have 5 diffrent dialogs to implement the scripts. i just know to load the window (main window)

 from qt import *
    from dialogselectkernelfile import *
    from formcopyextract import *
    import sys
    if __name__ == "__main__":

        app = QApplication(sys.argv)
        f = DialogSelectKern开发者_如何转开发elFile()

        f.show()
        app.setMainWidget(f)
        app.exec_loop()  

main dialog opens on running. i have a set of back,Next,Cancel buttons pusing on each should open the next or previous dialogs. i use the pyuic compiler to source translation.how can i do this from python. please reply i`m running out of time.i dont know how to load another dialog from a signal of push button in another dialog. Help me pls Thanks a Lot


Are you connecting the button click signals to handler functions?

If you are able to get one dialog to open, getting the other dialogs to open should be as simple as instantiating the new dialog and calling the .show() method in the first dialog's button handler.

Maybe you could upload your code somewhere so we can see more of it. What you have above doesn't really help much.


def displayNextForm(self):          
    self.close()
    self.extr=FormMakeImage(self,"FormMakeImage",1,Qt.WStyle_DialogBorder)
    self.extr.exec_loop()
def displayPrevForm(self):
    from DialogSelectFile import *
    self.close()
    self.ext=DialogSelectKernelFile(self,"SelectKernel",1,Qt.WStyle_DialogBorder)
    self.ext.exec_loop()

This did work smooth. I was able to implement the Next back feature. Possible warnings are occuring on Imports. but no problem on running.
Thanks all

0

精彩评论

暂无评论...
验证码 换一张
取 消