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 7901235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:10:10+00:00 2026-06-03T09:10:10+00:00

So, the method select(SelectionType) in the class QTextCursor only has 4 possible parameters. QTextCursor::Document

  • 0

So, the method select(SelectionType) in the class QTextCursor only has 4 possible parameters.

QTextCursor::Document
QTextCursor::BlockUnderCursor
QTextCursor::LineUnderCursor
QTextCursor::WordUnderCursor

Is it possible to create custom selectiontypes? Say if I want to select the text from position 5 to 9. Thanks!

http://doc.qt.io/qt-5/qtextcursor.html#select

  • 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-06-03T09:10:11+00:00Added an answer on June 3, 2026 at 9:10 am

    Use setPosition like this:

    cursor.setPosition(5);
    cursor.setPosition(9, QTextCursor::KeepAnchor);
    

    This will set the cursor’s Anchor to 5 and its Position to 9. The selection is the text between anchor and position.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was using the Add class method $(select[name=' + ABC+ i + ']).addClass('addBorder'); This
How do I select multiple columns in linq to sql method syntax? I only
Is it possible to (perhaps with Firebug) or some other method to select ALL
jQuery has the .select() method, which lets you execute a function when text is
I create method for select current premises foto, all works good public function findByDistrictIds($criteria)
I'm looking for an equivalent method to select a class element like this $(.className)
I have class Books and method select in it. Also there is an instance
I am using the .eq() method to select a specific child element of a
Is there an easy and straight-forward method to select elements based on their data
hopefully a pretty simple question this time. I have a Select method in a

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.