PDA

View Full Version : qt 4 color palette / style sheet question



killerwookie99
6th November 2008, 17:48
In qt3 I used to do a qpalettebackground color grab of different widget, say mainwindow. Then I could set a qlineedit to setQPaletteBackgroundColor to mainwindows background color and not have to worry if the color was changed in qsettings. How can I accomplish this. I can set stylesheet to gray, but that doesn't match the mainwindow. And I haven't seen a clever way to do this.

jacek
7th November 2008, 00:05
Use QPalette with QPalette::Base color set to the same value as QPalette::Window.