Results 1 to 2 of 2

Thread: Creating popup windows pyqt4

  1. #1
    Join Date
    Jan 2010
    Posts
    20
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Creating popup windows pyqt4

    I'm trying to create a pop up window to run in the beginning of my program. I am wondering how to make my popup window show once I run my program and how to create a signal slot connection from that popup window to my main window using pyqt4 and qt4 designer?

    To start off: I have created a new dialog called popup with two buttons, ok and cancel using qt4 designer. This is the window I would like to make a signal slot connection between the main window and the dialog. Thank you in advance.

  2. #2
    Join Date
    Apr 2011
    Posts
    2
    Qt products
    Platforms
    Unix/X11

    Default Re: Creating popup windows pyqt4

    Im trying to do the same thing. I have my main window class and in one of the methods I want to call a dailogUi popup window. I have no clue how.

    Qt Code:
    1. from PyQt4 import QtGui, QtCore
    2. import sys
    3. import tweepy
    4. import os
    5. from my_functions import *
    6. import libertasUi
    7. import fileUi
    8. import connectionUi
    9. import pinUi
    10. import webbrowser
    11.  
    12. class Libertas(QtGui.QWidget, libertasUi.Ui_Form):
    13. def __init__(self, parent=None):
    14. super(Libertas, self).__init__(parent)
    15. self.setupUi(self)
    16.  
    17. def pop_ups(self, code):
    18. if code == 15:
    19. file_dailog =fileUi.Ui_Dialog()
    20. file_dailog.show
    21. elif code == 10:
    22. pass
    23. else:
    24. pass
    25.  
    26.  
    27. def main(self):
    28. self.show()
    29. self.get_lists()
    30.  
    31.  
    32. if __name__ == '__main__':
    33. app = QtGui.QApplication(sys.argv)
    34. libertas = Libertas()
    35. libertas.main()
    36. app.exec_()
    To copy to clipboard, switch view to plain text mode 

    I made the dialog with qt designer and compiled it to fileUi.py. It is basically an oops! dialog "Cant find file"
    I get the error
    Qt Code:
    1. AttributeError: 'Ui_Dialog' object has no attribute 'show'
    2. Segmentation fault
    To copy to clipboard, switch view to plain text mode 
    I dont see whats wrong.

Similar Threads

  1. Creating a Graph from a .csv file pyqt4
    By jaybstory in forum Newbie
    Replies: 1
    Last Post: 19th January 2010, 22:12
  2. Replies: 3
    Last Post: 17th May 2009, 20:17
  3. Replies: 6
    Last Post: 4th February 2009, 07:46
  4. Creating a dll file under windows
    By schall_l in forum Qt Programming
    Replies: 3
    Last Post: 28th March 2008, 11:55
  5. Creating a popup toolbox
    By Jachyra in forum Qt Programming
    Replies: 5
    Last Post: 18th February 2007, 11:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.