Results 1 to 3 of 3

Thread: Using QMainWindow change default position of toolbar. PYQT4

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    5
    Qt products
    Platforms
    Unix/X11 Windows

    Question Using QMainWindow change default position of toolbar. PYQT4

    Hello guys.
    I was wondering if anyone can help me with some syntax/expression. i am using QMainWindow

    The GUI i am working on has a tool bar , now i want to change the default position of it to the left of the CenterWidget. i am having problem saying put the toolbar to the left ..


    Here is the code i have at the moment
    Qt Code:
    1. toolbar = self.addToolBar('toolbar')
    2. toolbar.addAction(NewDoc)
    3. toolbar.addAction(Map)
    4. toolbar.addAction(Change)
    5. toolbar.addAction(exit)
    To copy to clipboard, switch view to plain text mode 

    Here things i tried without luck.

    Qt Code:
    1. toolbar = self.addToolBar(Qt.LeftToolBarArea)
    2. toolbar.addAction(NewDoc)
    3. toolbar.addAction(Map)
    4. toolbar.addAction(Change)
    5. toolbar.addAction(exit)
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. toolbar = self.addToolBar('toolabr')
    2. toolbar.LeftToolbarArea()
    3. toolbar.addAction(NewDoc)
    4. toolbar.addAction(Map)
    5. toolbar.addAction(Change)
    6. toolbar.addAction(exit)
    To copy to clipboard, switch view to plain text mode 



    Qt Code:
    1. toolbar = self.addToolBar(Qt.BottomToolBarArea,'Toolbar')
    2. toolbar.LeftToolbarArea()
    3. toolbar.addAction(NewDoc)
    4. toolbar.addAction(Map)
    5. toolbar.addAction(Change)
    6. toolbar.addAction(exit)
    To copy to clipboard, switch view to plain text mode 

    i would appreciate any help. Thank you
    ps: sorry for the indent..
    Last edited by blanka; 14th November 2010 at 19:31.

Similar Threads

  1. how to change the position of menu of QMainWindow
    By yxmaomao in forum Qt Programming
    Replies: 11
    Last Post: 17th September 2016, 16:12
  2. How to change default clipping?
    By swbluto in forum Qt Programming
    Replies: 2
    Last Post: 29th October 2009, 18:35
  3. toolbar initial position
    By baray98 in forum Qt Programming
    Replies: 7
    Last Post: 7th September 2007, 07:39
  4. Fixing default Window position with move.
    By VireX in forum Qt Programming
    Replies: 4
    Last Post: 3rd April 2007, 21:13
  5. disable QMainWindow toolbar menu?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 10th January 2007, 18:24

Tags for this Thread

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.