Results 1 to 3 of 3

Thread: setVisible textblock in QTextEdit

  1. #1
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default setVisible textblock in QTextEdit

    Hi everyone,

    i tried to hide textblock's in QTextEdit, but it doesn't work:

    1. block = textedit.document().begin()
    2. block.setVisible(False)


    This code works fine for QPlainTextEdit, but not for QTextEdit. In documentation i haven't found any mention of how it should work for QTextEdit, just following:

    void QTextBlock::setVisible ( bool visible ) Sets the block's visibility to visible.

    This function was introduced in Qt 4.4.

    See also isVisible().

    How can i hide block's in QTextEdit?

    Thank you in advance

  2. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setVisible textblock in QTextEdit

    Hi Corrado!

    Some time ago I ran into the same problem. We couldn't find a solution then, except using QPlainTextEdit..

    http://www.qtcentre.org/threads/2653...ved?highlight=

    If you can, just leave it and wait for the trolls to come up with a fix for that!

    Johannes

  3. #3
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: setVisible textblock in QTextEdit

    Thanks, i saw your theme. I have to use QTextEdit because only it supports margin settings

Similar Threads

  1. QTextBlock::setVisible()
    By jgrauman in forum Qt Programming
    Replies: 3
    Last Post: 11th December 2009, 01:06
  2. setVisible(false) doesn't work
    By sepehr in forum Qt Programming
    Replies: 2
    Last Post: 4th February 2009, 16:20
  3. [SOLVED] QDockWidget::setVisible() doesn't work
    By Oleg in forum Qt Programming
    Replies: 2
    Last Post: 4th January 2008, 20:27
  4. setVisible, -> token, problems
    By Salazaar in forum Newbie
    Replies: 25
    Last Post: 12th June 2007, 14:30
  5. Slow GraphicsItem->setVisible() with say 200 children
    By sheckey in forum Qt Programming
    Replies: 6
    Last Post: 10th May 2007, 00:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.