Results 1 to 5 of 5

Thread: How to access Main Window's members from an object belongig to a user defined class

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to access Main Window's members from an object belongig to a user defined cla

    Actually, it is more like a recursive inclusion. Population includes main window, and the other way around.

    Add ifdefs to population.h too to make it compile only once.
    Something like:
    Qt Code:
    1. #ifndef POPULATION_H
    2. #define POPULATION_H
    3.  
    4. //class declarations, etc
    5.  
    6. #endif
    To copy to clipboard, switch view to plain text mode 

    Also, in Ui_mainwindow.h, if possible, store a pointer to Population and include population.h in the cpp only.

    Regards

  2. The following user says thank you to marcel for this useful post:

    fabietto (26th June 2007)

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
  •  
Qt is a trademark of The Qt Company.