[PyQt] restoreState not working for QDockWidgets
brianz at gmail.com
Wed Nov 18 08:26:11 GMT 2009
This isn't the first time, but during the exercise of getting a small
runnable example I figure out the problem.
The issue was that I was calling mainwindow.restoreState(), after which I
was setting up all of my dock widgets. By moving the restore state call
*after* the dock widgets initializations, everything works as expected.
Thanks for the push on this one....it obviously helped.
On Thu, Nov 12, 2009 at 7:40 AM, Brian Zambrano <brianz at gmail.com> wrote:
> Hi guys,
> I hear ya...it's something I've found a bit hard with GUI programming. The
> code gets quite large and involved, so boiling it down to a self contained
> example demonstrating the issue takes some work. But, I agree it's worth
> doing and the issue very well may be solved during that exercise. In my
> original post I was simply trying to figure out if this was a known issue or
> something else completely obvious that I had missed.
> I'll see if I can get the issue reproduced in runnable and smaller example.
> Also, as I said in the original post, I have made sure to call
> self.setObjectName(__a_unique_name__) on all my QDockWidgets.
> On Thu, Nov 12, 2009 at 2:17 AM, Hans-Peter Jansen <hpj at urpla.net> wrote:
>> Brian, do you expect us to build a runable script from your artefacts?
>> Please keep in mind, that due to the unlimited permutations of OS, Qt,
>> and PyQt versions, it's unpossible to estimate the behavior of even the
>> simplest code fragments in all circumstances (apart from: QWidget.show()
>> will most likely *not* format your harddisk).
>> Therefor, it's a long standing best practice here to provide a self
>> contained minimum example, the exploits the issue.
>> BTW, in my case, 70% of all issues vanish during this exercise, e.g. it's
>> mostly a "RTFM" or "between keyboard and chair problem"..., another > 20%
>> by looking into Qt itself.
>> I estimate the portion of real sip and/or PyQt issues below 3%.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt