[Qt-interest] How to get a QStatusBar into the VisualStudioIntegration Toolbox?

Niels Dekker - no return address noreply at this.is.invalid
Wed Dec 10 18:28:29 CET 2008


>> Can someone please tell me how to drag-and-drop a QStatusBar
>> onto a dialog, using the toolbox from Qt4 Visual Studio
>> Integration?

Tony Rietwyk wrote:
> The QStatusBar doc says its usually associated with QMainWindow - but
> it doesn't explicitly say if it can, or cannot, be used anywhere else.
>
> In Designer (and I assume VS Integration), when you select a new main
> window form, it shows the default status bar already present.
> Right-clicking anywhere except the menu, has option 'Remove Status
> Bar'.

Thank you for your reply, Tony.  This "Remove/Create Status Bar" menu option 
is in Qt4's VS Integration as well, when editing a form derived from 
QMainWindow.

> I myself would like to know if there is an easier way to reorder the
> widgets / groups in the toolbox?

Sorry, I don't know. Maybe someone else can answer this question for us?

> I suggest you change to a QMainWindow based form, and copy and paste
> the contents across from your existing one.

Thanks, I'll give it a try.  It looks like adding widgets to a toolbox isn't 
entirely trivial in Qt4, while adding a status bar to a QMainWindow certainly 
is.

Actually I've just decided to use a QWizard.  Which makes my original question 
totally irrelevant, because Qt4 doesn't support drag-and-dropping widgets from 
the designer toolbox onto a QWizard form.  At least, as far as I can see.

Still I'm now following your advice, by placing the QWizard onto a 
QMainWindow.  In C++ code, by doing this->setCentralWidget(new MyWizard); 
within the constructor of my main window.  Hope I can get things working that 
way, especially because I need to make sure that the signals are processed by 
the right window...

  Kind regards, Niels





More information about the Qt-interest-old mailing list