2013年9月5日星期四

QDockWidget switching problem

QDockWidget can be made into several windows stacked together , and then display a label for each window , only one window at the top shows the effect , similar to the code window for the same VS .
I encountered problem is how to use code to switch these tags ? I tried to set the focus , set the top can not be switched , seeking god pointing ah ! Looking for a long way , and people have died. . .
------ Solution ---------------------------------------- ----
try this

void QMainWindow :: tabifyDockWidget (QDockWidget * first, QDockWidget * second)
Moves second dock widget on top of first dock widget, creating a tabbed docked area in the main window.

See also tabifiedDockWidgets ().
------ For reference only -------------------------- -------------
stacked together is what effect it ? QTabWidget so there is a lot of pages ?
------ For reference only -------------------------------------- -
that is estimated to be similar to their own definition of a QTabWidget class ah
------ For reference only ----------------------- ----------------


seems useful to look, try tomorrow !
------ For reference only -------------------------------------- -
also be that the order is also changed
------ For reference only -------------------------- -------------
problem is solved, tabifyDockWidget is used to render this effect , but I find the corresponding switching function raise ()

没有评论:

发表评论