Because the position of a widget without an explicitly set geometry is not determined until the widget is shown for the first time.
I think what you are trying to do in general is a dirty hack. What exactly is the purpose for trying to set the stylesheet?2. Is it possible to perform such customization in widget's constructor? I know that "QTimer::singleShot(0, this, SLOT(moveMyCheckbox() ))" will solve this, but I'm not sure if it is not a "dirty hack".
Bookmarks