hi All,
i am trying to minimize application on the click of a button.The same code works perfactly in windows but does not work in linux .What i need to do ?
hi All,
i am trying to minimize application on the click of a button.The same code works perfactly in windows but does not work in linux .What i need to do ?
How does the non-working code look?
hi,
I have created a frameless QWidget ,then i create a pushbutton and on its clicked signal i called the slot showMinimized() but my frameless widget is not minimizing.
here is the code
this code runs perfectly in windows but does nt work in linux...Why??Qt Code:
{ setWindowFlags(Qt::FramelessWindowHint); button->setGeometry(10,10,20,20); connect(button,SIGNAL(clicked()),this,SLOT(showMinimized())); }To copy to clipboard, switch view to plain text mode
Is there any other way to minimize frameless QWidget in linux.
Actually, looking at the docs for the showMinimized function, they do say that this only works on Windows. I suspect that this is because the windows manager is responsible for more tasks, and not as standardized, in an X11 environment than a Windows environment.
I would try the setWindowState function and see if that does the trick...
From Qt Documents you can read
Qt::FramelessWindowHint Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this.void QWidget::showMinimized () [slot]
Shows the widget minimized, as an icon.
Calling this function only affects windows.Verify the value of Qt::Window flag in X11bool QWidget::isWindow () const
Returns true if the widget is an independent window, otherwise returns false.
A window is a widget that isn't visually the child of any other widget and that usually has a frame and a window title.
A window can have a parent widget. It will then be grouped with its parent and deleted when the parent is deleted, minimized when the parent is minimized etc. If supported by the window manager, it will also have a common taskbar entry with its parent.
QDialog and QMainWindow widgets are by default windows, even if a parent widget is specified in the constructor. This behavior is specified by the Qt::Window flag.
A camel can go 14 days without drink,
I can't!!!
Bookmarks