PDA

View Full Version : Making QgraphisProxyWidget resizable on MAC.



kaushal_gaurav
17th April 2009, 12:40
Hi,

I am enclosing my wodget in QGraphicsProxyWidget using the addWidget funtion.


m_myDialog = new IncludeChannels(0, windowFlags);
m_myDialogProxy = scene->addWidget(m_myDialog, windowFlags());


but the dilaog that i am getting is not resizable. It just have a close button. I need to have minimize and maximse buttons as well.

I have also tried to explore QtAssistant but could not find any help...

I need the resize triangle on MAC.

Please help

Regards,
GK

jpn
17th April 2009, 14:54
I don't know about the buttons, but it should be resizable by default. Does IncludeChannels reimplement any mouse event handlers?

kaushal_gaurav
20th April 2009, 04:50
No include channels do not handle any mouse events..
There is no resizing handle present at the bottom right cornor of the dialog.

jpn
20th April 2009, 09:54
I guess I haven't seen any resize handles in QGraphicsWidget windows either. But you're supposed to be able to resize the window when you move the mouse close enough to the edge of the window:


// main.cpp
#include <QtGui>

int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QGraphicsScene scene;
QGraphicsWidget* widget = new QGraphicsWidget(0, Qt::Window);
widget->resize(320, 200);
scene.addItem(widget);
QGraphicsView view(&scene);
view.resize(640, 400);
view.show();
return app.exec();
}

kaushal_gaurav
20th April 2009, 10:17
But that resizing is only possible for top and left sides of dialog.
Is there any way by which i can show the resize handle....
Even some native MAC Api ?

jpn
20th April 2009, 11:04
There's nothing MAC specific inside the graphics view. They are not native MAC windows but plain graphics items after all.