Results 1 to 2 of 2

Thread: CloseEvent gives invalid use or incomplete 'struct QCloseEvent'

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: CloseEvent gives invalid use or incomplete 'struct QCloseEvent'

    You need to have a declaration of the QCloseEvent class in order for the compiler to compile this code (this is not a Qt problem). The quickest way is to:
    Qt Code:
    1. // In your header file
    2. #include <QCloseEvent>
    3.  
    4. OR
    5. // in your header
    6. // and in your cpp file
    7. #include <QCloseEvent>
    To copy to clipboard, switch view to plain text mode 

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

    nackasha (30th October 2011)

Similar Threads

  1. invalid use of incomplete type 'struct MSG'
    By libed in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2019, 12:32
  2. QSql - incomplete type 'struct QVariant'
    By UltramaticOrange in forum Newbie
    Replies: 2
    Last Post: 5th October 2010, 19:07
  3. error: invalid use of incomplete type 'struct QMetaEnum'
    By dyngoman in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2010, 13:38
  4. Replies: 4
    Last Post: 12th October 2009, 19:36
  5. Forward Declaration of struct QCloseEvent ????
    By drake1983 in forum Newbie
    Replies: 2
    Last Post: 3rd February 2009, 15:16

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