1

I am trying to construct a string (QString) made up of 'bullets' (black small circle, U+2022).

Anyone know how I'd do this?

Thanks in advance, Wes

eg: "* * * * * *" but bullets instead of asterisks

3 Answers 3

2

You can create a single black bullet by using:

QString::fromUtf8( "\u2022" );

You can string some of those together to get what you want.

Sign up to request clarification or add additional context in comments.

Comments

1

How about

QString circle(L"\u2022");

1 Comment

Or if you want 5 bullets: QString circles(5, QChar(0x2022));
0

Is is not the syntax like.

new QString(L"**");

And ensure that your source file is UTF-8 encoded?

Sorry I can't try that myself.

2 Comments

In C++, new isn't that common.
Thats right, RAII is the way to go. However I used new here to show that a new QString was getting constructed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.