[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KToolBar issues, again
From:       Mantia Andras <amantia () freemail ! hu>
Date:       2002-07-30 11:45:21
[Download RAW message or body]

Hi,

I would like to put some toolbars in a non-standard place, on a QWidgetTab. I 
has some problem with QToolBar warning, and that when you drag the toolbar it 
starts to drag from the 0,0 point of the screen. I solved that by disabling 
the warning and the possibility to drag the toolbar. But what happened is 
that there is no RMB for this toolbars. I start to figure out what is 
happening and here is what I've found:

1. If I create a QDockArea, put the toolbar in the MainWindow and later to 
this dockarea, than I have the RMB menu, but I cannot disable the moving of 
the toolbar, which is not desirable. It should remain in that dockarea, the 
user should be able to change only how the icons/texts are displayed in the 
toolbar. In this case I have used:
    QDockArea *dockArea = new QDockArea(Qt::Horizontal, QDockArea::Normal, 
view->toolbarTab);
    KToolBar *tb = new KToolBar(this, dockArea); //this is the KDockMainWindow
    tb->loadState(element); // load the toolbar definition from XML
    tb->enableMoving(false); //tried also tb->setMovingEnabled(false); no 
effect...
    tb->undock();
    dockArea->moveDockWindow(tb);
    view->toolbarTab->addTab(dockArea, i18n(tabname));

view->toolbarTab is a QWidgetTab.

2. If I use the 
     KToolBar *tb = new KToolBar( dockArea,0,true,true);
constructor and
     tb->enableMoving(false); //now it has effect
    tb->setEnableContextMenu(true);
than the toolbar cannot be dragged, but there is no RMB menu. :-(

Any idea? It's like a catch of 22.

Andras

PS: For thos who had problem with showing the dragged toolbar frame at the 
bottom of the screen, solution 2. may be what you should try.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic