[Qt-interest] will setStyleSheet() to cause a QWdiget allways on top?
Girish Ramakrishnan
girish at forwardbias.in
Sun May 1 11:48:41 CEST 2011
Did you check what happens without the setStyleSheet() call? It's
unlikely that stylesheet changes the z-order of widgets.
Girish
On Sat, Apr 30, 2011 at 1:37 PM, James Yan <james.pizza at gmail.com> wrote:
> Hey All,
> I've two QWidget A & B, then i make A stylish with setStyleSheet, and hope
> to put B on A.(i.e. to take A as background of B).
> the code looks like this:
> ===
> A = new QWidget(this);
> A->setStyleSheet("...background-color: qlineargradient(...");
> B = new QWidget(this);
> A->resize(...);
> A->move(...);
> B->resize(...);
> B->move(..);
> ==
> But the result shows : A will be always on top of B, even i try to use
> B->raise() and A->lower(), is it a bug or something? any hint or other
> suggestions? so far, i think the setStyleSheet is really a great feature,
> but sometimes it be a little bit wired as compared to normal widget. :(
> regards,
> James
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list