Results 1 to 3 of 3

Thread: Accessing QMainWindow methods

  1. #1
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Accessing QMainWindow methods

    Hi,
    Is there a built-in macro in Qt that can gain access to the public methods of QMainWindow from it's child windows, or is it something that the programmer implements ?

    Like, it means for every child window it needs the QMainWindow header file included. This can get very repetitive when there is lots of child windows.

  2. #2
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Accessing QMainWindow methods

    Found my solution, use Signals and Slots.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Accessing QMainWindow methods

    Alternatively, you could pass main windows pointer to child windows.. if it suits your design implementation.

Similar Threads

  1. QMainWindow with QMainWindow
    By baray98 in forum Qt Programming
    Replies: 3
    Last Post: 12th April 2011, 07:07
  2. Maximumsize by layout QMainWindow
    By captiva in forum Qt Programming
    Replies: 7
    Last Post: 24th February 2009, 19:41
  3. QMainWindow setCentralWidget from ui widget, Qt4
    By alan in forum Qt Programming
    Replies: 5
    Last Post: 13th May 2008, 13:00
  4. QMainWindow child of a QDialog
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2008, 07:16
  5. Replies: 18
    Last Post: 22nd February 2006, 20:51

Tags for this Thread

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.