Results 1 to 5 of 5

Thread: Override QSplitter to draw new handle

  1. #1
    Join Date
    Sep 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Cool Override QSplitter to draw new handle

    Hi,
    Using Qt4.1 is there a quick/easy way to override the drawing of a QSplitter handle. I would like to get rid of those little dots. I tried overriding the paintEvent which did not work, then I got to thinking that maybe I need to create a new QSplitterHandle and override it's paint event but that just seems like a lot of hard work for what I want to do.

    Many thanks
    Grogan

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Override QSplitter to draw new handle

    Maybe a custom style overriding QStyle::drawControl(QStyle::CE_Splitter)?
    J-P Nurmi

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Override QSplitter to draw new handle

    Thanks for that, it worked but a little too well. I have three splitters on my GUI and would like to control the display of each individually. Any ideas on a per splitter basis?

    Thanks
    Grogan

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Override QSplitter to draw new handle

    Well, you may install styles for individual widgets instead of the whole application.

    Resources:
    J-P Nurmi

  5. #5
    Join Date
    Sep 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Override QSplitter to draw new handle

    Hi All,
    I ended creating a specialised QSplitterHandle and overrode it's paintEvent.

    Job done,

    Thanks for your suggestions.

    Best Regards,
    Grogan

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.