Qyoto  4.0.6
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QTabWidget Class Reference

The QTabWidget class provides a stack of tabbed widgets. More...

Inheritance diagram for QtGui.QTabWidget:
Collaboration diagram for QtGui.QTabWidget:

Public Types

enum  TabPosition { East = 3, North = 0, South = 1, West = 2 }
  More...
 
enum  TabShape { Rounded = 0, Triangular = 1 }
  More...
 
- Public Types inherited from QtGui.QWidget
enum  RenderFlag { DrawChildren = 2, DrawWindowBackground = 1, IgnoreMask = 4 }
  More...
 

Public Member Functions

 QTabWidget (QWidget parent=null)
 
 
override void CreateProxy ()
 
new int AddTab (QWidget widget, QIcon icon, string label)
 
 
new int AddTab (QWidget widget, string label)
 
 
new void Clear ()
 
 
new QWidget CornerWidget (Qt.Corner corner=Qt.Corner.TopRightCorner)
 
 
override bool OnEvent (QEvent ev)
 
 
override int HeightForWidth (int width)
 
 
new int IndexOf (QWidget widget)
 
 
new int InsertTab (int index, QWidget widget, QIcon icon, string label)
 
 
new int InsertTab (int index, QWidget widget, string label)
 
 
new bool IsTabEnabled (int index)
 
 
new void RemoveTab (int index)
 
 
new void SetCornerWidget (QWidget w, Qt.Corner corner=Qt.Corner.TopRightCorner)
 
 
new void SetTabEnabled (int index, bool enable)
 
 
new void SetTabIcon (int index, QIcon icon)
 
 
new void SetTabText (int index, string label)
 
 
new void SetTabToolTip (int index, string tip)
 
 
new void SetTabWhatsThis (int index, string text)
 
 
new QIcon TabIcon (int index)
 
 
new string TabText (int index)
 
 
new string TabToolTip (int index)
 
 
new string TabWhatsThis (int index)
 
 
new QWidget Widget (int index)
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QWidget
 QWidget (QWidget parent=null, Qt.WindowType f=0)
 
 
override void CreateProxy ()
 
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 void CreateWinId ()
 
new void EnsurePolished ()
 
 
override bool OnEvent (QEvent @event)
 
 
new void GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom)
 
 
new void GrabGesture (Qt.GestureType type, Qt.GestureFlag flags=0)
 
 
new void GrabKeyboard ()
 
 
new void GrabMouse ()
 
 
new void GrabMouse (QCursor cursor)
 
 
new int GrabShortcut (QKeySequence key, Qt.ShortcutContext context=Qt.ShortcutContext.WindowShortcut)
 
 
new void Hide ()
 
 
virtual object InputMethodQuery (Qt.InputMethodQuery query)
 
 
new void InsertAction (QAction before, QAction action)
 
 
new void InsertActions (QAction before, System.Collections.Generic.List< QAction > actions)
 
 
new bool IsAncestorOf (QWidget child)
 
 
new bool IsEnabledTo (QWidget ancestor)
 
 
new bool IsVisibleTo (QWidget ancestor)
 
 
new void Lower ()
 
 
new QPoint MapFrom (QWidget parent, QPoint pos)
 
 
new QPoint MapFromGlobal (QPoint pos)
 
 
new QPoint MapFromParent (QPoint pos)
 
 
new QPoint MapTo (QWidget parent, QPoint pos)
 
 
new QPoint MapToGlobal (QPoint pos)
 
 
new QPoint MapToParent (QPoint pos)
 
 
new void Move (int x, int y)
 
new void OverrideWindowFlags (Qt.WindowType type)
 
 
new void OverrideWindowState (Qt.WindowState state)
 
new void Raise ()
 
 
virtual void ReleaseDC (System.IntPtr hdc)
 
 
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 rect)
 
 
new void Repaint (QRegion rgn)
 
 
new void Repaint (int x, int y, int w, int h)
 
 
new void Resize (int w, int h)
 
new bool RestoreGeometry (QByteArray geometry)
 
 
new void Scroll (int dx, int dy)
 
 
new void Scroll (int dx, int dy, QRect r)
 
 
new void SetAttribute (Qt.WidgetAttribute attribute, 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 disable)
 
 
new void SetFixedHeight (int h)
 
 
new void SetFixedSize (QSize s)
 
 
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 SetMask (QBitmap bitmap)
 
 
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)
 
new void Show ()
 
 
new void ShowFullScreen ()
 
 
new void ShowMaximized ()
 
 
new void ShowMinimized ()
 
 
new void ShowNormal ()
 
 
new void StackUnder (QWidget w)
 
 
new bool TestAttribute (Qt.WidgetAttribute attribute)
 
 
new void UngrabGesture (Qt.GestureType type)
 
 
new void UnsetCursor ()
 
new void UnsetLayoutDirection ()
 
new void UnsetLocale ()
 
new void Update ()
 
 
new void Update (QRect rect)
 
 
new void Update (QRegion rgn)
 
 
new void Update (int x, int y, int w, int h)
 
 
new void UpdateGeometry ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
 
 
new bool BlockSignals (bool b)
 
 
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 ()
 
 
virtual bool EventFilter (QObject watched, QEvent @event)
 
 
new bool Inherits (string classname)
 
 
new void InstallEventFilter (QObject filterObj)
 
 
new void KillTimer (int id)
 
 
new object Property (string name)
 
 
new void RemoveEventFilter (QObject obj)
 
 
new bool SetProperty (string name, object value)
 
 
new void SetUserData (uint id, QObjectUserData data)
 
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 void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 
- Public Member Functions inherited from QtGui.IQPaintDevice
void ReleaseDC (System.IntPtr hdc)
 

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 id)
 
 
static void SetTabOrder (QWidget first, QWidget second)
 
 
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 type=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 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 stream, QSizeF size)
 
 
static QDataStream Write (QDataStream stream, QPoint point)
 
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream stream, QLineF line)
 
 
static QDataStream Write (QDataStream stream, QPointF point)
 
 
static QDataStream Write (QDataStream @out, QChar chr)
 
 
static QDataStream Write (QDataStream @out, QByteArray ba)
 
 
static QDataStream Write (QDataStream stream, QEasingCurve easing)
 
 
static QDataStream Write (QDataStream stream, QRectF rectangle)
 
 
static QDataStream Write (QDataStream @out, QDateTime dateTime)
 
 
static QDataStream Write (QDataStream @out, QUrl url)
 
 
static QDataStream Write (QDataStream @out, QTime time)
 
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream @out, QBitArray ba)
 
 
static QDataStream Write (QDataStream s, QUuid id)
 
 
static QDataStream Write (QDataStream stream, QLine line)
 
 
static QDataStream Write (QDataStream @out, QDate date)
 
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
 
 
static QDataStream Write (QDataStream stream, QRect rectangle)
 
 
static QDataStream Write (QDataStream stream, QSize size)
 
 
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 @in, QChar chr)
 
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream stream, QRect rectangle)
 
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream @in, QDate date)
 
 
static QDataStream Read (QDataStream @in, QUrl url)
 
 
static QDataStream Read (QDataStream s, QUuid id)
 
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream stream, QLineF line)
 
 
static QDataStream Read (QDataStream stream, QRectF rectangle)
 
 
static QDataStream Read (QDataStream stream, QPointF point)
 
 
static QDataStream Read (QDataStream stream, QLine line)
 
 
static QDataStream Read (QDataStream @in, QBitArray ba)
 
 
static QDataStream Read (QDataStream stream, QSize size)
 
 
static QDataStream Read (QDataStream @in, QDateTime dateTime)
 
 
static QDataStream Read (QDataStream @in, QTime time)
 
 
static QDataStream Read (QDataStream stream, QPoint point)
 
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
 
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream @in, QByteArray ba)
 
 
static QDataStream Read (QDataStream stream, QSizeF size)
 
 
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 ptr)
 
 
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, int compressionLevel=-1)
 
 
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 (char 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 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 void QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
 
 
static void QRemovePostRoutine (System.Action arg1)
 
static int QRound (double d)
 
static long QRound64 (double d)
 
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 void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
 
static bool Qputenv (string varName, QByteArray value)
 
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 src)
 
 
static int Qstricmp (string str1, string str2)
 
 
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 str1, string str2, uint len)
 
 
static uint Qstrnlen (string str, uint maxlen)
 
 
static string QtTrId (string id, int n=-1)
 

Protected Member Functions

 QTabWidget (System.Type dummy)
 
override void OnChangeEvent (QEvent ev)
 
 
new void OnCurrentChanged (int index)
 
 
new void InitStyleOption (QStyleOptionTabWidgetFrame option)
 
 
override void OnKeyPressEvent (QKeyEvent e)
 
 
override void OnPaintEvent (QPaintEvent @event)
 
 
override void OnResizeEvent (QResizeEvent e)
 
 
override void OnShowEvent (QShowEvent @event)
 
 
new void OnTabCloseRequested (int index)
 
 
virtual void TabInserted (int index)
 
 
virtual void TabRemoved (int index)
 
 
- Protected Member Functions inherited from QtGui.QWidget
 QWidget (System.Type dummy)
 
virtual void OnActionEvent (QActionEvent @event)
 
 
virtual void OnChangeEvent (QEvent @event)
 
 
virtual void OnCloseEvent (QCloseEvent @event)
 
 
virtual void OnContextMenuEvent (QContextMenuEvent @event)
 
 
new void Create ()
 
 
new void Create (NativeULong window, bool initializeWindow=true, bool destroyOldWindow=true)
 
 
new void OnCustomContextMenuRequested (QPoint pos)
 
 
new void Destroy (bool destroyWindow=true, bool destroySubWindows=true)
 
 
virtual void OnDragEnterEvent (QDragEnterEvent @event)
 
 
virtual void OnDragLeaveEvent (QDragLeaveEvent @event)
 
 
virtual void OnDragMoveEvent (QDragMoveEvent @event)
 
 
virtual void OnDropEvent (QDropEvent @event)
 
 
virtual void EnabledChange (bool arg1)
 
virtual void OnEnterEvent (QEvent @event)
 
 
virtual void OnFocusInEvent (QFocusEvent @event)
 
 
virtual bool FocusNextPrevChild (bool next)
 
 
virtual void OnFocusOutEvent (QFocusEvent @event)
 
 
virtual void FontChange (QFont arg1)
 
virtual void OnHideEvent (QHideEvent @event)
 
 
virtual void OnInputMethodEvent (QInputMethodEvent @event)
 
 
virtual void OnKeyPressEvent (QKeyEvent @event)
 
 
virtual void OnKeyReleaseEvent (QKeyEvent @event)
 
 
virtual void LanguageChange ()
 
 
virtual void OnLeaveEvent (QEvent @event)
 
 
virtual int Metric (QPaintDevice.PaintDeviceMetric m)
 
 
virtual void OnMouseDoubleClickEvent (QMouseEvent @event)
 
 
virtual void OnMouseMoveEvent (QMouseEvent @event)
 
 
virtual void OnMousePressEvent (QMouseEvent @event)
 
 
virtual void OnMouseReleaseEvent (QMouseEvent @event)
 
 
virtual void OnMoveEvent (QMoveEvent @event)
 
 
virtual void PaletteChange (QPalette arg1)
 
new void ResetInputContext ()
 
 
virtual void OnResizeEvent (QResizeEvent @event)
 
 
virtual void StyleChange (QStyle arg1)
 
virtual void OnTabletEvent (QTabletEvent @event)
 
 
new void UpdateMicroFocus ()
 
 
virtual void OnWheelEvent (QWheelEvent @event)
 
 
virtual void WindowActivationChange (bool arg1)
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent @event)
 
 
virtual void ConnectNotify (string signal)
 
 
virtual void OnCustomEvent (QEvent @event)
 
 
new void OnDestroyed (QObject obj=null)
 
 
virtual void DisconnectNotify (string signal)
 
 
new int Receivers (string signal)
 
 
virtual void OnTimerEvent (QTimerEvent @event)
 
 

Properties

Slot< System.Int32 > CurrentChanged
 
 
Slot< System.Int32 > TabCloseRequested
 
 
Slot< QWidgetCurrentChangedQWidget
 
Slot< System.String > Selected
 
QWidget CurrentWidget [get, set]
 
 
QTabBar TabBar [get, set]
 
 
override QSize MinimumSizeHint [get]
 
 
override QSize SizeHint [get]
 
 
new TabPosition tabPosition [get, set]
 
 
new TabShape tabShape [get, set]
 
 
new int CurrentIndex [get, set]
 
 
new int Count [get]
 
 
new QSize IconSize [get, set]
 
 
new Qt.TextElideMode ElideMode [get, set]
 
 
new bool UsesScrollButtons [get, set]
 
 
new bool DocumentMode [get, set]
 
 
new bool TabsClosable [get, set]
 
 
new bool Movable [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQTabWidgetSignals 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< QPointCustomContextMenuRequested
 
 
QPalette.ColorRole BackgroundRole [get, set]
 
 
QMargins ContentsMargins [get, set]
 
 
QWidget FocusProxy [get, set]
 
 
QPalette.ColorRole ForegroundRole [get, set]
 
 
QGraphicsEffect GraphicsEffect [get, set]
 
 
QInputContext InputContext [get, set]
 
 
QLayout Layout [get, set]
 
 
QRegion Mask [get, set]
 
 
QStyle Style [get, set]
 
 
Qt.WindowType WindowFlags [get, set]
 
string WindowRole [get, set]
 
 
Qt.WindowState WindowState [get, set]
 
 
virtual int DevType [get]
 
virtual System.IntPtr GetDC [get]
 
 
virtual QPaintEngine PaintEngine [get]
 
 
int ColorCount [get]
 
int Depth [get]
 
int HeightMM [get]
 
int LogicalDpiX [get]
 
int LogicalDpiY [get]
 
int NumColors [get]
 
bool PaintingActive [get]
 
int PhysicalDpiX [get]
 
int PhysicalDpiY [get]
 
int WidthMM [get]
 
System.Collections.Generic.List
< QAction
Actions [get]
 
 
QRect ContentsRect [get]
 
 
NativeULong EffectiveWinId [get]
 
 
bool FocusNextChild [get]
 
 
bool FocusPreviousChild [get]
 
 
QWidget FocusWidget [get]
 
 
QFontInfo FontInfo [get]
 
 
QFontMetrics FontMetrics [get]
 
 
QGraphicsProxyWidget GraphicsProxyWidget [get]
 
 
NativeULong InternalWinId [get]
 
bool IsEnabledToTLW [get]
 
 
bool IsHidden [get]
 
 
bool IsLeftToRight [get]
 
bool IsRightToLeft [get]
 
bool IsTopLevel [get]
 
 
bool IsWindow [get]
 
 
static QWidget KeyboardGrabber [get]
 
 
virtual QSize MinimumSizeHint [get]
 
static QWidget MouseGrabber [get]
 
 
QWidget NativeParentWidget [get]
 
 
QWidget NextInFocusChain [get]
 
 
QWidget ParentWidget [get]
 
 
QWidget PreviousInFocusChain [get]
 
 
QByteArray SaveGeometry [get]
 
 
virtual QSize SizeHint [get]
 
QWidget TopLevelWidget [get]
 
 
bool UnderMouse [get]
 
 
QRegion VisibleRegion [get]
 
 
NativeULong WinId [get]
 
 
QWidget Window [get]
 
 
Qt.WindowType WindowType [get]
 
 
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]
 
 
virtual 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< QObjectDestroyedQObject
 
Slot Destroyed
 
 
QObject Parent [get, set]
 
 
System.Collections.Generic.List
< QObject
Children [get]
 
 
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames [get]
 
 
bool IsWidgetType [get]
 
 
static uint RegisterUserData [get]
 
QObject Sender [get]
 
 
int SenderSignalIndex [get]
 
 
bool SignalsBlocked [get]
 
 
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]
 
- Properties inherited from QtCore.Qt
static string QAppName [get]
 
static double QInf [get]
 
static double QQNaN [get]
 
static double QSNaN [get]
 
static bool QSharedBuild [get]
 
static string QVersion [get]
 
static int Qrand [get]
 
- Properties inherited from QtGui.IQPaintDevice
System.Int32 ColorCount [get]
 
 
System.Int32 Depth [get]
 
 
System.Int32 DevType [get]
 
System.IntPtr GetDC [get]
 
System.Int32 Height [get]
 
 
System.Int32 HeightMM [get]
 
 
System.Int32 LogicalDpiX [get]
 
 
System.Int32 LogicalDpiY [get]
 
 
System.Int32 NumColors [get]
 
 
QPaintEngine PaintEngine [get]
 
 
System.Boolean PaintingActive [get]
 
 
System.Int32 PhysicalDpiX [get]
 
 
System.Int32 PhysicalDpiY [get]
 
 
System.Int32 Width [get]
 
 
System.Int32 WidthMM [get]
 
 

Additional Inherited Members

- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

Detailed Description

The QTabWidget class provides a stack of tabbed widgets.

A tab widget provides a tab bar (see QTabBar) and a "page area" that is used to display pages related to each tab. By default, the tab bar is shown above the page area, but different configurations are available (see TabPosition). Each tab is associated with a different widget (called a page). Only the current page is shown in the page area; all the other pages are hidden. The user can show a different page by clicking on its tab or by pressing its Alt+letter shortcut if it has one.

The normal way to use QTabWidget is to do the following:

Create a QTabWidget.

Create a QWidget for each of the pages in the tab dialog, but do not specify parent widgets for them.

Insert child widgets into the page widget, using layouts to position them as normal.

Call addTab() or insertTab() to put the page widgets into the tab widget, giving each tab a suitable label with an optional keyboard shortcut.

The position of the tabs is defined by tabPosition, their shape by tabShape.

The signal currentChanged() is emitted when the user selects a page.

The current page index is available as currentIndex(), the current page widget with currentWidget(). You can retrieve a pointer to a page widget with a given index using widget(), and can find the index position of a widget with indexOf(). Use setCurrentWidget() or setCurrentIndex() to show a particular page.

You can change a tab's text and icon using setTabText() or setTabIcon(). A tab and its associated page can be removed with removeTab().

Each tab is either enabled or disabled at any given time (see setTabEnabled()). If a tab is enabled, the tab text is drawn normally and the user can select that tab. If it is disabled, the tab is drawn in a different way and the user cannot select that tab. Note that even if a tab is disabled, the page can still be visible, for example if all of the tabs happen to be disabled.

Tab widgets can be a very good way to split up a complex dialog. An alternative is to use a QStackedWidget for which you provide some means of navigating between pages, for example, a QToolBar or a QListWidget.

Most of the functionality in QTabWidget is provided by a QTabBar (at the top, providing the tabs) and a QStackedWidget (most of the area, organizing the individual pages).

A Windows XP style tab widget. A Macintosh style tab widget. A Plastique style tab widget.

See also QTabBar, QStackedWidget, QToolBox, and Tab Dialog Example.

Member Enumeration Documentation

This enum type defines where QTabWidget draws the tab row:

Enumerator:
East 

The tabs are drawn to the right of the pages.

North 

The tabs are drawn above the pages.

South 

The tabs are drawn below the pages.

West 

The tabs are drawn to the left of the pages.

This enum type defines the shape of the tabs:

Enumerator:
Rounded 

The tabs are drawn with a rounded look. This is the default shape.

Triangular 

The tabs are drawn with a triangular look.

Constructor & Destructor Documentation

QtGui.QTabWidget.QTabWidget ( System.Type  dummy)
protected
QtGui.QTabWidget.QTabWidget ( QWidget  parent = null)

Constructs a tabbed widget with parent parent.

Member Function Documentation

new int QtGui.QTabWidget.AddTab ( QWidget  widget,
QIcon  icon,
string  label 
)

This is an overloaded function.

Adds a tab with the given page, icon, and label to the tab widget, and returns the index of the tab in the tab bar.

This function is the same as addTab(), but with an additional icon.

new int QtGui.QTabWidget.AddTab ( QWidget  widget,
string  label 
)

Adds a tab with the given page and label to the tab widget, and returns the index of the tab in the tab bar.

If the tab's label contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro&wse" then Alt+W becomes a shortcut which will move the focus to this tab.

Note: If you call addTab() after show(), the layout system will try to adjust to the changes in its widgets hierarchy and may cause flicker. To prevent this, you can set the QWidget::updatesEnabled property to false prior to changes; remember to set the property to true when the changes are done, making the widget receive paint events again.

See also insertTab().

new void QtGui.QTabWidget.Clear ( )

Removes all the pages, but does not delete them. Calling this function is equivalent to calling removeTab() until the tab widget is empty.

new QWidget QtGui.QTabWidget.CornerWidget ( Qt.Corner  corner = Qt.Corner.TopRightCorner)

Returns the widget shown in the corner of the tab widget or 0.

See also setCornerWidget().

override void QtGui.QTabWidget.CreateProxy ( )
virtual

Reimplemented from QtCore.QObject.

new void QtGui.QTabWidget.Dispose ( )
override int QtGui.QTabWidget.HeightForWidth ( int  width)
virtual

Reimplemented from QWidget::heightForWidth().

This function was introduced in Qt 4.8.

Reimplemented from QtGui.QWidget.

new int QtGui.QTabWidget.IndexOf ( QWidget  widget)

Returns the index position of the page occupied by the widget w, or -1 if the widget cannot be found.

new void QtGui.QTabWidget.InitStyleOption ( QStyleOptionTabWidgetFrame  option)
protected

Initialize option with the values from this QTabWidget. This method is useful for subclasses when they need a QStyleOptionTabWidgetFrame, but don't want to fill in all the information themselves.

See also QStyleOption::initFrom() and QTabBar::initStyleOption().

new int QtGui.QTabWidget.InsertTab ( int  index,
QWidget  widget,
QIcon  icon,
string  label 
)

This is an overloaded function.

Inserts a tab with the given label, page, and icon into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar.

This function is the same as insertTab(), but with an additional icon.

new int QtGui.QTabWidget.InsertTab ( int  index,
QWidget  widget,
string  label 
)

Inserts a tab with the given label and page into the tab widget at the specified index, and returns the index of the inserted tab in the tab bar.

The label is displayed in the tab and may vary in appearance depending on the configuration of the tab widget.

If the tab's label contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro&wse" then Alt+W becomes a shortcut which will move the focus to this tab.

If index is out of range, the tab is simply appended. Otherwise it is inserted at the specified position.

If the QTabWidget was empty before this function is called, the new page becomes the current page. Inserting a new tab at an index less than or equal to the current index will increment the current index, but keep the current page.

Note: If you call insertTab() after show(), the layout system will try to adjust to the changes in its widgets hierarchy and may cause flicker. To prevent this, you can set the QWidget::updatesEnabled property to false prior to changes; remember to set the property to true when the changes are done, making the widget receive paint events again.

See also addTab().

new bool QtGui.QTabWidget.IsTabEnabled ( int  index)

Returns true if the page at position index is enabled; otherwise returns false.

See also setTabEnabled() and QWidget::isEnabled().

override void QtGui.QTabWidget.OnChangeEvent ( QEvent  ev)
protected

Reimplemented from QWidget::changeEvent().

new void QtGui.QTabWidget.OnCurrentChanged ( int  index)
protected

This signal is emitted whenever the current page index changes. The parameter is the new current page index position, or -1 if there isn't a new one (for example, if there are no widgets in the QTabWidget)

See also currentWidget() and currentIndex.

override bool QtGui.QTabWidget.OnEvent ( QEvent  ev)
virtual

Reimplemented from QObject::event().

Reimplemented from QtCore.QObject.

override void QtGui.QTabWidget.OnKeyPressEvent ( QKeyEvent  e)
protected

Reimplemented from QWidget::keyPressEvent().

override void QtGui.QTabWidget.OnPaintEvent ( QPaintEvent event)
protectedvirtual

Reimplemented from QWidget::paintEvent().

Paints the tab widget's tab bar in response to the paint event.

Reimplemented from QtGui.QWidget.

override void QtGui.QTabWidget.OnResizeEvent ( QResizeEvent  e)
protected

Reimplemented from QWidget::resizeEvent().

override void QtGui.QTabWidget.OnShowEvent ( QShowEvent event)
protectedvirtual

Reimplemented from QWidget::showEvent().

Reimplemented from QtGui.QWidget.

new void QtGui.QTabWidget.OnTabCloseRequested ( int  index)
protected

This signal is emitted when the close button on a tab is clicked. The index is the index that should be removed.

This function was introduced in Qt 4.5.

See also setTabsClosable().

new void QtGui.QTabWidget.RemoveTab ( int  index)

Removes the tab at position index from this stack of widgets. The page widget itself is not deleted.

See also addTab() and insertTab().

new void QtGui.QTabWidget.SetCornerWidget ( QWidget  w,
Qt.Corner  corner = Qt.Corner.TopRightCorner 
)

Sets the given widget to be shown in the specified corner of the tab widget. The geometry of the widget is determined based on the widget's sizeHint() and the style().

Only the horizontal element of the corner will be used.

Passing 0 shows no widget in the corner.

Any previously set corner widget is hidden.

All widgets set here will be deleted by the tab widget when it is destroyed unless you separately reparent the widget after setting some other corner widget (or 0).

Note: Corner widgets are designed for North and South tab positions; other orientations are known to not work properly.

See also cornerWidget() and setTabPosition().

new void QtGui.QTabWidget.SetTabEnabled ( int  index,
bool  enable 
)

If enable is true, the page at position index is enabled; otherwise the page at position index is disabled. The page's tab is redrawn appropriately.

QTabWidget uses QWidget::setEnabled() internally, rather than keeping a separate flag.

Note that even a disabled tab/page may be visible. If the page is visible already, QTabWidget will not hide it; if all the pages are disabled, QTabWidget will show one of them.

See also isTabEnabled() and QWidget::setEnabled().

new void QtGui.QTabWidget.SetTabIcon ( int  index,
QIcon  icon 
)

This is an overloaded function.

Sets the icon for the tab at position index.

See also tabIcon().

new void QtGui.QTabWidget.SetTabText ( int  index,
string  label 
)

Defines a new label for the page at position index's tab.

If the provided text contains an ampersand character ('&'), a shortcut is automatically created for it. The character that follows the '&' will be used as the shortcut key. Any previous shortcut will be overwritten, or cleared if no shortcut is defined by the text. See the QShortcut documentation for details (to display an actual ampersand, use '&&').

See also tabText().

new void QtGui.QTabWidget.SetTabToolTip ( int  index,
string  tip 
)

Sets the tab tool tip for the page at position index to tip.

See also tabToolTip().

new void QtGui.QTabWidget.SetTabWhatsThis ( int  index,
string  text 
)

Sets the What's This help text for the page at position index to text.

This function was introduced in Qt 4.1.

See also tabWhatsThis().

new QIcon QtGui.QTabWidget.TabIcon ( int  index)

Returns the icon for the tab on the page at position index.

See also setTabIcon().

virtual void QtGui.QTabWidget.TabInserted ( int  index)
protectedvirtual

This virtual handler is called after a new tab was added or inserted at position index.

See also tabRemoved().

virtual void QtGui.QTabWidget.TabRemoved ( int  index)
protectedvirtual

This virtual handler is called after a tab was removed from position index.

See also tabInserted().

new string QtGui.QTabWidget.TabText ( int  index)

Returns the label text for the tab on the page at position index.

See also setTabText().

new string QtGui.QTabWidget.TabToolTip ( int  index)

Returns the tab tool tip for the page at position index or an empty string if no tool tip has been set.

See also setTabToolTip().

new string QtGui.QTabWidget.TabWhatsThis ( int  index)

Returns the What's This help text for the page at position index, or an empty string if no help text has been set.

This function was introduced in Qt 4.1.

See also setTabWhatsThis().

static string QtGui.QTabWidget.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QTabWidget.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QTabWidget.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QTabWidget.TrUtf8 ( string  s,
string  c,
int  n 
)
static
new QWidget QtGui.QTabWidget.Widget ( int  index)

Returns the tab page at index position index or 0 if the index is out of range.

Property Documentation

new int QtGui.QTabWidget.Count
get

This property holds the number of tabs in the tab bar.

By default, this property contains a value of 0.

Slot<System.Int32> QtGui.QTabWidget.CurrentChanged
addremove

This signal is emitted whenever the current page index changes. The parameter is the new current page index position, or -1 if there isn't a new one (for example, if there are no widgets in the QTabWidget)

See also currentWidget() and currentIndex.

Slot<QWidget> QtGui.QTabWidget.CurrentChangedQWidget
addremove
new int QtGui.QTabWidget.CurrentIndex
getset

This property holds the index position of the current tab page.

The current index is -1 if there is no current widget.

By default, this property contains a value of -1 because there are initially no tabs in the widget.

QWidget QtGui.QTabWidget.CurrentWidget
getset

Returns a pointer to the page currently being displayed by the tab dialog. The tab dialog does its best to make sure that this value is never 0 (but if you try hard enough, it can be).

Makes widget the current widget. The widget used must be a page in this tab widget.

new bool QtGui.QTabWidget.DocumentMode
getset

This property holds whether or not the tab widget is rendered in a mode suitable for document pages. This is the same as document mode on Mac OS X.

When this property is set the tab widget frame is not rendered. This mode is useful for showing document-type pages where the page covers most of the tab widget area.

This property was introduced in Qt 4.5.

new Qt.TextElideMode QtGui.QTabWidget.ElideMode
getset

This property holds how to elide text in the tab bar.

This property controls how items are elided when there is not enough space to show them for a given tab bar size.

By default the value is style dependant.

This property was introduced in Qt 4.2.

new IQTabWidgetSignals QtGui.QTabWidget.Emit
getprotected
new QSize QtGui.QTabWidget.IconSize
getset

This property holds the size for icons in the tab bar.

The default value is style-dependent. This is the maximum size that the icons will have. Icons are not scaled up if they are of smaller size.

This property was introduced in Qt 4.2.

override QSize QtGui.QTabWidget.MinimumSizeHint
get

Reimplemented from QWidget::minimumSizeHint().

Returns a suitable minimum size for the tab widget.

new bool QtGui.QTabWidget.Movable
getset

This property holds this property holds whether the user can move the tabs within the tabbar area.

By default, this property is false;

This property was introduced in Qt 4.5.

Slot<System.String> QtGui.QTabWidget.Selected
addremove

Reimplemented from QWidget::sizeHint().

new QMetaObject QtGui.QTabWidget.StaticMetaObject
staticget
QTabBar QtGui.QTabWidget.TabBar
getset

Returns the current QTabBar.

Replaces the dialog's QTabBar heading with the tab bar tb. Note that this must be called before any tabs have been added, or the behavior is undefined.

Slot<System.Int32> QtGui.QTabWidget.TabCloseRequested
addremove

This signal is emitted when the close button on a tab is clicked. The index is the index that should be removed.

This function was introduced in Qt 4.5.

See also setTabsClosable().

new TabPosition QtGui.QTabWidget.tabPosition
getset

This property holds the position of the tabs in this tab widget.

Possible values for this property are described by the TabPosition enum.

By default, this property is set to North.

new bool QtGui.QTabWidget.TabsClosable
getset

This property holds whether close buttons are automatically added to each tab.

This property was introduced in Qt 4.5.

new TabShape QtGui.QTabWidget.tabShape
getset

This property holds the shape of the tabs in this tab widget.

Possible values for this property are QTabWidget::Rounded (default) or QTabWidget::Triangular.

new bool QtGui.QTabWidget.UsesScrollButtons
getset

This property holds whether or not a tab bar should use buttons to scroll tabs when it has many tabs.

When there are too many tabs in a tab bar for its size, the tab bar can either choose to expand its size or to add buttons that allow you to scroll through the tabs.

By default the value is style dependant.

This property was introduced in Qt 4.2.