Results 1 to 2 of 2

Thread: Access to the QSplitter of a QMainWindow

  1. #1
    Join Date
    Aug 2008
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Access to the QSplitter of a QMainWindow

    Hello,

    I would like to change the background color of the QSplitter in a QMainwindow.
    I tried setting the styleSheet. But there is a problem. My mainwindow is inside a COM control, realized using QAxBindable. So I have no main() and I can not modify the styleSheet before the mainWindow is created.

    If I use a Qt application as container for my COM control, everything works fine, the splitter gets the grey color derived from the parent (container).
    But do I use the control in a WPF (Windows Forms) container, the splitter remains white. Because most of my centerWidgets or dockingwidgets also have a white background, the splitter can not be seen very good.

    Greetz, Uwe

  2. #2
    Join Date
    Aug 2008
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Access to the QSplitter of a QMainWindow

    I tried to find the splitter among the children of the mainwindow
    Qt Code:
    1. QSplitter* splitter = this->findChild<QSplitter*>();
    To copy to clipboard, switch view to plain text mode 

    or I tried to find all widgets
    Qt Code:
    1. QList<QWidget*> swList = this->findChildren<QWidget*>();
    To copy to clipboard, switch view to plain text mode 
    and have set the color of all roles in the palette to red.
    Everything turned red except the splitter.

    Has anyone a hint for what I should search?

Similar Threads

  1. Replies: 0
    Last Post: 17th November 2010, 17:07
  2. Replies: 1
    Last Post: 12th October 2010, 04:39
  3. QSplitter
    By weixj2003ld in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2009, 13:46
  4. New to QSplitter
    By bruccutler in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2007, 16:43
  5. QSplitter
    By Solarity in forum Newbie
    Replies: 2
    Last Post: 10th February 2006, 17:05

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.