Results 1 to 2 of 2

Thread: QMap and static problem

  1. #1

    Default QMap and static problem

    I have a class contain static member
    Qt Code:
    1. static QMap<QString, QString>list;
    To copy to clipboard, switch view to plain text mode 
    in header file.How to use and initialize it in .cpp file?Thanks.
    Last edited by jpn; 11th March 2008 at 22:26. Reason: changed [qtclass] to [code] tags

  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: QMap and static problem

    Just put this in your .cpp file:
    Qt Code:
    1. QMap<QString, QString> YourClass::list;
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Static Init of a QMap
    By Scorp1us in forum Qt Programming
    Replies: 2
    Last Post: 22nd June 2010, 16:08
  2. Qmap problem on a static lib
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 30th March 2007, 13:11
  3. Replies: 4
    Last Post: 14th February 2006, 22:35

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.