Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, February 2007
how to move a QDockWidget after creation in Qt4


Message 1 in thread

Hi,

I wonder how to move a created QDockWidget. It seems as if only the user
is able to do this, but not the developer in his code.

My code does not know the final position of a dockWidget on creation, so
it does not help to know that I can tell the position in
QMainWindow::addDockWidget(..).

In Qt3 there was QMainWindow::moveDockWidget(..)

Any ideas?

Greetings
	Jens

--
 [ signature omitted ] 

Message 2 in thread

On 06.02.07 15:16:39, Jens wrote:
> Hi,
> 
> I wonder how to move a created QDockWidget. It seems as if only the user
> is able to do this, but not the developer in his code.
> 
> My code does not know the final position of a dockWidget on creation, so
> it does not help to know that I can tell the position in
> QMainWindow::addDockWidget(..).

Well, move == remove+add, so just use removeDockWidget and then add it
where you want it. moveDockWidget would be nice to have as convenience
method though...

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread


Andreas Pakulat schrieb:
> On 06.02.07 15:16:39, Jens wrote:
>> Hi,
>>
>> I wonder how to move a created QDockWidget. It seems as if only the user
>> is able to do this, but not the developer in his code.
>>
>> My code does not know the final position of a dockWidget on creation, so
>> it does not help to know that I can tell the position in
>> QMainWindow::addDockWidget(..).
> 
> Well, move == remove+add, so just use removeDockWidget and then add it
> where you want it. moveDockWidget would be nice to have as convenience
> method though...
> 
> Andreas
> 
I thought I maid have misunderstood the documentation, but there seems
to be really only a remove+add solution :(

--
 [ signature omitted ]