Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:44:42+00:00 2026-05-15T23:44:42+00:00

How to write text in a certain cordinate in QGraphicsScene? I was trying to

  • 0

How to write text in a certain cordinate in QGraphicsScene? I was trying to do like this, but with no success. Text has black borders but inside the letters it is white, and I can’t make it black.

    QPainterPath path;

    QFont font;
    font.setPixelSize(50);

    path.addText(100, 50, font,  tr("Hello World!!!"));
    path.setFillRule();

    m_graphScen->addPath(path);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:44:43+00:00Added an answer on May 15, 2026 at 11:44 pm

    Variant 1 (not a good one):

    QFont font;
    font.setPixelSize(10);
    font.setBold(false);
    font.setFamily("Calibri");
    
    path.addText(100, 50, font,  "Hello World!!");
    
    m_graphScen->addPath(path, QPen(QBrush(Qt::black), 1), QBrush(Qt::black));
    

    Variant 2 (fine version):

    QGraphicsTextItem * io = new QGraphicsTextItem;
    io->setPos(150,70);
    io->setPlainText("Barev");
    
    m_graphScen->addItem(io);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way I can write text to a file from a certain
My current knowledge: If you are trying to write text files in vbscript /
Summary: I'm trying to write a text string to a column of type varchar(max)
I'm trying to write a free text search algorithm for finding specific posts on
I'm trying to read a file then append some text to a certain place
I would like to write a Ruby program which can parse three separate text
i'm using setInterval to check if a p(html paragraph) has a certain text value.
Right now I'm trying to write a script that will only accept certain audio
I'm trying to write an awk script which checks certain conditions and throws away
I am trying to read an extremely large text file. I want to write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.