Results 1 to 2 of 2

Thread: Qmap problem on a static lib

  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qmap problem on a static lib

    I have a 1000 line QMap ...
    typedef QMap<int, QStringList> TableAi;

    wen i make the static lib on window .. work all fine... Build (7Min.)
    the same on linux compiler stay a lot of time to compile 1H. && Load average go to 20%
    Why? is better to load on a XML file resource? this params?

    Linux have 1GB ram (2GB swap) && Pentium 4 / 3Ghz... &&
    Win dual core Intel 1.8 Ghz && 1GB ram (on top from a Mac dual boot)

    the moc file stay 2Kb

    The function from this lib respond on 30 Msec... on Qmap && 200 Msec on xml resource???


    Qt Code:
    1. typedef QMap<int, QStringList> TableAi;
    2.  
    3. Box_att.clear();
    4. Box_att.insert(0,QStringList() << "a" << "100");
    5. Box_att.insert(1,QStringList() << "abi" << "101");
    6. Box_att.insert(2,QStringList() << "abl" << "102");
    7. Box_att.insert(3,QStringList() << "ac" << "103");
    8. Box_att.insert(4,QStringList() << "af" << "104");
    9. Box_att.insert(5,QStringList() << "ag" << "105");
    10. Box_att.insert(6,QStringList() << "al" << "106");
    11. Box_att.insert(7,QStringList() << "ald" << "107");
    12. Box_att.insert(8,QStringList() << "all" << "108");
    13. Box_att.insert(9,QStringList() << "alm" << "109");
    14. Box_att.insert(10,QStringList() << "am" << "110");
    To copy to clipboard, switch view to plain text mode 
    Last edited by patrik08; 30th March 2007 at 10:14.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,371
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qmap problem on a static lib

    Yes, I suggest you load it runtime or iterate over a statically assembled dataset (you can use the Qt resource system for that).

  3. The following user says thank you to wysota for this useful post:

    patrik08 (30th March 2007)

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 10:12
  2. problem after Qt 4.2.2 static build
    By npc in forum Newbie
    Replies: 2
    Last Post: 23rd February 2007, 12:28
  3. QMap Problem with arguments.
    By ankurjain in forum Qt Programming
    Replies: 1
    Last Post: 24th May 2006, 12:12
  4. Problem with libmng on static link
    By jlbrd in forum Installation and Deployment
    Replies: 2
    Last Post: 10th May 2006, 22:38
  5. Replies: 4
    Last Post: 14th February 2006, 21: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
  •  
Qt is a trademark of The Qt Company.