qt - Find border image of QMainWindow programatically -


I have set a border image on my QMainWindow using a style sheet:

  QMainWindow {boundary-image: url (: / metal_back field); }  

In my program, there are several widgets with a transparent background color that sit at the top of the main window. However, when I drag and drop them, they look bad because they take the color of the system background.

What would I like to do is to draw the brush (?) To the main window background, and use it to paint the hair widget while it is being transferred I've tried:

< Pre> QWidget * widget; QMainWindow * mainWindow; QList & LT; QWidget * & gt; Widgets = qApp- & gt; ToplevelWizts (); Exotic (widgets, widgets) (if (widget-> objectname) == "main window") // name is OK then break; } Main window = static_cast & lt; QMainWindow * & gt; (Widget); QDebug () & lt; & Lt; MainWindow- & gt; Objectname (); Pellet palette; Palette .cssbrush (it-> pageviewer (), main window-palette (.) Brush (main window-> pageview ()); This- & gt; SetPalette (palette); This- & gt; Repaint ();

But it gives the color / gradient of the background, not the image. Am I doing something wrong or what other / better way to get the image?


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -