• 9808阅读
  • 4回复

如何使应用程序窗口在运行时就最大化显示? [复制链接]

上一主题 下一主题
离线sunday1118
 
只看楼主 倒序阅读 楼主  发表于: 2009-09-04
如题 我不知道怎么设置  谢谢各位大虾了
离线dbzhang800

只看该作者 1楼 发表于: 2009-09-05
Manual 中是这么说的:


void QWidget::setWindowState ( Qt::WindowStates windowState )
Sets the window state to windowState. The window state is a OR'ed combination of Qt::WindowState: Qt::WindowMinimized, Qt::WindowMaximized, Qt::WindowFullScreen, and Qt::WindowActive.
If the window is not visible (i.e. isVisible() returns false), the window state will take effect when show() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and normal mode, use the following code:
w->setWindowState(w->windowState() ^ Qt::WindowFullScreen);
In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:
w->setWindowState(w->windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
Calling this function will hide the widget. You must call show() to make the widget visible again.
离线sunday1118
只看该作者 2楼 发表于: 2009-09-10
谢谢楼上的兄弟
离线santhtony

只看该作者 3楼 发表于: 2009-11-14
感谢
-------------> ------->       http://www.likeqt.com
离线bluegem218

只看该作者 4楼 发表于: 2011-04-16
感谢!
快速回复
限100 字节
 
上一个 下一个