Results 1 to 3 of 3

Thread: QPlainTextEdit inherited + invisibleQTextBlock + INVALID vertical scroll bar

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPlainTextEdit inherited + invisibleQTextBlock + INVALID vertical scroll bar

    So I traced it to resizeEvent,
    the method needed to call is
    d->relayoutDocument();,
    but is private so i can't call it directly,

    it is bounded by if (old_width != now_width),

    so questions are:
    - how to call private member
    - how to make old_width dirty, as calling resize event is quite simple
    - which other member is calling this private member (of QPlainTextEdit)

    member I traced it in is
    Qt Code:
    1. void QPlainTextEdit::resizeEvent(QResizeEvent *e)
    2. {
    3. Q_D(QPlainTextEdit);
    4. if (e->oldSize().width() != e->size().width())
    5. d->relayoutDocument();
    6. d->_q_adjustScrollbars();
    7. }
    To copy to clipboard, switch view to plain text mode 
    experimentaly verified with debugger (by tikering code flow) that d->_q_adjustScrollbars(); is NOT doing what it is supposed to,
    d->relayoutDocument(); is the one I need,

    So will there be any quick answer for any of my three questions or am I about to look inside the method where more exactly the problem is being solved?

  2. #2
    Join Date
    Sep 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPlainTextEdit inherited + invisibleQTextBlock + INVALID vertical scroll bar

    solved by calling resizeEvent(...) with faked QResizeEvent

Similar Threads

  1. QPlainTextEdit auto scroll
    By faldzip in forum Qt Programming
    Replies: 5
    Last Post: 13th January 2010, 18:11
  2. How to disable vertical scroll bar in QTableWidget
    By grsandeep85 in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2009, 11:07
  3. vertical scroll bar in Qt box.
    By rajveer in forum Qt Programming
    Replies: 1
    Last Post: 22nd October 2008, 07:41
  4. Continously Scroll QPlainTextEdit
    By GimpMaster in forum Newbie
    Replies: 2
    Last Post: 12th September 2008, 17:35
  5. Vertical Scroll Bar - Style Sheet
    By vishesh in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2007, 19:03

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.