Search Results

Search found 3 results on 1 pages for 'qtoolbar'.

Page 1/1 | 1 

  • Style, set to Qt application, vanishes, when QDockWindow or QToolBar is being unattached.

    - by Max
    Style, set to Qt application, vanishes, when QDockWindow or QToolBar is being unattached. Application is designed to work in Windows XP environment, most of users use it's 'classic' scheme, and application's style is Cleanlooks. It looks fine, until one want to undock dockable window or move toolbar. CLeanlooks vanishes, and it is rather ugly. Is there any workaround to handle this?

    Read the article

  • Multiple Context menus in PyQt based on mouse location

    - by Nader
    I have a window with multiple tables using QTableWidget (PyQt). I created a popup menu using the right click mouse and it works fine. However, I need to create different popup menu based on which table the mouse is hovering over at the time the right mouse is clicked. How can I get the mouse to tell me which table it is hovering over? or, put in another way, how to implement a method so as to have a specific context menu based on mouse location? I am using Python and PyQt. My popup menu is developed similar to this code (PedroMorgan answer from Qt and context menu): class Foo( QtGui.QWidget ): def __init__(self): QtGui.QWidget.__init__(self, None) # Toolbar toolbar = QtGui.QToolBar() # Actions self.actionAdd = toolbar.addAction("New", self.on_action_add) self.actionEdit = toolbar.addAction("Edit", self.on_action_edit) self.actionDelete = toolbar.addAction("Delete", self.on_action_delete) # Tree self.tree = QtGui.QTreeView() self.tree.setContextMenuPolicy( Qt.CustomContextMenu ) self.connect(self.tree, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menu) # Popup Menu self.popMenu = QtGui.QMenu( self ) self.popMenu.addAction( self.actionEdit ) self.popMenu.addAction( self.actionDelete ) self.popMenu.addSeparator() self.popMenu.addAction( self.actionAdd ) def on_context_menu(self, point): self.popMenu.exec_( self.tree.mapToGlobal(point) )

    Read the article

1