Results 1 to 13 of 13

Thread: I got it wrong, can't compile

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: I got it wrong, can't compile

    Sorry about it, terrible mistake. I confused myself.
    About the uninitialized variable, this is how the ICS video wrote the code:
    Qt Code:
    1. ListDelegate delegate;
    2. QListView view;
    3. view.setItemDelegate(&delegate);
    4. view.show();
    To copy to clipboard, switch view to plain text mode 

    Which does not compile and outputs:
    Qt Code:
    1. F:\Documents\QT Projects\QListView_test/main.cpp:8: undefined reference to `ListDelegate::ListDelegate(QObject*)'
    2. :-1: error: collect2: ld returned 1 exit status
    To copy to clipboard, switch view to plain text mode 

    And the ListDelegate class is written exactly as the video. But you are definitely right about my C++ skills...

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


Similar Threads

  1. What's wrong??
    By dreamer in forum Qt Programming
    Replies: 2
    Last Post: 25th June 2008, 08:07
  2. What's wrong with my actions???
    By fullmetalcoder in forum Qt Programming
    Replies: 6
    Last Post: 4th March 2007, 18:49
  3. What is wrong with this simple example ?
    By igor in forum Qt Programming
    Replies: 10
    Last Post: 16th January 2007, 11:26
  4. What's wrong with this connection??
    By SkripT in forum Qt Programming
    Replies: 4
    Last Post: 12th March 2006, 19:44
  5. Help please - what am I doing wrong?
    By Jimmy2775 in forum Qt Programming
    Replies: 6
    Last Post: 6th March 2006, 22:06

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.