简体   繁体   中英

How to minimize window with x11 c++?

I have QQuickWindow * _mainWindow and in OS Windows I just write

::ShowWindow(reinterpret_cast<HWND>(_mainWindow->winId()), SW_MINIMIZE);

and it's works, But I do not know how it make in OS linux, I googled about x11 library. but don't understand how use it. Please help.

I try minimize application window because in QML until Windows & Linux Qt has bugs and does not fixed.

showMinimize in Qt does not work correctly

#include <X11/Xlib.h>
#include <QX11Info> // from qt q11extras

// function for minimze your app
XIconifyWindow(QX11Info::display(), _mainWindow->winId(), QX11Info::appScreen());   

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM