Results 1 to 4 of 4

Thread: problem in adding toolbar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanked 2 Times in 2 Posts

    Default problem in adding toolbar

    hi,
    i have derived one class from QWidget. in derived class i add QGlwidget in that irendered some objects. now i would like to add toolbar to the widget.

    in derived class i declare objects for QAction and QToolbar

    i have written code like
    code:

    Qt Code:
    1. void Window::createToolBars()
    2. {
    3. zoomToolBar = addToolBar(tr("Zoom"));
    4. zoomToolBar->addAction(zoominAct);
    5.  
    6. zoomToolBar->addAction(zoomoutAct);
    7.  
    8. zoomToolBar->addAction(resetAct);
    9.  
    10. mouseToolBar = addToolBar(tr("Mouse"));
    11. mouseToolBar->addAction(mouseAct);
    12.  
    13. }
    To copy to clipboard, switch view to plain text mode 

    it showing error as "addToolBar" is undeclared identifier.
    can any one help me so that i'll be thankful to you.

    thanks and regards
    k. bhogasena reddy
    Last edited by jpn; 29th January 2009 at 14:44. Reason: missing [code] tags

Similar Threads

  1. Adding QGLWidget to QGraphicsScene problem
    By sanjayshelke in forum Qt Programming
    Replies: 10
    Last Post: 26th April 2016, 15:03
  2. QString - problem with adding strings
    By pitterb in forum Newbie
    Replies: 1
    Last Post: 13th January 2009, 20:03
  3. Mac OS ToolBar problem, (setUnifiedTitleAndToolBarOnMac)
    By s-valve in forum Qt-based Software
    Replies: 0
    Last Post: 7th November 2008, 13:52
  4. Adding a line edit in a toolbar
    By borges in forum Qt Tools
    Replies: 1
    Last Post: 16th August 2007, 15:33
  5. Adding a toolbar to a TableWidget
    By Walter in forum Qt Programming
    Replies: 2
    Last Post: 1st July 2007, 21:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.