Results 1 to 3 of 3

Thread: Available action in main window menu even when dockwidget still doesn't exists

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Location
    Brazil
    Posts
    23
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Available action in main window menu even when dockwidget still doesn't exists

    I was taking a look at the Dock Widgets example that comes with Qt. It can be found here.

    In MainWindow::createDockWindows() a QDockWidget instance is created and its address is passed to a pointer called 'dock'. The main window has a menu item called 'view' that shows a toggle action to show or hide the available dockwidgets. It adds the toggle item to the menu with this: viewMenu->addAction(dock->toggleViewAction());

    Suppose that in another application, a few particular dockwidgets are created at runtime. If i did the same way as the example, the toggle items for each particular dockwidget would only show in the viewMenu after they are created, but I'd like to have them exist even when the dockwidget itself haven't been created yet. The item in the viewMenu would be inert, but would work after the dockwidget is created. How can I do that?
    Last edited by tiredtyrant; 20th April 2010 at 20:50.

Similar Threads

  1. Menu open action -reg
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2009, 11:07
  2. Check if window with certain title exists
    By devil in forum Qt Programming
    Replies: 5
    Last Post: 21st January 2009, 14:42
  3. Replies: 11
    Last Post: 11th August 2008, 09:14
  4. copy/paste actions in main window menu
    By magland in forum Qt Programming
    Replies: 3
    Last Post: 2nd October 2007, 12:33
  5. Replies: 15
    Last Post: 23rd March 2007, 16:16

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.