Results 1 to 6 of 6

Thread: errors in addressbook tutorial?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question errors in addressbook tutorial?

    First, greetings to all. I just initiated in Qt 4.3.4. and I have been following the tutorial that accompanies the installation 'addressbook'. I have scrupulously followed all the steps but when I arrive while adding this code:


    Qt Code:
    1. if (dialog.exec()) {
    2. QString name = dialog.name();
    3. QString email = dialog.email();
    4. if (!name.isEmpty() && !email.isEmpty()) {
    5. QListWidgetItem *item = new QListWidgetItem(name, ui.addressList);
    6. item->setData(Qt::UserRole, email);
    7. ui.addressList->setCurrentItem(item);
    8. }
    9. }
    To copy to clipboard, switch view to plain text mode 
    to compile, I get the errors:

    `QListWidgetItem' undeclared (first use this function)
    `QListWidgetItem' has not been declared
    `item' undeclared (first use this function)
    What is that? Do the tutorial has mistakes or I who is wrong? I appreciate any clarification to my question. Thanks.
    Last edited by jpn; 13th March 2008 at 06:43. Reason: missing tags

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.