You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, April 3rd 2014, 11:39am

How to get binary rendering (as QByteArray) from a QString?

Goodmorning everybody,
I'd like to get the binary rendering from a genric QString (1bit/pixel, that means black or white).
For example, from the string:
QString letter="A";
The binary information should be, something like this (depending on selected QFont):

000010000
000101000
001111100
010000010
100000001
And so,the QByteArray will contain the following data: "000010000.....100000001"
Can anybody help me?