Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to hide running app icon from gnome panel
Forum Updated to NodeBB v4.3 + New Features

How to hide running app icon from gnome panel

Scheduled Pinned Locked Moved Unsolved General and Desktop
linuxubuntuqmlpyqt5gnome
1 Posts 1 Posters 560 Views
  • 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 Offline
    N Offline
    Newtron
    wrote on 5 Jan 2020, 17:48 last edited by
    #1

    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
    0

    1/1

    5 Jan 2020, 17:48

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved