octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53276] GUI: undocked panes cannot be moved, o


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53276] GUI: undocked panes cannot be moved, or resized along upper border
Date: Thu, 8 Mar 2018 23:18:04 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #14, bug #53276 (project octave):

Actually, the simplest and most reliable solution would be to skip this part
of the octave_dock_widget:


    // remove parent and adjust the (un)dock icon
    setTitleBarWidget (0);
    setParent (0, Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint
|
               Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
    setTitleBarWidget (m_title_widget);
    setParent (0, Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint
|
               Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);


Instead, in the previous patch I illustrated that we can effectively mimic the
undocked QDockWidget without an actual "title bar", but instead using the
following:


    QWidget *newwidget = new QWidget (this);
    setStyleSheet (QString ("QDockWidget {border-style: none;}"));
    QVBoxLayout *vbox = new QVBoxLayout (newwidget);
    vbox->addWidget (m_title_widget);
    vbox->addWidget (widget ());
    vbox->setSpacing (0);
    vbox->setContentsMargins(1, 1, 1, 1);
    setWidget (newwidget);
    setParent (0, Qt::Window);
    m_title_widget->show ();


I basically transfered the QDockWidget's widget back into itself.  But we know
we can reliably build a generic window with the system Window-Manager title
bar, so why not transfer the QDockWidget's widget into a new window and not
worry about that title bar stuff?  After the transfer we could simply hide the
QDockWidget and then when the new window intends to redock, transfer the
widget back to the QDockWidget and show it once again.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53276>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]