Results 1 to 5 of 5

Thread: How to hide the handle of QSplitter?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2012
    Location
    Iran, Tehran
    Posts
    76
    Thanks
    17
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Question How to hide the handle of QSplitter?

    How can I hide the handle of the QSplitter?

    And

    How to change its appearance to a line, like splitters in Qt Creator? QSplitter::setHandleWidth(1) doesn't have the effect.

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to hide the handle of QSplitter?

    not the best suggestion but try this also ...

    use the stylesheet of QSplitter and adda dummy icon

    QSplitter::handle {
    image: url(images/Dummy.png);
    }
    "Behind every great fortune lies a crime" - Balzac

  3. The following user says thank you to wagmare for this useful post:

    Ashkan_s (15th October 2012)

  4. #3
    Join Date
    Sep 2012
    Location
    Iran, Tehran
    Posts
    76
    Thanks
    17
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Post Re: How to hide the handle of QSplitter?

    using
    Qt Code:
    1. splitter->setHandleWidth(1);
    2. qApp->setStyleSheet("QSplitter::handle{background-image: url(:/images/img-1.png);}");
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. splitter->setHandleWidth(1);
    2. qApp->setStyleSheet("QSplitter::handle{background-color: black;}");
    To copy to clipboard, switch view to plain text mode 

    it is possible to change its appearance to look like a line.
    Still I'm not able to hide the handle.

  5. The following user says thank you to Ashkan_s for this useful post:


Similar Threads

  1. qsplitter
    By marc2050 in forum Newbie
    Replies: 3
    Last Post: 31st May 2011, 16:06
  2. QSplitter handle invisible on Win32
    By para in forum Qt Programming
    Replies: 3
    Last Post: 23rd November 2010, 13:21
  3. Bug in QSplitter with Qt4.5.1
    By araglin in forum Qt Programming
    Replies: 1
    Last Post: 28th April 2009, 07:45
  4. New to QSplitter
    By bruccutler in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2007, 16:43
  5. Override QSplitter to draw new handle
    By grogan in forum Qt Programming
    Replies: 4
    Last Post: 27th September 2006, 03:40

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.