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

Qt-interest Archive, January 2008
QtoolBox and QToolBar issues


Message 1 in thread

Hi,
  I'm working on a small project that uses Qt-4.3.2 opensource edition for X11. My requirement is to create a tabbed widget container exactly like the widgets toolbox in Qt-Designer 3.x. I browsed the sources and saw that the class QToolBox was used alongwith vertically oriented QToolBar for each "widget group". While trying to implement something similar in Qt-4.3.2, I'm facing a few problems. I'd appreciate it if someone could help me out on these:

a) In Qt-3.x, I could do something like toolBar->setFrameStyle(QFrame::None). Qt-4.x does not support this, so each toolbar in the toolbox has a "toolbar like" raised appearance, which doesn't look as neat as one with no frame.

b) Also, I am having a hard time trying to layout the toolbar within the toolbox. I want the toolbars to be "central" i.e. vertically centrally aligned within the toolbox. (It seems to be left aligned by default). I admit my knowledge of Qt's layout classes isn't too hot, but I was unable to achieve this via QHBoxLayout'ing.

  In general, I want to ask if the most common way of using QToolBox is with a QToolBar in each tab of the toolbox. Or is there a cleaner way?
  
  
Thanks,
Raj

PS: This is my first post to this list, so, hello folks :-)


~Raj
http://snipurl.com/rbiswas
       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Message 2 in thread

Well, seems not many people use QToolBox. 

If anyone can show me some examples I'd be grateful.

Further, how does one compile/obtain the Qt 4 demos? I'm using Ubuntu 7.10, and I dont seem to be able to find relevant packages.

Thanks,
Rajorshi

Rajorshi Biswas <rajorshi_iiitc@xxxxxxxxx> wrote: Hi,
  I'm working on a small project that uses Qt-4.3.2 opensource edition for X11. My requirement is to create a tabbed widget container exactly like the widgets toolbox in Qt-Designer 3.x. I browsed the sources and saw that the class QToolBox was used alongwith vertically oriented QToolBar for each "widget group". While trying to implement something similar in Qt-4.3.2, I'm facing a few problems. I'd appreciate it if someone could help me out on these:

a) In Qt-3.x, I could do something like toolBar->setFrameStyle(QFrame::None). Qt-4.x does not support this, so each toolbar in the toolbox has a "toolbar like" raised appearance, which doesn't look as neat as one with no frame.

b) Also, I am having a hard time trying to layout the toolbar within the toolbox. I want the toolbars to be "central" i.e. vertically centrally aligned within the toolbox. (It seems to be left aligned by default). I admit my knowledge of Qt's layout classes isn't too hot, but  I was unable to achieve this via QHBoxLayout'ing.

  In general, I want to ask if the most common way of using QToolBox is with a QToolBar in each tab of the toolbox. Or is there a cleaner way?
  
  
Thanks,
Raj

PS: This is my first post to this list, so, hello folks :-)


~Raj
http://snipurl.com/rbiswas        

---------------------------------
Be a better friend, newshound, and  know-it-all with Yahoo! Mobile.  Try it now.

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.

Message 3 in thread

Rajorshi Biswas wrote:

> Further, how does one compile/obtain the Qt 4 demos? I'm 
> using Ubuntu 7.10, and I dont seem to be able to find 
> relevant packages.

the qt4-doc package should contain tarballs for the demos and examples:
usr/share/doc/qt4-doc/qt4-demos.tar.gz
usr/share/doc/qt4-doc/qt4-examples.tar.gz

Cheers,
Peter

--
 [ signature omitted ]