Ok. Good to know the limitation. Working at runtime is a good enough solution.
I had been looking at this: QDesignerFormWindowInterface
But still wasn't able to access the main window.
Thanks for replying so quickly.
Ok. Good to know the limitation. Working at runtime is a good enough solution.
I had been looking at this: QDesignerFormWindowInterface
But still wasn't able to access the main window.
Thanks for replying so quickly.
Heh, you are one step ahead of me, the trolls have added so much in last few Qt releases, that I have trouble to keep up, speically with such not very often used classes.I had been looking at this: QDesignerFormWindowInterface
But still wasn't able to access the main window.
From a brief look in to QDesignerFormWindowInterface, I think that just might be what you are looking for.
Have a look at QDesignerFormEditorInterface::formWindowManager (), and then in QDesignerFormWindowManagerInterface.
I am almost certain that this will allow you to get the form styleSheet on which your custom widget is dropped.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
I finally got it working:
This works for the designer.Qt Code:
form->mainContainer()->styleSheet();To copy to clipboard, switch view to plain text mode
Bookmarks