コード例 #1
0
        public LightboxContainerWidget(QWidget parent) : base(parent)
        {
            m_LightboxWidget            = new QWidget(this);
            m_LightboxWidget.ObjectName = "lightboxWidget";
            new QVBoxLayout(m_LightboxWidget);
            base.AddWidget(m_LightboxWidget);

            ((QStackedLayout)base.Layout()).stackingMode = QStackedLayout.StackingMode.StackAll;
            m_LightboxWidget.Hide();
        }
コード例 #2
0
        public void HideLightbox()
        {
            if (m_LightboxChild == null)
            {
                throw new InvalidOperationException("Lightbox is already hidden");
            }

            var layout = (QBoxLayout)m_LightboxWidget.Layout();

            layout.RemoveWidget(m_LightboxChild);

            m_LightboxChild.SetParent(null);
            m_LightboxChild.Dispose();
            m_LightboxChild = null;

            base.Widget(1).Enabled = true;

            m_LightboxWidget.Hide();
            base.CurrentIndex = 1;
        }