Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide PyQt app from taskbar

I'm a beginner in PyQt. I was trying to create a simple app to try some of the toolkit's many features. My question is, how can I hide the app icon from the taskbar? I don't want the user to be able to see the icon in taskbar and to minimize it using this icon. Is there any window flags that I can use to achieve this?

like image 570
eternalthinker Avatar asked Oct 28 '10 16:10

eternalthinker


People also ask

How to hide and show existing toolbars in PyQt?

If you right-click a toolbar, then PyQt will show a context menu that will allow you to hide and show existing toolbars according to your needs. So far, you have three toolbars on your application’s window.

How to hide a window from the taskbar?

Specific windows can be hidden from the taskbar using wmctrl. This could for example be done in a wrapper startup script. The better way is to set the window state from within the code of the application where the window is created. For python, it would come down to a statement such as window.set_property ("skip-taskbar-hint", True) for GTK.

How to hide the app from the task bar using qwidget?

In this article we will see how to hide the app from the task bar, in order to do so we will use setWindowFlag () method and pass which belongs to the QWidget class. Argument : It takes Window type as argument. Action performed : It hides the app from the task bar.

Can I use icons in a PyQt menu bar?

Using icons in a menu bar isn’t a common practice, but PyQt allows you to do it anyway. PyQt actions are objects that represent a given command, operation, or action in an application. They’re useful when you need to provide the same functionality for different GUI components such as menu options, toolbar buttons, and keyboard shortcuts.


1 Answers

This should do the trick:

myApp.setWindowFlags(QtCore.Qt.Tool)
like image 96
ccpizza Avatar answered Sep 22 '22 07:09

ccpizza