Results 1 to 2 of 2

Thread: QCoreApplication problem

  1. #1
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QCoreApplication problem

    I just want to use the variables given in the command line. This is the code:

    Qt Code:
    1. #include <QCoreApplication>
    2. #include <iostream>
    3.  
    4. #include "server.h"
    5. using namespace std;
    6.  
    7. Server::Server(){
    8. cout << "InfoSpeed server beta 0.9\n";
    9. QString listenIp = QCoreApplication::arguments().at(1);
    10. }
    11.  
    12. Server::~Server(){
    13.  
    14. }
    To copy to clipboard, switch view to plain text mode 

    This simple code gives me this error:

    server.cpp: In constructor `Server::Server()':
    server.cpp:18: error: invalid use of undefined type `struct QStringList'
    E:/qt/include/QtCore/../../src/corelib/tools/qstring.h:64: error: forward declaration of `struct QStringList'

    What is wrong ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCoreApplication problem

    Add #include <QStringList>.

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.