Results 1 to 5 of 5

Thread: QSplitterHandle

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default QSplitterHandle

    Hey there,

    I'm using a QSplitter to divide two Lists.
    The QSplitterHandle is 5 pixels width.

    I'd like that handle to be invisible but keeping the control on my spllitted widgets at the same time: thus avoiding the 5 pixels width border.

    Anyone ever did that ?

  2. #2
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QSplitterHandle

    Try setHandleWidth(1) on your QSplitter. Don't try setHandleWidth(0) because that won't work; it seems to require a width of at least 1. You can also set it through the designer if you created your splitter in there (same width rules apply).

    -- ntp

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

    bunjee (23rd February 2008)

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSplitterHandle

    If you don't need the handle then maybe you don't need the splitter at all. You can set sizes of widgets manually without the splitter.

  5. #4
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSplitterHandle

    And note, that splitter handle (even with width = 1) painting is depending on style, so it may looks weird on some style.
    If you are using styles(i mean if user can change style used by application) or you are planning to, you should override your splitter & splitter handle and override paintEvent.
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSplitterHandle

    One can also provide an own splitter handle. It can probably be an empty QWidget.

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.