Results 1 to 4 of 4

Thread: new class -> probs

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: new class -> probs

    You forgot a semicolon after class declaration.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Nov 2009
    Location
    Austria
    Posts
    30
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    5

    Default Re: new class -> probs

    thx, was a little blind

    stupid question but how do i create an object of my class and then call the constructor?

    i tried:
    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3.  
    4. QApplication a(argc, argv);
    5.  
    6. acting_class ac = new acting_class();
    7.  
    8.  
    9. return a.exec();
    10. }
    To copy to clipboard, switch view to plain text mode 

    but that actually won't work, and what's about the * is it like in #c a pointer?

    best regards
    tobi
    Last edited by T0bi4s; 26th November 2009 at 17:13.

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: new class -> probs

    acting_class *ac = new acting_class();

  4. The following user says thank you to squidge for this useful post:

    T0bi4s (26th November 2009)

Similar Threads

  1. QT Class GUI Interactions??
    By mikey33 in forum Newbie
    Replies: 3
    Last Post: 19th November 2009, 02:01
  2. Joomla 1.5 password hash Class 1.0 for QT using C++
    By RajabNatshah in forum Qt Programming
    Replies: 0
    Last Post: 6th October 2009, 15:49
  3. Extending two class "the same way"
    By caduel in forum General Programming
    Replies: 3
    Last Post: 22nd July 2009, 22:55
  4. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57
  5. Replies: 2
    Last Post: 4th May 2006, 19:17

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.