Results 1 to 9 of 9

Thread: from c++ to pyqt4 QByteArray

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: from c++ to pyqt4 QByteArray

    sigh. Next time please be more wary of wasting people's time with nonsense code. Also use code tags!
    I still don't understand what this is meant to be doing
    Qt Code:
    1. char nucl = seq[i];
    2. char complNucl = map.at(nucl); // map.at takes an int - why is a char being passed here? You get trouble if char is signed and a negative number...
    To copy to clipboard, switch view to plain text mode 



    Qt Code:
    1. def myMapper(self):
    2. return QByteArray(256, 0)
    3.  
    4. sequence = QByteArray("ABCDESFGTTTTTT")
    5. some_sensible_number = 3 # this is just an example...
    6. opq = sequence.mid(some_sensible_number).data()
    7. map = myMapper()
    8.  
    9. for i in range(__visible_range__): # visible range, not sequence.size() as you tried to fool us with
    10. rdf = opq.at(i)
    11. cl = map.at(ord(rdf)) # guessing ord is ok, might not be
    To copy to clipboard, switch view to plain text mode 
    Last edited by amleto; 6th December 2012 at 17:42.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Replies: 0
    Last Post: 5th August 2012, 01:03
  2. Replies: 1
    Last Post: 22nd June 2011, 08:12
  3. [PyQt4] PyQt4 + gcin issue
    By fieliapm in forum Installation and Deployment
    Replies: 0
    Last Post: 28th September 2010, 08:04
  4. Replies: 9
    Last Post: 25th July 2009, 13:27
  5. Need Help for PyQt4
    By JAIDEEP KANDELWAL in forum Qt Programming
    Replies: 0
    Last Post: 22nd April 2009, 23:08

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.