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. Code Editor Example - Horizontal Scrolling
Forum Updated to NodeBB v4.3 + New Features

Code Editor Example - Horizontal Scrolling

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 256 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.
  • M Offline
    M Offline
    mjurjevic
    wrote on last edited by
    #1

    I have been working on application that will use similar widget to one described in Qt's Code Editor example. I've started from there and upgraded LineNumberArea + added similar area between LineNumberArea and QPlainTextEdit widget for showing memory addresses (AddressArea).

    0_1556627887077_first.png
    On the image above, scroll slider is on minimum. Moving slider only scrolls QPlainTextEdit widget.
    0_1556627907122_second.png

    My problem is that LineNumberArea and AddressArea are fixed. They are not affected by horizontal scrolling. Vertical scrolling is working fine as that is done in updateLineNumberArea -> which receives only dy scroll value.
    Finally my question is, how can I achieve that when moving horizontal slider, LineNumberArea and AddressArea are shifted to the left that is scroll as they were part of QPlainTextEdit widget's scroll functionality?

    1 Reply Last reply
    0

    • Login

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