Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QMainWindow class provides a main application window. More...
Public Types | |
enum | DockOption { AllowNestedDocks = 2, AllowTabbedDocks = 4, AnimatedDocks = 1, ForceTabbedDocks = 8, VerticalTabs = 16 } |
More... | |
Public Types inherited from QtGui.QWidget | |
enum | RenderFlag { DrawChildren = 2, DrawWindowBackground = 1, IgnoreMask = 4 } |
More... | |
Public Member Functions | |
QMainWindow (QWidget parent=null, Qt.WindowType flags=0) | |
| |
override void | CreateProxy () |
new void | AddDockWidget (Qt.DockWidgetArea area, QDockWidget dockwidget) |
| |
new void | AddDockWidget (Qt.DockWidgetArea area, QDockWidget dockwidget, Qt.Orientation orientation) |
| |
new void | AddToolBar (QToolBar toolbar) |
| |
new QToolBar | AddToolBar (string title) |
| |
new void | AddToolBar (Qt.ToolBarArea area, QToolBar toolbar) |
| |
new void | AddToolBarBreak (Qt.ToolBarArea area=Qt.ToolBarArea.TopToolBarArea) |
| |
new Qt.DockWidgetArea | Corner (Qt.Corner corner) |
| |
virtual QMenu | CreatePopupMenu () |
| |
new QMainWindow.DockOption | dockOptions () |
new Qt.DockWidgetArea | DockWidgetArea (QDockWidget dockwidget) |
| |
override bool | OnEvent (QEvent @event) |
| |
new void | InsertToolBar (QToolBar before, QToolBar toolbar) |
| |
new void | InsertToolBarBreak (QToolBar before) |
| |
new bool | IsSeparator (QPoint pos) |
new void | RemoveDockWidget (QDockWidget dockwidget) |
| |
new void | RemoveToolBar (QToolBar toolbar) |
| |
new void | RemoveToolBarBreak (QToolBar before) |
| |
new bool | RestoreDockWidget (QDockWidget dockwidget) |
| |
new bool | RestoreState (QByteArray state, int version=0) |
| |
new QByteArray | SaveState (int version=0) |
| |
new void | SetCorner (Qt.Corner corner, Qt.DockWidgetArea area) |
| |
new void | SetDockOptions (QMainWindow.DockOption options) |
new void | SetTabPosition (Qt.DockWidgetArea areas, QTabWidget.TabPosition tabPosition) |
| |
new void | SplitDockWidget (QDockWidget after, QDockWidget dockwidget, Qt.Orientation orientation) |
| |
new QTabWidget.TabPosition | TabPosition (Qt.DockWidgetArea area) |
| |
new System.Collections.Generic.List < QDockWidget > | TabifiedDockWidgets (QDockWidget dockwidget) |
| |
new void | TabifyDockWidget (QDockWidget first, QDockWidget second) |
| |
new Qt.ToolBarArea | ToolBarArea (QToolBar toolbar) |
| |
new bool | ToolBarBreak (QToolBar toolbar) |
| |
new void | Dispose () |
Public Member Functions inherited from QtGui.QWidget | |
QWidget (QWidget parent=null, Qt.WindowType f=0) | |
| |
override void | CreateProxy () |
new System.Collections.Generic.List < QAction > | Actions () |
| |
new void | ActivateWindow () |
| |
new void | AddAction (QAction action) |
| |
new void | AddActions (System.Collections.Generic.List< QAction > actions) |
| |
new void | AdjustSize () |
| |
new QWidget | ChildAt (QPoint p) |
| |
new QWidget | ChildAt (int x, int y) |
| |
new void | ClearFocus () |
| |
new void | ClearMask () |
| |
new bool | Close () |
| |
new QRect | ContentsRect () |
| |
new void | CreateWinId () |
virtual int | DevType () |
new NativeULong | EffectiveWinId () |
| |
new void | EnsurePolished () |
| |
override bool | OnEvent (QEvent arg1) |
| |
new QWidget | FocusWidget () |
| |
new QFont | font () |
new QFontInfo | FontInfo () |
| |
new QFontMetrics | FontMetrics () |
| |
new QRect | geometry () |
new void | GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom) |
| |
virtual System.IntPtr | GetDC () |
| |
new void | GrabGesture (Qt.GestureType type, Qt.GestureFlag flags=0) |
| |
new void | GrabKeyboard () |
| |
new void | GrabMouse () |
| |
new void | GrabMouse (QCursor arg1) |
| |
new int | GrabShortcut (QKeySequence key, Qt.ShortcutContext context=Qt.ShortcutContext.WindowShortcut) |
| |
new QGraphicsProxyWidget | GraphicsProxyWidget () |
| |
virtual int | HeightForWidth (int arg1) |
| |
new void | Hide () |
| |
new Qt.InputMethodHint | inputMethodHints () |
virtual object | InputMethodQuery (Qt.InputMethodQuery arg1) |
| |
new void | InsertAction (QAction before, QAction action) |
| |
new void | InsertActions (QAction before, System.Collections.Generic.List< QAction > actions) |
| |
new NativeULong | InternalWinId () |
new bool | IsAncestorOf (QWidget child) |
| |
new bool | IsEnabledTo (QWidget arg1) |
| |
new bool | IsEnabledToTLW () |
| |
new bool | IsHidden () |
| |
new bool | IsLeftToRight () |
new bool | IsRightToLeft () |
new bool | IsTopLevel () |
| |
new bool | IsVisibleTo (QWidget arg1) |
| |
new bool | IsWindow () |
| |
new void | Lower () |
| |
new QPoint | MapFrom (QWidget arg1, QPoint arg2) |
| |
new QPoint | MapFromGlobal (QPoint arg1) |
| |
new QPoint | MapFromParent (QPoint arg1) |
| |
new QPoint | MapTo (QWidget arg1, QPoint arg2) |
| |
new QPoint | MapToGlobal (QPoint arg1) |
| |
new QPoint | MapToParent (QPoint arg1) |
| |
virtual QSize | MinimumSizeHint () |
new void | Move (int x, int y) |
new QWidget | NativeParentWidget () |
| |
new QWidget | NextInFocusChain () |
| |
new void | OverrideWindowFlags (Qt.WindowType type) |
| |
new void | OverrideWindowState (Qt.WindowState state) |
virtual QPaintEngine | PaintEngine () |
| |
new QPalette | palette () |
new QWidget | ParentWidget () |
| |
new QWidget | PreviousInFocusChain () |
| |
new void | Raise () |
| |
virtual void | ReleaseDC (System.IntPtr arg1) |
| |
new void | ReleaseKeyboard () |
| |
new void | ReleaseMouse () |
| |
new void | ReleaseShortcut (int id) |
| |
new void | RemoveAction (QAction action) |
| |
new void | Render (IQPaintDevice target) |
| |
new void | Render (QPainter painter) |
| |
new void | Render (IQPaintDevice target, QPoint targetOffset) |
| |
new void | Render (QPainter painter, QPoint targetOffset) |
| |
new void | Render (IQPaintDevice target, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren) |
| |
new void | Render (QPainter painter, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren) |
| |
new void | Repaint () |
| |
new void | Repaint (QRect arg1) |
| |
new void | Repaint (QRegion arg1) |
| |
new void | Repaint (int x, int y, int w, int h) |
| |
new void | Resize (int w, int h) |
new bool | RestoreGeometry (QByteArray geometry) |
| |
new QByteArray | SaveGeometry () |
| |
new void | Scroll (int dx, int dy) |
| |
new void | Scroll (int dx, int dy, QRect arg3) |
| |
new void | SetAttribute (Qt.WidgetAttribute arg1, bool on=true) |
| |
new void | SetBaseSize (int basew, int baseh) |
new void | SetContentsMargins (int left, int top, int right, int bottom) |
| |
new void | SetDisabled (bool arg1) |
| |
new void | SetFixedHeight (int h) |
| |
new void | SetFixedSize (QSize arg1) |
| |
new void | SetFixedSize (int w, int h) |
| |
new void | SetFixedWidth (int w) |
| |
new void | SetFocus () |
| |
new void | SetFocus (Qt.FocusReason reason) |
| |
new void | SetGeometry (int x, int y, int w, int h) |
new void | SetHidden (bool hidden) |
| |
new void | SetInputMethodHints (Qt.InputMethodHint hints) |
new void | SetMask (QBitmap arg1) |
| |
new void | SetMaximumSize (int maxw, int maxh) |
new void | SetMinimumSize (int minw, int minh) |
new void | SetParent (QWidget parent) |
| |
new void | SetParent (QWidget parent, Qt.WindowType f) |
| |
new void | SetShortcutAutoRepeat (int id, bool enable=true) |
| |
new void | SetShortcutEnabled (int id, bool enable=true) |
| |
new void | SetShown (bool shown) |
new void | SetSizeIncrement (int w, int h) |
new void | SetSizePolicy (QSizePolicy.Policy horizontal, QSizePolicy.Policy vertical) |
virtual void | SetVisible (bool visible) |
new void | Show () |
| |
new void | ShowFullScreen () |
| |
new void | ShowMaximized () |
| |
new void | ShowMinimized () |
| |
new void | ShowNormal () |
| |
virtual QSize | SizeHint () |
new void | StackUnder (QWidget arg1) |
| |
new bool | TestAttribute (Qt.WidgetAttribute arg1) |
| |
new QWidget | TopLevelWidget () |
| |
new bool | UnderMouse () |
| |
new void | UngrabGesture (Qt.GestureType type) |
| |
new void | UnsetCursor () |
new void | UnsetLayoutDirection () |
new void | UnsetLocale () |
new void | Update () |
| |
new void | Update (QRect arg1) |
| |
new void | Update (QRegion arg1) |
| |
new void | Update (int x, int y, int w, int h) |
| |
new void | UpdateGeometry () |
| |
new QRegion | VisibleRegion () |
| |
new NativeULong | WinId () |
| |
new QWidget | Window () |
| |
new Qt.WindowType | WindowType () |
| |
new void | Dispose () |
new int | ColorCount () |
new int | Depth () |
new int | HeightMM () |
new int | LogicalDpiX () |
new int | LogicalDpiY () |
new int | NumColors () |
new bool | PaintingActive () |
new int | PhysicalDpiX () |
new int | PhysicalDpiY () |
new int | WidthMM () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Public Member Functions inherited from QtGui.IQPaintDevice | |
new int | ColorCount () |
new int | Depth () |
int | DevType () |
System.IntPtr | GetDC () |
new int | Height () |
new int | HeightMM () |
new int | LogicalDpiX () |
new int | LogicalDpiY () |
new int | NumColors () |
QPaintEngine | PaintEngine () |
new bool | PaintingActive () |
new int | PhysicalDpiX () |
new int | PhysicalDpiY () |
void | ReleaseDC (System.IntPtr hdc) |
new int | Width () |
new int | WidthMM () |
Static Public Member Functions | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtGui.QWidget | |
static QWidget | Find (NativeULong arg1) |
| |
static QWidget | KeyboardGrabber () |
| |
static QWidget | MouseGrabber () |
| |
static void | SetTabOrder (QWidget arg1, QWidget arg2) |
| |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
Static Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QMainWindow (System.Type dummy) | |
override void | OnContextMenuEvent (QContextMenuEvent @event) |
| |
new void | OnIconSizeChanged (QSize iconSize) |
| |
new void | OnToolButtonStyleChanged (Qt.ToolButtonStyle toolButtonStyle) |
| |
Protected Member Functions inherited from QtGui.QWidget | |
QWidget (System.Type dummy) | |
virtual void | OnActionEvent (QActionEvent arg1) |
| |
virtual void | OnChangeEvent (QEvent arg1) |
| |
virtual void | OnCloseEvent (QCloseEvent arg1) |
| |
virtual void | OnContextMenuEvent (QContextMenuEvent arg1) |
| |
new void | Create () |
| |
new void | Create (NativeULong arg1, bool initializeWindow=true, bool destroyOldWindow=true) |
| |
new void | OnCustomContextMenuRequested (QPoint pos) |
| |
new void | Destroy (bool destroyWindow=true, bool destroySubWindows=true) |
| |
virtual void | OnDragEnterEvent (QDragEnterEvent arg1) |
| |
virtual void | OnDragLeaveEvent (QDragLeaveEvent arg1) |
| |
virtual void | OnDragMoveEvent (QDragMoveEvent arg1) |
| |
virtual void | OnDropEvent (QDropEvent arg1) |
| |
virtual void | EnabledChange (bool arg1) |
virtual void | OnEnterEvent (QEvent arg1) |
| |
virtual void | OnFocusInEvent (QFocusEvent arg1) |
| |
new bool | FocusNextChild () |
| |
virtual bool | FocusNextPrevChild (bool next) |
| |
virtual void | OnFocusOutEvent (QFocusEvent arg1) |
| |
new bool | FocusPreviousChild () |
| |
virtual void | FontChange (QFont arg1) |
virtual void | OnHideEvent (QHideEvent arg1) |
| |
virtual void | OnInputMethodEvent (QInputMethodEvent arg1) |
| |
virtual void | OnKeyPressEvent (QKeyEvent arg1) |
| |
virtual void | OnKeyReleaseEvent (QKeyEvent arg1) |
| |
virtual void | LanguageChange () |
| |
virtual void | OnLeaveEvent (QEvent arg1) |
| |
virtual int | Metric (QPaintDevice.PaintDeviceMetric arg1) |
| |
virtual void | OnMouseDoubleClickEvent (QMouseEvent arg1) |
| |
virtual void | OnMouseMoveEvent (QMouseEvent arg1) |
| |
virtual void | OnMousePressEvent (QMouseEvent arg1) |
| |
virtual void | OnMouseReleaseEvent (QMouseEvent arg1) |
| |
virtual void | OnMoveEvent (QMoveEvent arg1) |
| |
virtual void | OnPaintEvent (QPaintEvent arg1) |
| |
virtual void | PaletteChange (QPalette arg1) |
new void | ResetInputContext () |
| |
virtual void | OnResizeEvent (QResizeEvent arg1) |
| |
virtual void | OnShowEvent (QShowEvent arg1) |
| |
virtual void | StyleChange (QStyle arg1) |
virtual void | OnTabletEvent (QTabletEvent arg1) |
| |
new void | UpdateMicroFocus () |
| |
virtual void | OnWheelEvent (QWheelEvent arg1) |
| |
virtual void | WindowActivationChange (bool arg1) |
Protected Member Functions inherited from QtCore.QObject | |
QObject (System.Type dummy) | |
virtual void | OnChildEvent (QChildEvent arg1) |
| |
virtual void | ConnectNotify (string signal) |
| |
virtual void | OnCustomEvent (QEvent arg1) |
| |
new void | OnDestroyed (QObject arg1=null) |
| |
virtual void | DisconnectNotify (string signal) |
| |
new int | Receivers (string signal) |
| |
new QObject | Sender () |
| |
new int | SenderSignalIndex () |
| |
virtual void | OnTimerEvent (QTimerEvent arg1) |
| |
Properties | |
Slot< QSize > | IconSizeChanged |
| |
Slot< Qt.ToolButtonStyle > | ToolButtonStyleChanged |
| |
new QWidget | CentralWidget [get, set] |
| |
new QMenuBar | MenuBar [get, set] |
| |
new QWidget | MenuWidget [get, set] |
| |
new QStatusBar | StatusBar [get, set] |
| |
new QSize | IconSize [get, set] |
| |
new Qt.ToolButtonStyle | ToolButtonStyle [get, set] |
| |
new bool | Animated [get, set] |
| |
new bool | DocumentMode [get, set] |
| |
new QTabWidget.TabShape | TabShape [get, set] |
| |
new bool | DockNestingEnabled [get, set] |
| |
new DockOption | DockOptions [get, set] |
| |
new bool | UnifiedTitleAndToolBarOnMac [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQMainWindowSignals | Emit [get] |
Properties inherited from QtGui.QWidget | |
virtual EventHandler < QEventArgs< QActionEvent > > | ActionEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | ChangeEvent |
| |
virtual EventHandler < QEventArgs< QCloseEvent > > | CloseEvent |
| |
virtual EventHandler < QEventArgs < QContextMenuEvent > > | ContextMenuEvent |
| |
virtual EventHandler < QEventArgs< QDragEnterEvent > > | DragEnterEvent |
| |
virtual EventHandler < QEventArgs< QDragLeaveEvent > > | DragLeaveEvent |
| |
virtual EventHandler < QEventArgs< QDragMoveEvent > > | DragMoveEvent |
| |
virtual EventHandler < QEventArgs< QDropEvent > > | DropEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | EnterEvent |
| |
virtual EventHandler < QEventArgs< QFocusEvent > > | FocusInEvent |
| |
virtual EventHandler < QEventArgs< QFocusEvent > > | FocusOutEvent |
| |
virtual EventHandler < QEventArgs< QHideEvent > > | HideEvent |
| |
virtual EventHandler < QEventArgs < QInputMethodEvent > > | InputMethodEvent |
| |
virtual EventHandler < QEventArgs< QKeyEvent > > | KeyPressEvent |
| |
virtual EventHandler < QEventArgs< QKeyEvent > > | KeyReleaseEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | LeaveEvent |
| |
virtual EventHandler < QEventArgs< QMouseEvent > > | MouseDoubleClickEvent |
| |
virtual EventHandler < QEventArgs< QMouseEvent > > | MouseMoveEvent |
| |
virtual EventHandler < QEventArgs< QMouseEvent > > | MousePressEvent |
| |
virtual EventHandler < QEventArgs< QMouseEvent > > | MouseReleaseEvent |
| |
virtual EventHandler < QEventArgs< QMoveEvent > > | MoveEvent |
| |
virtual EventHandler < QEventArgs< QPaintEvent > > | PaintEvent |
| |
virtual EventHandler < QEventArgs< QResizeEvent > > | ResizeEvent |
| |
virtual EventHandler < QEventArgs< QShowEvent > > | ShowEvent |
| |
virtual EventHandler < QEventArgs< QTabletEvent > > | TabletEvent |
| |
virtual EventHandler < QEventArgs< QWheelEvent > > | WheelEvent |
| |
Slot< QPoint > | CustomContextMenuRequested |
| |
new QPalette.ColorRole | BackgroundRole [get, set] |
| |
new QMargins | ContentsMargins [get, set] |
| |
new QWidget | FocusProxy [get, set] |
| |
new QPalette.ColorRole | ForegroundRole [get, set] |
| |
new QGraphicsEffect | GraphicsEffect [get, set] |
| |
new QInputContext | InputContext [get, set] |
| |
new QLayout | Layout [get, set] |
| |
new QRegion | Mask [get, set] |
| |
new QStyle | Style [get, set] |
| |
new Qt.WindowType | WindowFlags [get, set] |
new string | WindowRole [get, set] |
| |
new Qt.WindowState | WindowState [get, set] |
| |
new bool | Modal [get] |
| |
new Qt.WindowModality | WindowModality [get, set] |
| |
new bool | Enabled [get, set] |
| |
new QRect | Geometry [get, set] |
| |
new QRect | FrameGeometry [get] |
| |
new QRect | NormalGeometry [get] |
| |
new int | X [get] |
| |
new int | Y [get] |
| |
new QPoint | Pos [get, set] |
| |
new QSize | FrameSize [get] |
| |
new QSize | Size [get, set] |
| |
new int | Width [get] |
| |
new int | Height [get] |
| |
new QRect | Rect [get] |
| |
new QRect | ChildrenRect [get] |
| |
new QRegion | ChildrenRegion [get] |
| |
new QSizePolicy | SizePolicy [get, set] |
| |
new QSize | MinimumSize [get, set] |
| |
new QSize | MaximumSize [get, set] |
| |
new int | MinimumWidth [get, set] |
| |
new int | MinimumHeight [get, set] |
| |
new int | MaximumWidth [get, set] |
| |
new int | MaximumHeight [get, set] |
| |
new QSize | SizeIncrement [get, set] |
| |
new QSize | BaseSize [get, set] |
| |
new QPalette | Palette [get, set] |
| |
new QFont | Font [get, set] |
| |
new QCursor | Cursor [get, set] |
| |
new bool | MouseTracking [get, set] |
| |
new bool | IsActiveWindow [get] |
| |
new Qt.FocusPolicy | FocusPolicy [get, set] |
| |
new bool | Focus [get] |
| |
new Qt.ContextMenuPolicy | ContextMenuPolicy [get, set] |
| |
new bool | UpdatesEnabled [get, set] |
| |
new bool | Visible [get, set] |
| |
new bool | Minimized [get] |
| |
new bool | Maximized [get] |
| |
new bool | FullScreen [get] |
| |
new bool | AcceptDrops [get, set] |
| |
new string | WindowTitle [get, set] |
| |
new QIcon | WindowIcon [get, set] |
| |
new string | WindowIconText [get, set] |
| |
new double | WindowOpacity [get, set] |
| |
new bool | WindowModified [get, set] |
| |
new string | ToolTip [get, set] |
| |
new string | StatusTip [get, set] |
| |
new string | WhatsThis [get, set] |
| |
new string | AccessibleName [get, set] |
| |
new string | AccessibleDescription [get, set] |
| |
new Qt.LayoutDirection | LayoutDirection [get, set] |
| |
new bool | AutoFillBackground [get, set] |
| |
new string | StyleSheet [get, set] |
| |
new QLocale | Locale [get, set] |
| |
new string | WindowFilePath [get, set] |
| |
new Qt.InputMethodHint | InputMethodHints [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new ushort | Painters [get, set] |
new IQWidgetSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
new QObject | Parent [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
Additional Inherited Members | |
Protected Attributes inherited from QtCore.QObject | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QMainWindow class provides a main application window.
Qt Main Window Framework
A main window provides a framework for building an application's user interface. Qt has QMainWindow and its related classes for main window management. QMainWindow has its own layout to which you can add QToolBars, QDockWidgets, a QMenuBar, and a QStatusBar. The layout has a center area that can be occupied by any kind of widget. You can see an image of the layout below.
Note: Creating a main window without a central widget is not supported. You must have a central widget even if it is just a placeholder.
Creating Main Window Components
A central widget will typically be a standard Qt widget such as a QTextEdit or a QGraphicsView. Custom widgets can also be used for advanced applications. You set the central widget with setCentralWidget().
Main windows have either a single (SDI) or multiple (MDI) document interface. You create MDI applications in Qt by using a QMdiArea as the central widget.
We will now examine each of the other widgets that can be added to a main window. We give examples on how to create and add them.
Creating Menus
Qt implements menus in QMenu and QMainWindow keeps them in a QMenuBar. QActions are added to the menus, which display them as menu items.
You can add new menus to the main window's menu bar by calling menuBar(), which returns the QMenuBar for the window, and then add a menu with QMenuBar::addMenu().
QMainWindow comes with a default menu bar, but you can also set one yourself with setMenuBar(). If you wish to implement a custom menu bar (i.e., not use the QMenuBar widget), you can set it with setMenuWidget().
An example of how to create menus follows:
void MainWindow::createMenus()
{
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(newAct);
fileMenu->addAction(openAct);
fileMenu->addAction(saveAct);
The createPopupMenu() function creates popup menus when the main window receives context menu events. The default implementation generates a menu with the checkable actions from the dock widgets and toolbars. You can reimplement createPopupMenu() for a custom menu.
Creating Toolbars
Toolbars are implemented in the QToolBar class. You add a toolbar to a main window with addToolBar().
You control the initial position of toolbars by assigning them to a specific Qt::ToolBarArea. You can split an area by inserting a toolbar break - think of this as a line break in text editing - with addToolBarBreak() or insertToolBarBreak(). You can also restrict placement by the user with QToolBar::setAllowedAreas() and QToolBar::setMovable().
The size of toolbar icons can be retrieved with iconSize(). The sizes are platform dependent; you can set a fixed size with setIconSize(). You can alter the appearance of all tool buttons in the toolbars with setToolButtonStyle().
An example of toolbar creation follows:
void MainWindow::createToolBars()
{
fileToolBar = addToolBar(tr("File"));
fileToolBar->addAction(newAct);
Creating Dock Widgets
Dock widgets are implemented in the QDockWidget class. A dock widget is a window that can be docked into the main window. You add dock widgets to a main window with addDockWidget().
There are four dock widget areas as given by the Qt::DockWidgetArea enum: left, right, top, and bottom. You can specify which dock widget area that should occupy the corners where the areas overlap with setCorner(). By default each area can only contain one row (vertical or horizontal) of dock widgets, but if you enable nesting with setDockNestingEnabled(), dock widgets can be added in either direction.
Two dock widgets may also be stacked on top of each other. A QTabBar is then used to select which of the widgets that should be displayed.
We give an example of how to create and add dock widgets to a main window:
QDockWidget *dockWidget = new QDockWidget(tr("Dock Widget"), this);
dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea |
Qt::RightDockWidgetArea);
dockWidget->setWidget(dockWidgetContents);
addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
The Status Bar
You can set a status bar with setStatusBar(), but one is created the first time statusBar() (which returns the main window's status bar) is called. See QStatusBar for information on how to use it.
Storing State
QMainWindow can store the state of its layout with saveState(); it can later be retrieved with restoreState(). It is the position and size (relative to the size of the main window) of the toolbars and dock widgets that are stored.
See also QMenuBar, QToolBar, QStatusBar, QDockWidget, Application Example, Dock Widgets Example, MDI Example, SDI Example, and Menus Example.
This enum contains flags that specify the docking behavior of QMainWindow.
These options only control how dock widgets may be dropped in a QMainWindow. They do not re-arrange the dock widgets to conform with the specified options. For this reason they should be set before any dock widgets are added to the main window. Exceptions to this are the AnimatedDocks and VerticalTabs options, which may be set at any time.
This enum was introduced or modified in Qt 4.3.
|
protected |
QtGui.QMainWindow.QMainWindow | ( | QWidget | parent = null , |
Qt.WindowType | flags = 0 |
||
) |
Constructs a QMainWindow with the given parent and the specified widget flags.
QMainWindow sets the Qt::Window flag itself, and will hence always be created as a top-level widget.
new void QtGui.QMainWindow.AddDockWidget | ( | Qt.DockWidgetArea | area, |
QDockWidget | dockwidget | ||
) |
Adds the given dockwidget to the specified area.
new void QtGui.QMainWindow.AddDockWidget | ( | Qt.DockWidgetArea | area, |
QDockWidget | dockwidget, | ||
Qt.Orientation | orientation | ||
) |
Adds dockwidget into the given area in the direction specified by the orientation.
new void QtGui.QMainWindow.AddToolBar | ( | QToolBar | toolbar | ) |
This is an overloaded function.
Equivalent of calling addToolBar(Qt::TopToolBarArea, toolbar)
new QToolBar QtGui.QMainWindow.AddToolBar | ( | string | title | ) |
This is an overloaded function.
Creates a QToolBar object, setting its window title to title, and inserts it into the top toolbar area.
See also setWindowTitle().
new void QtGui.QMainWindow.AddToolBar | ( | Qt.ToolBarArea | area, |
QToolBar | toolbar | ||
) |
Adds the toolbar into the specified area in this main window. The toolbar is placed at the end of the current tool bar block (i.e. line). If the main window already manages toolbar then it will only move the toolbar to area.
See also insertToolBar(), addToolBarBreak(), and insertToolBarBreak().
new void QtGui.QMainWindow.AddToolBarBreak | ( | Qt.ToolBarArea | area = Qt.ToolBarArea.TopToolBarArea | ) |
Adds a toolbar break to the given area after all the other objects that are present.
new Qt.DockWidgetArea QtGui.QMainWindow.Corner | ( | Qt.Corner | corner | ) |
Returns the dock widget area that occupies the specified corner.
See also setCorner().
|
virtual |
Returns a popup menu containing checkable entries for the toolbars and dock widgets present in the main window. If there are no toolbars and dock widgets present, this function returns a null pointer.
By default, this function is called by the main window when the user activates a context menu, typically by right-clicking on a toolbar or a dock widget.
If you want to create a custom popup menu, reimplement this function and return a newly-created popup menu. Ownership of the popup menu is transferred to the caller.
See also addDockWidget(), addToolBar(), and menuBar().
|
virtual |
Reimplemented from QtCore.QObject.
new void QtGui.QMainWindow.Dispose | ( | ) |
new QMainWindow.DockOption QtGui.QMainWindow.dockOptions | ( | ) |
new Qt.DockWidgetArea QtGui.QMainWindow.DockWidgetArea | ( | QDockWidget | dockwidget | ) |
Returns the Qt::DockWidgetArea for dockwidget. If dockwidget has not been added to the main window, this function returns Qt::NoDockWidgetArea.
See also addDockWidget(), splitDockWidget(), and Qt::DockWidgetArea.
Inserts the toolbar into the area occupied by the before toolbar so that it appears before it. For example, in normal left-to-right layout operation, this means that toolbar will appear to the left of the toolbar specified by before in a horizontal toolbar area.
See also insertToolBarBreak(), addToolBar(), and addToolBarBreak().
new void QtGui.QMainWindow.InsertToolBarBreak | ( | QToolBar | before | ) |
Inserts a toolbar break before the toolbar specified by before.
new bool QtGui.QMainWindow.IsSeparator | ( | QPoint | pos | ) |
|
protected |
Reimplemented from QWidget::contextMenuEvent().
override bool QtGui.QMainWindow.OnEvent | ( | QEvent @ | event | ) |
Reimplemented from QObject::event().
|
protected |
This signal is emitted when the size of the icons used in the window is changed. The new icon size is passed in iconSize.
You can connect this signal to other components to help maintain a consistent appearance for your application.
See also setIconSize().
|
protected |
This signal is emitted when the style used for tool buttons in the window is changed. The new style is passed in toolButtonStyle.
You can connect this signal to other components to help maintain a consistent appearance for your application.
See also setToolButtonStyle().
new void QtGui.QMainWindow.RemoveDockWidget | ( | QDockWidget | dockwidget | ) |
Removes the dockwidget from the main window layout and hides it. Note that the dockwidget is not deleted.
new void QtGui.QMainWindow.RemoveToolBar | ( | QToolBar | toolbar | ) |
Removes the toolbar from the main window layout and hides it. Note that the toolbar is not deleted.
new void QtGui.QMainWindow.RemoveToolBarBreak | ( | QToolBar | before | ) |
Removes a toolbar break previously inserted before the toolbar specified by before.
new bool QtGui.QMainWindow.RestoreDockWidget | ( | QDockWidget | dockwidget | ) |
Restores the state of dockwidget if it is created after the call to restoreState(). Returns true if the state was restored; otherwise returns false.
See also restoreState() and saveState().
new bool QtGui.QMainWindow.RestoreState | ( | QByteArray | state, |
int | version = 0 |
||
) |
Restores the state of this mainwindow's toolbars and dockwidgets. The version number is compared with that stored in state. If they do not match, the mainwindow's state is left unchanged, and this function returns false; otherwise, the state is restored, and this function returns true.
To restore geometry saved using QSettings, you can use code like this:
void MainWindow::readSettings()
{
QSettings settings("MyCompany", "MyApp");
restoreGeometry(settings.value("myWidget/geometry").toByteArray());
restoreState(settings.value("myWidget/windowState").toByteArray());
}
See also saveState(), QWidget::saveGeometry(), QWidget::restoreGeometry(), and restoreDockWidget().
new QByteArray QtGui.QMainWindow.SaveState | ( | int | version = 0 | ) |
Saves the current state of this mainwindow's toolbars and dockwidgets. The version number is stored as part of the data.
The objectName property is used to identify each QToolBar and QDockWidget. You should make sure that this property is unique for each QToolBar and QDockWidget you add to the QMainWindow
To restore the saved state, pass the return value and version number to restoreState().
To save the geometry when the window closes, you can implement a close event like this:
void MyMainWindow::closeEvent(QCloseEvent *event)
{
QSettings settings("MyCompany", "MyApp");
settings.setValue("geometry", saveGeometry());
settings.setValue("windowState", saveState());
QMainWindow::closeEvent(event);
}
See also restoreState(), QWidget::saveGeometry(), and QWidget::restoreGeometry().
new void QtGui.QMainWindow.SetCorner | ( | Qt.Corner | corner, |
Qt.DockWidgetArea | area | ||
) |
Sets the given dock widget area to occupy the specified corner.
See also corner().
new void QtGui.QMainWindow.SetDockOptions | ( | QMainWindow.DockOption | options | ) |
new void QtGui.QMainWindow.SetTabPosition | ( | Qt.DockWidgetArea | areas, |
QTabWidget.TabPosition | tabPosition | ||
) |
Sets the tab position for the given dock widget areas to the specified tabPosition. By default, all dock areas show their tabs at the bottom.
Note: The VerticalTabs dock option overrides the tab positions set by this method.
This function was introduced in Qt 4.5.
See also tabPosition() and setTabShape().
new void QtGui.QMainWindow.SplitDockWidget | ( | QDockWidget | after, |
QDockWidget | dockwidget, | ||
Qt.Orientation | orientation | ||
) |
Splits the space covered by the first dock widget into two parts, moves the first dock widget into the first part, and moves the second dock widget into the second part.
The orientation specifies how the space is divided: A Qt::Horizontal split places the second dock widget to the right of the first; a Qt::Vertical split places the second dock widget below the first.
Note: if first is currently in a tabbed docked area, second will be added as a new tab, not as a neighbor of first. This is because a single tab can contain only one dock widget.
Note: The Qt::LayoutDirection influences the order of the dock widgets in the two parts of the divided area. When right-to-left layout direction is enabled, the placing of the dock widgets will be reversed.
See also tabifyDockWidget(), addDockWidget(), and removeDockWidget().
new System.Collections.Generic.List<QDockWidget> QtGui.QMainWindow.TabifiedDockWidgets | ( | QDockWidget | dockwidget | ) |
Returns the dock widgets that are tabified together with dockwidget.
This function was introduced in Qt 4.5.
See also tabifyDockWidget().
new void QtGui.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().
new QTabWidget.TabPosition QtGui.QMainWindow.TabPosition | ( | Qt.DockWidgetArea | area | ) |
Returns the tab position for area.
Note: The VerticalTabs dock option overrides the tab positions returned by this function.
This function was introduced in Qt 4.5.
See also setTabPosition() and tabShape().
new Qt.ToolBarArea QtGui.QMainWindow.ToolBarArea | ( | QToolBar | toolbar | ) |
Returns the Qt::ToolBarArea for toolbar. If toolbar has not been added to the main window, this function returns Qt::NoToolBarArea.
See also addToolBar(), addToolBarBreak(), and Qt::ToolBarArea.
new bool QtGui.QMainWindow.ToolBarBreak | ( | QToolBar | toolbar | ) |
Returns whether there is a toolbar break before the toolbar.
See also addToolBarBreak() and insertToolBarBreak().
|
static |
|
static |
|
static |
|
static |
|
getset |
This property holds whether manipulating dock widgets and tool bars is animated.
When a dock widget or tool bar is dragged over the main window, the main window adjusts its contents to indicate where the dock widget or tool bar will be docked if it is dropped. Setting this property causes QMainWindow to move its contents in a smooth animation. Clearing this property causes the contents to snap into their new positions.
By default, this property is set. It may be cleared if the main window contains widgets which are slow at resizing or repainting themselves.
Setting this property is identical to setting the AnimatedDocks option using setDockOptions().
This property was introduced in Qt 4.2.
|
getset |
Returns the central widget for the main window. This function returns zero if the central widget has not been set.
Sets the given widget to be the main window's central widget.
Note: QMainWindow takes ownership of the widget pointer and deletes it at the appropriate time.
|
getset |
This property holds whether docks can be nested.
If this property is false, dock areas can only contain a single row (horizontal or vertical) of dock widgets. If this property is true, the area occupied by a dock widget can be split in either direction to contain more dock widgets.
Dock nesting is only necessary in applications that contain a lot of dock widgets. It gives the user greater freedom in organizing their main window. However, dock nesting leads to more complex (and less intuitive) behavior when a dock widget is dragged over the main window, since there are more ways in which a dropped dock widget may be placed in the dock area.
Setting this property is identical to setting the AllowNestedDocks option using setDockOptions().
This property was introduced in Qt 4.2.
|
getset |
This property holds the docking behavior of QMainWindow.
The default value is AnimatedDocks | AllowTabbedDocks.
This property was introduced in Qt 4.3.
|
getset |
This property holds whether the tab bar for tabbed dockwidgets is set to document mode.
The default is false.
This property was introduced in Qt 4.5.
|
getprotected |
|
getset |
This property holds size of toolbar icons in this mainwindow.
The default is the default tool bar icon size of the GUI style. Note that the icons used must be at least of this size as the icons are only scaled down.
|
addremove |
This signal is emitted when the size of the icons used in the window is changed. The new icon size is passed in iconSize.
You can connect this signal to other components to help maintain a consistent appearance for your application.
See also setIconSize().
|
getset |
Returns the menu bar for the main window. This function creates and returns an empty menu bar if the menu bar does not exist.
If you want all windows in a Mac application to share one menu bar, don't use this function to create it, because the menu bar created here will have this QMainWindow as its parent. Instead, you must create a menu bar that does not have a parent, which you can then share among all the Mac windows. Create a parent-less menu bar this way:
QMenuBar *menuBar = new QMenuBar(0);
Sets the menu bar for the main window to menuBar.
Note: QMainWindow takes ownership of the menuBar pointer and deletes it at the appropriate time.
|
getset |
Returns the menu bar for the main window. This function returns null if a menu bar hasn't been constructed yet.
This function was introduced in Qt 4.2.
Sets the menu bar for the main window to menuBar.
QMainWindow takes ownership of the menuBar pointer and deletes it at the appropriate time.
This function was introduced in Qt 4.2.
|
staticget |
|
getset |
Returns the status bar for the main window. This function creates and returns an empty status bar if the status bar does not exist.
Sets the status bar for the main window to statusbar.
Setting the status bar to 0 will remove it from the main window. Note that QMainWindow takes ownership of the statusbar pointer and deletes it at the appropriate time.
|
getset |
This property holds the tab shape used for tabbed dock widgets.
The default is QTabWidget::Rounded.
This property was introduced in Qt 4.5.
|
getset |
This property holds style of toolbar buttons in this mainwindow.
The default is Qt::ToolButtonIconOnly.
|
addremove |
This signal is emitted when the style used for tool buttons in the window is changed. The new style is passed in toolButtonStyle.
You can connect this signal to other components to help maintain a consistent appearance for your application.
See also setToolButtonStyle().
|
getset |
This property holds whether the window uses the unified title and toolbar look on Mac OS X.
This property is false by default and only has any effect on Mac OS X 10.4 or higher.
If set to true, then the top toolbar area is replaced with a Carbon HIToolbar or a Cocoa NSToolbar (depending on whether Qt was built with Carbon or Cocoa). All toolbars in the top toolbar area and any toolbars added afterwards are moved to that. This means a couple of things.
QToolBars in this toolbar area are not movable and you cannot drag other toolbars to it
Toolbar breaks are not respected or preserved
Any custom widgets in the toolbar will not be shown if the toolbar becomes too small (only actions will be shown)
Before Qt 4.5, if you called showFullScreen() on the main window, the QToolbar would disappear since it is considered to be part of the title bar. Qt 4.5 and up will now work around this by pulling the toolbars out and back into the regular toolbar and vice versa when you swap out.
Setting this back to false will remove these restrictions.
The Qt::WA_MacBrushedMetal attribute takes precedence over this property.
This property was introduced in Qt 4.3.