Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How to hide running app icon from gnome panel

    General and Desktop
    linux ubuntu qml pyqt5 gnome
    1
    1
    339
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Newtron last edited by

      I am working on a widget manager like conky in gnome. I want to hide my application icon from running apps or from here

      alt text

      My QML file is this

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.12
      
      Window {
          id:window
          visible: true
          width: 500
          flags: Qt.AlignLeft
          height: 375
          color: "transparent"
          title: qsTr("Nidgets")
          Timer{
              interval:100
              running: true
              repeat: true
              onTriggered: {
                  time.text = Qt.formatDateTime(new Date(), "hh:mm A")
                  date.text = Qt.formatDateTime(new Date(), "yyyy MMMM dd")
              }
          }
      
          Item {
              id: element1
              x: 0
              y: 0
              width: 200
              anchors.fill: parent
              height: 200
              focus: true
              Keys.onPressed: {
                  if ((event.key === Qt.Key_F11) && (event.modifiers & Qt.ControlModifier)){
                      if(window.flags == Qt.FramelessWindowHint)
                          window.flags = 0
                      else
                          window.flags = Qt.FramelessWindowHint
                  }
              }
      
              Text {
                  id: date
                  x: 310
                  y: 205
                  color: "#ffffff"
                  text: Qt.formatDateTime(new Date(), "yyyy MMMM dd")
                  font.pixelSize: 24
              }
      
              Text {
                  id: time
                  x: 74
                  y: 86
                  color: "#ffffff"
                  anchors.centerIn: parent
                  text: Qt.formatDateTime(new Date(), "hh:mm A")
                  anchors.verticalCenterOffset: -45
                  anchors.horizontalCenterOffset: 35
                  font.pointSize: 75
      
              }
      
      
          }
      }
      

      and here is the python file

      import sys
      from PyQt5.QtCore import QObject, QUrl
      from PyQt5.QtWidgets import QApplication
      from PyQt5.QtQuick import QQuickView
      from PyQt5.QtQml import QQmlApplicationEngine
      from threading import Thread
      import os
      import importlib
      
      if __name__ == '__main__':
          myApp = QApplication(sys.argv)
      
          engine = QQmlApplicationEngine()
          context = engine.rootContext()
          context.setContextProperty("main", engine)
      
          engine.load('main.qml')
      
          win = engine.rootObjects()[0]
          win.show()
      
          sys.exit(myApp.exec_())
      
      

      thanks

      1 Reply Last reply Reply Quote 0
      • First post
        Last post