How can I shift a QBitArray in QT?
For example, I have 0010000 which I’d like to shift left, so I would get 0100000. There is no function for this in QT’s documentation concerning QBitArray.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
QBitArray’s purpose is using it for bitmasks of arbitrary sizes, not for arithmetic operations. You cannot shift a QBitArray. If you think you need to shift a QBitArray, then chances are you are abusing this class rather than using it.