Results 1 to 2 of 2

Thread: Main Window with tabs

  1. #1
    Join Date
    Sep 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Main Window with tabs

    How should I create dock widgets for a MainWindow style application that can handle multiple documents via tabs?

    For example, if this was an image editing program and I had a histogram in a dockwidget, how would I get the histogram to always display information associated with the currently selected tab?

    Should I have the dock widget be a QStackWidget?
    Should I have only a single widget that just updates itself with data from the currently selected widget?
    Are there other strategies?

    Thanks in advance,
    ~Eric

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Main Window with tabs

    I would definitely go for the solution with a single widget. Depending on what is drawn/shown you can consider holding the pure data in background so that it don't has to be calculated each time the tab is changed.

Similar Threads

  1. Replies: 2
    Last Post: 4th August 2010, 19:10
  2. Replies: 9
    Last Post: 16th May 2010, 16:21
  3. Replies: 11
    Last Post: 11th August 2008, 09:14
  4. Main Window
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 07:32
  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.