Results 1 to 2 of 2

Thread: create dock widget from some other widget

  1. #1
    Join Date
    May 2010
    Posts
    23
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default create dock widget from some other widget

    I create a dockwidget from some other widget, and it seems to work, but it can not be docked to a main window afterwards. And I can not call addDockWidget simply because there is no way to get a pointer to application's main window in qt4. What is the proper way to accomplish that?

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: create dock widget from some other widget

    why don't you know the mainwindow instance??? If you want to add a dock widget, you shoul dbe making the widget at the same time as the mainwindow in most normal circumstances.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. How to Create child widget behind parent widget?
    By anupamgee in forum Qt Programming
    Replies: 6
    Last Post: 22nd June 2010, 13:03
  2. Tabbed Dock Widget
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 26th May 2010, 04:38
  3. Creating an OSX-like dock widget
    By k2 in forum Qt Programming
    Replies: 0
    Last Post: 1st June 2009, 22:16
  4. Dock Widget problems
    By dbrmik in forum Newbie
    Replies: 5
    Last Post: 17th April 2009, 12:39
  5. Pin/Unpin Dock Widget
    By charlesD in forum Newbie
    Replies: 1
    Last Post: 21st June 2006, 06:57

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.