Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, January 2007
[4.2.2] minimize widgets in qworkspace ?


Message 1 in thread

Hi Qtees,

I've got several MDI windows floating in my QWorkspace ... and the
following problem: "widget->showMinimized()" is ignored.

How can you minimize these widgets, so only the "bar" is visible? Note
that I don't them to relocate to the bottom of the main window.


tia,
r.

--------------------------------------------------------------------
  Rene Kaiser
  Institute of Information Systems & Information Management
  JOANNEUM RESEARCH Forschungsgesellschaft mbH
  Steyrergasse 17, A-8010 Graz, AUSTRIA

  phone:  +43-316-876-1173                   fax: +43-316-876-1191
  web:    http://www.joanneum.at/iis
  e-mail: mailto:rene.kaiser@xxxxxxxxxxx
-------------------------------------------------------------------- 

--
 [ signature omitted ] 

Message 2 in thread

More information:
 
I add the windows as following:
     addWindow(widget, Qt::Tool | Qt::WindowShadeButtonHint);

I can successfully get the state with:
	bool x = widget->isMinimized());



cheers,
r.


-----Ursprüngliche Nachricht-----
Von: Kaiser, Rene [mailto:Rene.Kaiser@xxxxxxxxxxx] 
Gesendet: Donnerstag, 11. Jänner 2007 16:21
An: qt-interest@xxxxxxxxxxxxx
Betreff: [4.2.2] minimize widgets in qworkspace ?


Hi Qtees,

I've got several MDI windows floating in my QWorkspace ... and the following problem: "widget->showMinimized()" is ignored.

How can you minimize these widgets, so only the "bar" is visible? Note that I don't them to relocate to the bottom of the main window.


tia,
r.

--------------------------------------------------------------------
  Rene Kaiser
  Institute of Information Systems & Information Management
  JOANNEUM RESEARCH Forschungsgesellschaft mbH
  Steyrergasse 17, A-8010 Graz, AUSTRIA

  phone:  +43-316-876-1173                   fax: +43-316-876-1191
  web:    http://www.joanneum.at/iis
  e-mail: mailto:rene.kaiser@xxxxxxxxxxx
-------------------------------------------------------------------- 

--
 [ signature omitted ] 

Message 3 in thread

Kaiser, Rene wrote:
> I've got several MDI windows floating in my QWorkspace ... and the
> following problem: "widget->showMinimized()" is ignored.
> How can you minimize these widgets, so only the "bar" is visible? Note
> that I don't them to relocate to the bottom of the main window.

Are you minimizing the subwindow, or the widget inside?

Have you tried parentWidget()->showMinimized()?

Andreas

-- 
 [ signature omitted ] 

Message 4 in thread

 
I'd like to minimize some of the "subwindows" inside the main window (for comprehension: when loading a "perspective").

parentWidget()->showMinimized() doesn't show any effects as well ...

I assume there's some mystery concerning that "ShadeButton" thing, but I have no clue what else I could try ...


thx,
r.


-----Ursprüngliche Nachricht-----
Von: Andreas Aardal Hanssen [mailto:ahanssen@xxxxxxxxxxxxx] 
Gesendet: Donnerstag, 11. Jänner 2007 16:32
An: qt-interest@xxxxxxxxxxxxx
Betreff: Re: [4.2.2] minimize widgets in qworkspace ?

Kaiser, Rene wrote:
> I've got several MDI windows floating in my QWorkspace ... and the 
> following problem: "widget->showMinimized()" is ignored.
> How can you minimize these widgets, so only the "bar" is visible? Note 
> that I don't them to relocate to the bottom of the main window.

Are you minimizing the subwindow, or the widget inside?

Have you tried parentWidget()->showMinimized()?

Andreas

--
 [ signature omitted ] 

Message 5 in thread

 
Indeed, ther is a little yet interesting effect: The icon next to the "X" (to close the window) indicates that the (sub-) window is minimized, however, it isn't. How I can I avoid this inconsistent state?

thx,
r.


-----Ursprüngliche Nachricht-----
Von: Kaiser, Rene [mailto:Rene.Kaiser@xxxxxxxxxxx] 
Gesendet: Donnerstag, 11. Jänner 2007 16:52
An: qt-interest@xxxxxxxxxxxxx
Betreff: AW: [4.2.2] minimize widgets in qworkspace ?

 
I'd like to minimize some of the "subwindows" inside the main window (for comprehension: when loading a "perspective").

parentWidget()->showMinimized() doesn't show any effects as well ...

I assume there's some mystery concerning that "ShadeButton" thing, but I have no clue what else I could try ...


thx,
r.


-----Ursprüngliche Nachricht-----
Von: Andreas Aardal Hanssen [mailto:ahanssen@xxxxxxxxxxxxx]
Gesendet: Donnerstag, 11. Jänner 2007 16:32
An: qt-interest@xxxxxxxxxxxxx
Betreff: Re: [4.2.2] minimize widgets in qworkspace ?

Kaiser, Rene wrote:
> I've got several MDI windows floating in my QWorkspace ... and the 
> following problem: "widget->showMinimized()" is ignored.
> How can you minimize these widgets, so only the "bar" is visible? Note 
> that I don't them to relocate to the bottom of the main window.

Are you minimizing the subwindow, or the widget inside?

Have you tried parentWidget()->showMinimized()?

Andreas

--
 [ signature omitted ] 

Message 6 in thread

Kaiser, Rene wrote:
> Indeed, ther is a little yet interesting effect: The icon next to the "X"
> (to close the window) indicates that the (sub-) window is minimized,
> however, it isn't. How I can I avoid this inconsistent state?

If you call showMinimized() on the window, not the widget inside, the window
should be minimized. If this doesn't happen, it's likely to be a bug.

Could you please send some code that shows the problem?

Andreas

-- 
 [ signature omitted ] 

Message 7 in thread

Andreas Aardal Hanssen wrote:
> Kaiser, Rene wrote:
>> Indeed, ther is a little yet interesting effect: The icon next to the "X"
>> (to close the window) indicates that the (sub-) window is minimized,
>> however, it isn't. How I can I avoid this inconsistent state?
> 
> If you call showMinimized() on the window, not the widget inside, the window
> should be minimized. If this doesn't happen, it's likely to be a bug.
> 
> Could you please send some code that shows the problem?
> 
> Andreas
> 

In absence of Rene, here's a code sample demonstrating the problem:

class MainWindow : public QMainWindow {
public:
  MainWindow(QWidget* parent = 0) : QMainWindow(parent) {
    QWorkspace* workspace = new QWorkspace(this);
    setCentralWidget(workspace);

    QLabel* label = new QLabel("See what I mean?");
    QWidget* mdi = workspace->addWindow(label, Qt::Tool |
Qt::WindowShadeButtonHint);

    addToolBar("MDI")->addAction("Minimize", mdi,
SLOT(showMinimized()));
  }
};


As described by Rene, programatically minimizing an MDI window with Tool
and WindowShadeButtonHint flags only toggls the shade button symbol, but
does not really minimize the window. And to make matters worse, the
symbol is only redrawn when I move the mouse over the window...

Please have a look. Is this a bug? (I begin to think so)

Thanks a lot.
M

--
 [ signature omitted ] 

Message 8 in thread

Martin wrote:
> Andreas Aardal Hanssen wrote:
>> Kaiser, Rene wrote:
>>> Indeed, ther is a little yet interesting effect: The icon next to the "X"
>>> (to close the window) indicates that the (sub-) window is minimized,
>>> however, it isn't. How I can I avoid this inconsistent state?
>> If you call showMinimized() on the window, not the widget inside, the window
>> should be minimized. If this doesn't happen, it's likely to be a bug.
>>
>> Could you please send some code that shows the problem?
>>
>> Andreas
>>
> 
> In absence of Rene, here's a code sample demonstrating the problem:
> 
> class MainWindow : public QMainWindow {
> public:
>   MainWindow(QWidget* parent = 0) : QMainWindow(parent) {
>     QWorkspace* workspace = new QWorkspace(this);
>     setCentralWidget(workspace);
> 
>     QLabel* label = new QLabel("See what I mean?");
>     QWidget* mdi = workspace->addWindow(label, Qt::Tool |
> Qt::WindowShadeButtonHint);
> 
>     addToolBar("MDI")->addAction("Minimize", mdi,
> SLOT(showMinimized()));
>   }
> };
> 
> 
> As described by Rene, programatically minimizing an MDI window with Tool
> and WindowShadeButtonHint flags only toggls the shade button symbol, but
> does not really minimize the window. And to make matters worse, the
> symbol is only redrawn when I move the mouse over the window...
> 
> Please have a look. Is this a bug? (I begin to think so)
> 
> Thanks a lot.
> M


I filed a bug report on the task tracker, issue number is #146659.

M

--
 [ signature omitted ]