Results 1 to 1 of 1

Thread: Trouble creating an extra Widget (or Window or whatever really)

  1. #1
    Join Date
    Sep 2011
    Posts
    1
    Thanked 2 Times in 1 Post
    Qt products
    Platforms
    Unix/X11

    Default Trouble creating an extra Widget (or Window or whatever really)

    Hey... I fear that I soon won't have no hair left so I really have to ask someone.

    I'm trying to open a new widget like an extra window, but whatever I do the windows borders stays gray and I can't do anything with the window except from minimize it (along with my mainwindow)... Everything went so well until I hit this problem a long while ago now and it's extra annoying because I'm almost done with the application otherwise... Anyone care to help a newbie that has been grinding code for over 24 hours?

    Qt Code:
    1. from PyQt4 import uic
    2. from PyQt4.QtCore import *
    3. from PyQt4.QtGui import *
    4.  
    5. (Ui_padlockgui, QMainWindow) = uic.loadUiType(os.path.join(os.path.dirname(os.path.abspath(__file__)),"data","padlockgui.ui"))
    6. (Ui_helpwindow, QWidget) = uic.loadUiType(os.path.join(os.path.dirname(os.path.abspath(__file__)),"data","helpwindow.ui"))
    7.  
    8. class helpwindow(QWidget,Ui_helpwindow):
    9. """helpwindow inherits QWidget"""
    10. def __init__(self):
    11. QWidget.__init__(self)
    12. self.setupUi(self)
    13. def __del__ (self):
    14. self = None
    15.  
    16. class padlockgui (QMainWindow):
    17. """padlockgui inherits QMainWindow"""
    18. def __init__ (self, parent = None):
    19. QMainWindow.__init__(self, parent)
    20. self.ui = Ui_padlockgui()
    21. self.ui.setupUi(self)
    22. self.connect(self.ui.helpButton, SIGNAL('clicked()'), SLOT('helpbutton()'))
    23. def __del__ (self):
    24. self.ui = None
    25. @pyqtSlot()
    26. def helpbutton(self):
    27. self.hw = helpwindow()
    28. self.hw.setWindowTitle('Wallet Padlock Help')
    29. self.hw.show()
    To copy to clipboard, switch view to plain text mode 

    Anyway, best regards!

    Edit: Just quote it in C/C++, I'll manage to figure it out from that...
    Last edited by trasp; 11th September 2011 at 12:56.

  2. The following 2 users say thank you to trasp for this useful post:


Similar Threads

  1. Having Trouble Creating Classes
    By jstippey in forum Newbie
    Replies: 2
    Last Post: 17th March 2011, 15:22
  2. Trouble with creating custom class
    By jstippey in forum Qt Programming
    Replies: 9
    Last Post: 12th January 2011, 14:08
  3. Extra newlines in compile output window
    By Mookie in forum Qt Tools
    Replies: 0
    Last Post: 3rd November 2010, 20:29
  4. Replies: 0
    Last Post: 26th April 2009, 17:55
  5. Extra moveEvent after calling winId for a widget.
    By Alex_123 in forum Qt Programming
    Replies: 1
    Last Post: 31st December 2008, 17:57

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.