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

Qt-interest Archive, March 2002
Using Dockable Windows with the Designer


Message 1 in thread

Hello

We are currently evaluatuing Qt for Windows.

We designed a MainWindow which we are using as a docking area
where we would like to place some dockable windows in it.
Each window should be in one .ui file designed with the Qt designer application.

Since there is no docking window template and when creating an own template 
I cannot choose QDockableWindow as a base class. I'm asking if
it's possible to use dockable windows with the designer (expect QToolBar)?

I've also tried to inherit the generated class from QDockableWindow which failed
with compiler errors at Q_OBJECT probably because both classed do inherit from QObject.

would be grateful for any information,
llx


Message 2 in thread

Am Mittwoch, 20. März 2002 21:44 schrieb llx@gmx.net:

Hi,

I created a widget in designer (LogWidget) which contains all the 
functionality I need for that widget. In my MainWindows init() function I 
added the following:

    QDockWindow *pDW = new QDockWindow();
    pDW->setResizeEnabled(true);
    pDW->setCloseMode(QDockWindow::Always);
    LogWidget *pLW = new LogWidget(pDW, "LogWidget");
    pDW->setWidget(pLW);
    addToolBar(pDW, Qt::DockBottom);
    pDW->setCaption(tr("Protokollausgabe"));

I end up with a toolbar/dockable window that contains my LogWidget. Perhaps 
you can use a similar approach.

greetings,
P.J.

> Hello
>
> We are currently evaluatuing Qt for Windows.
>
> We designed a MainWindow which we are using as a docking area
> where we would like to place some dockable windows in it.
> Each window should be in one .ui file designed with the Qt designer
> application.
>
> Since there is no docking window template and when creating an own template
> I cannot choose QDockableWindow as a base class. I'm asking if
> it's possible to use dockable windows with the designer (expect QToolBar)?
>
> I've also tried to inherit the generated class from QDockableWindow which
> failed with compiler errors at Q_OBJECT probably because both classed do
> inherit from QObject.
>
> would be grateful for any information,
> llx

-- 
 [ signature omitted ]