Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsView: edit text item in-place
Forum Updated to NodeBB v4.3 + New Features

QGraphicsView: edit text item in-place

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 327 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alexey Serebryakov
    wrote on last edited by
    #1

    Hi guys,
    please point me how can I do this issue?
    When I put text item into QGraphicsView I need that user can edit that item in-place, like in most famous graphics editor.

    Thanks a lot.

    A JonBJ 2 Replies Last reply
    0
    • A Alexey Serebryakov

      Hi guys,
      please point me how can I do this issue?
      When I put text item into QGraphicsView I need that user can edit that item in-place, like in most famous graphics editor.

      Thanks a lot.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #3

      @Alexey-Serebryakov
      void QGraphicsTextItem::setTextInteractionFlags(Qt::TextEditable)

      1 Reply Last reply
      3
      • A Alexey Serebryakov

        Hi guys,
        please point me how can I do this issue?
        When I put text item into QGraphicsView I need that user can edit that item in-place, like in most famous graphics editor.

        Thanks a lot.

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #2

        @Alexey-Serebryakov
        QGraphicsTextItem can edit in-place.
        For relatively small scenes, this is a good solution.
        Hoever, QGraphicsTextItem is relatively heavy, so if you need to create hundreds or thousands, expect delays loading the scene.

        My solution was to create a simple custom QGraphicsItem for just viewing the text, catching the events that start editing (e.g. double click) and placing a QGraphicsTextItem on top of the viewer item when edit started, redirecting focus there etc.

        1 Reply Last reply
        1
        • A Alexey Serebryakov

          Hi guys,
          please point me how can I do this issue?
          When I put text item into QGraphicsView I need that user can edit that item in-place, like in most famous graphics editor.

          Thanks a lot.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #3

          @Alexey-Serebryakov
          void QGraphicsTextItem::setTextInteractionFlags(Qt::TextEditable)

          1 Reply Last reply
          3

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved