Author Topic: QToolBar isn't dockable  (Read 3408 times)

simonqu

  • Newbie
  • *
  • Posts: 3
    • View Profile
QToolBar isn't dockable
« on: August 12, 2004, 07:11:35 pm »
I'm developing an application for sharp zaurus 5600 and encontered a QToolBar related problem. The program is working fine in my PC. When tranfered to PDA, the QToolBar isn't dockable. Any body here can help me?

#include <qapplication.h>
#include <qtoolbar.h>
#include<qwhatsthis.h>

class SmMainWin_QT:pulic QMainWindow
{
  public:
          SmMainWin_QT();
}
SmMainWin_QT::SmMainWin_QT():QMainWindow(0, "test")
{
  resize(235, 315);
  QToolBar * tool_bar = newQToolBar(this);
  addToolBar(tool_bar, Minimized);
  (void)QWhatsThis::WhatsThisButton(tool_bar);
}

int main(int argc, **argv)
{

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
QToolBar isn't dockable
« Reply #1 on: August 13, 2004, 01:30:03 am »
Why do you say addToolBar(tool_bar, Minimized)? The toolbar shouldn't even show up that way (according to Qt docs). If it does show, I presume it starts out floating, right? I'm curious why you would need this - the 5600 has quite a small screen to accommodate a floating toolbar. Sorry I can't try out your code - I work in Python.

I have an opposite "issue". The application I'm working on uses 2 toolbars; they start out docked and they can be moved between docks flawlessly - but I cannot make them float (presumably I can't drag them far enough from one dock before they come too close to the opposite one).

The real problem I have with toolbars is that unless all toolbars are hidden, the Menu key does not work (it moves the focus to a toolbar rather than the menu bar). That may be Opie-specific, however. I'm not sure.

z.
« Last Edit: August 13, 2004, 01:31:00 am by zenyatta »
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

simonqu

  • Newbie
  • *
  • Posts: 3
    • View Profile
QToolBar isn't dockable
« Reply #2 on: August 13, 2004, 11:51:31 am »
The "Minimized" Option make the tool bar folded at first place not unvible. If you take it off, the toolbar is unfolded as usual.

Dayong