Re: Setting a Style Issue
Can you give a little more info, please? I'm not sure what you mean by "placing the widget in a new window". Is it still part of the same QApplication? Generally once you set the style for an application widgets will default to that style.
Are you able to get your widget to use the CleanLooks style when it's not in a new window? Or does the style not work at all for that widget?
Re: Setting a Style Issue
At first the push-pin widget is displayed within another widget (and does paint with the CleanLooks style). Example:
Code:
----------------------------
| Main Widget |
| ----------------- | // Both have Clean Looks Style
| | Push-Pin | |
| | Widget | |
| ----------------- |
| |
----------------------------
When I run the code shown below, the Push-Pin Widget displays in it's own window (which is what I want), however it no longer uses the CleanLooks style.
Code:
Qt::WindowFlags flags = Qt::Window;
flags |= Qt::WindowStaysOnTopHint;
setWindowFlags(flags);
this->setStyle(QStyleFacory::create("cleanlooks"));
setVisible(true);
----------------------------
| Main Widget | // Main Widget has CleanLooks Style
| | -----------------
| | | Push-Pin |
| | | Widget |
| | -----------------
| | // Push-Pin widget does not have CleanLooks
----------------------------
My goal is to get the Push-Pin Widget to always use the CleanLooks style.
Hope this clarifies
Re: Setting a Style Issue
Ahh...so frustrating. I just realized that this situation has nothing to do with the style. The style is being passed on to the Push-Pin Widget, however a coworker changed the Palette on the widget...so items displayed differently (and stupid me, I took that to be a sign of a different style). Thanks for all the help though...
Re: Setting a Style Issue
No problem. Glad you got it resolved 'cause I was having a tough time figuring out what was going wrong there :)
Re: Setting a Style Issue
Ha, I'm glad also...thanks for looking into it for me.