View Full Version : QToolBar location changed

1st November 2007, 19:24
QToolBar location changed - how to modify QToolBar's children when the toolbar's own ToolBarArea is changed ?

Do you know a signal similar with QDockWidget::dockLocationChanged()
but for QToolBar on Qt 4.3.2 ?

Q3MainWindow::toolBarPositionChanged() would do, but I really don't
want to use old code.

Thank you.

1st November 2007, 19:47
QDockWidget::dockLocationChanged() was added just recently, to Qt 4.3. Trolls should have added similar signal to QToolBar as well. I suggest sending a suggestion to Trolls via task tracker (http://trolltech.com/developer/task-tracker) (unless there already is such suggestion filed).

3rd November 2007, 07:08
I hope this is the one you are looking for

void QToolBar::allowedAreasChanged ( Qt::ToolBarAreas allowedAreas ) [signal]


3rd November 2007, 12:17
no, it's not. that signal is triggered when the ALLOWANCE is changed, and that is not necessarily when the position has changed. I'd already tried it out and it results in a funny (inconsistent) behaviour. I've already submitted a report to Trolltech. Their Answer:

Delivered-To: bhavacakra@gmail.com
Received: by with SMTP id d16cs54444wfe;
Fri, 2 Nov 2007 07:31:02 -0700 (PDT)
Received: by with SMTP id o12mr889097fgb.1194013861149;
Fri, 02 Nov 2007 07:31:01 -0700 (PDT)
Return-Path: <qt-bugs@trolltech.com>
Received: from esparsett.troll.no (esparsett.troll.no [])
by mx.google.com with ESMTP id y18si5589637fkd.2007.;
Fri, 02 Nov 2007 07:31:01 -0700 (PDT)
Received-SPF: neutral (google.com: is neither permitted nor denied by best guess record for domain of qt-bugs@trolltech.com) client-ip=;
Authentication-Results: mx.google.com; spf=neutral (google.com: is neither permitted nor denied by best guess record for domain of qt-bugs@trolltech.com) smtp.mail=qt-bugs@trolltech.com
Received: from esparsett.troll.no (localhost [])
by localhost (Postfix) with SMTP
id 50EA774342; Fri, 2 Nov 2007 15:30:59 +0100 (CET)
Received: from (patibuler.troll.no [])
by esparsett.troll.no (Postfix) with SMTP
id 3331974340; Fri, 2 Nov 2007 15:30:59 +0100 (CET)
In-Reply-To: <20071101191450.10081.27467.nols.troll.no@nols.trol l.no>
References: <20071101191450.10081.27467.nols.troll.no@nols.trol l.no>
From: qt-bugs@trolltech.com
To: bhavacakra@gmail.com
Subject: Re: [Issue N185988] QDockWidget::dockLocationChanged() for QToolBar
Cc: qt-bugs@trolltech.com
User-Agent: Trolltech Supporter/2.8
X-Trolltech-Task-ID: N185988
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Message-Id: <20071102143059.3331974340@esparsett.troll.no>
Date: Fri, 2 Nov 2007 15:30:59 +0100 (CET)

Hi Aspra,

On Thursday, 01. Nov 2007 20:14 bhavacakra@gmail.com wrote:
> Short description:
> QDockWidget::dockLocationChanged() for QToolBar
> What I did:
> Inconsistent API, there's no way to handle QToolBar when it's changing
> its position inside a QMainWindow, as opposed to QDockWidget, which is
> possible via the signal dockLocationChanged().

Thank you for your report. I do not agree that this is a bug as such,
but I have passed the information on to the development team as a
suggestion. I created task 186074 in the process, and you can use this
ID to follow the status of the task online at:


Kind regards,

Stian Thomassen, Support Engineer
Trolltech ASA, Norway

So lay back and wait :-)