Results 1 to 2 of 2

Thread: how to get common element from a group of QStringList?

  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    31

    Default how to get common element from a group of QStringList?

    Hi all,
    I have problem, in my program i'm using a hash variable
    QHash<QString,QStringList> HFileSignal;
    It is a hash of file name and signal name list inside the file.
    Now i want to find common signals from al those file.

    So kindly tell me
    1. Is there any buit in function in Qt to achieve this?
    2.How can i declare a variable name on fly(while running program, inside a loop i must able to declare the variable)?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: how to get common element from a group of QStringList?

    1. No.
    2. Make a simple function which loops through the elements. If it is a huge hash you could consider a better algorithm.

Similar Threads

  1. QML: Applying common behaviour to a group of elements
    By alex_lord in forum Qt Programming
    Replies: 0
    Last Post: 4th August 2010, 02:54
  2. Using a common datamodel across dialogs?
    By Frozenjim in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2008, 00:14
  3. Common question about porting Qt3 to Qt4
    By zlatko in forum Qt Programming
    Replies: 4
    Last Post: 21st February 2007, 10:57
  4. Common icon repository
    By brcain in forum Newbie
    Replies: 2
    Last Post: 27th September 2006, 19:30
  5. Replies: 7
    Last Post: 2nd June 2006, 12:48

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.