Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: #include <QString> error

  1. #21
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: #include <QString> error

    Quote Originally Posted by vieraci View Post
    Providing a default constructor resolved it.
    So it appears that the compiler didn't add a default constructor.
    Like I said, "C++ compilers provide a default constructor in case you don't provide one. But in case you declare anything, you must also implement it".
    J-P Nurmi

  2. #22
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: #include <QString> error

    Yes you were right, but I don't understand why a constructor wasn't declared by the compiler here ??
    Last edited by vieraci; 29th October 2007 at 08:41.

  3. #23
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: #include <QString> error

    Because you told compiler that you want to implement it yourself
    Qt Code:
    1. class AreacodesCombobox : public QComboBox
    2. {
    3. public:
    4. AreacodesCombobox(QWidget *parent = 0); // <-- "hey compiler, i want to implement constructor myself!"
    5. ...
    6. };
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  4. #24
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: #include <QString> error

    D...uuuuuhhhh... of course !! one can be really stupid at times.

  5. #25
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: #include <QString> error

    Heh, it's sometimes surprisingly easy to become blind at your own code.
    J-P Nurmi

Similar Threads

  1. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 03:49
  2. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 13:19
  3. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 25th August 2006, 00:31
  4. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 13:52
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 13:54

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.