IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

  1. #1
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut Ne pas afficher la présence de fenêtres dans la barre des tâches d'un gestionnaire de fenêtres
    Bonjour,

    Je n arrive pas à faire disparaitre la presence de nombreuses fenetres dans le taskbar du gestionnaire de fenetre.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    Q_DECL_EXPORT int main(int argc, char *argv[])
    {
     
        //QApplication::setGraphicsSystem("raster");  // Use "raster" for systems not supporting "openvg" or "opengl"
     
        QScopedPointer<QApplication> app(createApplication(argc, argv));
     
    SysTrayIcon execSystray;
    CPULoad execProcess;
    CPUInfo execCPUinfo;
    MemInfo execMem;
    SENSORStemp execTemp;
    HDDInfo execHdd;
    GetNetInfo execNet;
    MusicInfo execMusic;
    PROCESSInfo execProcessus;
    //execProcessus.start();
    //execProcessus.thread()->currentThreadId();
    //execProcessus.wait();
     
        QmlApplicationViewer viewerClock;
        viewerClock.setStyleSheet("background:transparent");   //remove background
        viewerClock.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerClock.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        viewerClock.rootContext()->setContextProperty("loadsystray", &execSystray);
        viewerClock.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        viewerClock.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/WidgetClock.qml"));
        viewerClock.move(0, 20);
        viewerClock.showExpanded();
     
        QmlApplicationViewer viewerCpu;
        viewerCpu.setStyleSheet("background:transparent");   //remove background
        viewerCpu.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerCpu.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        viewerCpu.rootContext()->setContextProperty("loadcpu", &execProcess);
        viewerCpu.rootContext()->setContextProperty("loadcpuinfo", &execCPUinfo);
        viewerCpu.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        viewerCpu.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/WidgetCpu.qml"));
        viewerCpu.move(0, 200);
        viewerCpu.show();
     
        QmlApplicationViewer viewerMem;
        viewerMem.setStyleSheet("background:transparent");   //remove background
        viewerMem.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerMem.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        viewerMem.rootContext()->setContextProperty("loadmem", &execMem);
        viewerMem.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        viewerMem.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/WidgetMem.qml"));
        viewerMem.move(0, 380);
        viewerMem.showExpanded();
     
        QmlApplicationViewer viewerHdd;
        viewerHdd.setStyleSheet("background:transparent");   //remove background
        viewerHdd.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerHdd.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        viewerHdd.rootContext()->setContextProperty("loadhdd", &execHdd);
        viewerHdd.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        viewerHdd.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/WidgetHdd.qml"));
        viewerHdd.move(0, 560);
        viewerHdd.showExpanded();
     
        QmlApplicationViewer viewerNet;
        viewerNet.setStyleSheet("background:transparent");   //remove background
        viewerNet.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerNet.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        viewerNet.rootContext()->setContextProperty("loadnet", &execNet);
        viewerNet.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        viewerNet.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/WidgetNet.qml"));
        viewerNet.move(0, 740);
        viewerNet.showExpanded();
     
        QmlApplicationViewer listTest;
        listTest.setStyleSheet("background:transparent");   //remove background
        listTest.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        listTest.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        listTest.rootContext()->setContextProperty("loadnet", &execNet);
        listTest.rootContext()->setContextProperty("loadtemp", &execTemp);
        listTest.rootContext()->setContextProperty("loadhdd", &execHdd);
        listTest.rootContext()->setContextProperty("loadcpuinfo", &execCPUinfo);
        listTest.rootContext()->setContextProperty("loadmusicinfo", &execMusic);
        listTest.rootContext()->setContextProperty("loadprocessus", &execProcessus);
        listTest.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        listTest.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/ViewDrag.qml"));
    //    viewerNetStat.move(20, 200);
        listTest.showExpanded();
     
        return app->exec();
    }
    Cela me cree de nombreuses petites fenetres indepandantes les une des autres, car je voulais pouvoir les positionner à ma guise sur le bureau.

    Par contre je voudrais les faires disparaitres du taskbar manager du system d' exploitation.

    Avec ceci j y arrive, mais ce n' est pas l' effet souhaité, je na sais plus les deplacer.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    listTest.setWindowFlags(Qt::X11BypassWindowManagerHint);
    ou
    listTest.setWindowFlags(Qt::SplashScreen);
    comment pourrais je m' y prendre pour n' afficher plus que 1 ou 2 maximum dans le taskbar du system d' exploitation?

    J' ai passé en revue Qt Namespace, mais je n' y arrive pas.

    Cordialement.

  2. #2
    Responsable 2D/3D/Jeux


    Avatar de LittleWhite
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mai 2008
    Messages
    26 896
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26 896
    Points : 219 544
    Points
    219 544
    Billets dans le blog
    125
    Par défaut
    Bonjour,

    C'est amusant, c'est ce que je cherchais récemment. La solution que j'ai trouvé, c'est de faire un QWidget dans le main, qui sera parent du QMainWindow. Le QWidget n’apparaîtra pas dans la barre des tâches mais affichera l'application.

    Il y a aussi une méthode (Windows only) en utilisant l'ID de la fenêtre et en faisant un appel aux fonctions natives. Mais j'aime moins, comme solution.

  3. #3
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut
    Merci de votre reponse.

    Je lis depuis hier soir et je suis tombé sur des sujets traitant de cela, sur stackoverflow, mais je ne m en sors pas vraiment, je n arrives pas à mettre en pratique.
    Pourriez vous me mettre sur les rails?

    Je prends un exemple:

    meminfo.h
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    class MemInfo : public QObject
    {
        Q_OBJECT
     
     
    public:
     
        explicit MemInfo();
    .
    .
    .
    Q_INVOKABLE quint64 installedMemory();
    .
    .
    .
    main.cpp
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    Q_DECL_EXPORT int main(int argc, char *argv[])
    {
        QScopedPointer<QApplication> app(createApplication(argc, argv));
     
    MemInfo execMem;
    .
    .
    .
        QmlApplicationViewer viewerMem;
     
        viewerMem.setStyleSheet("background:transparent");   //remove background
        viewerMem.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerMem.setWindowFlags(Qt::FramelessWindowHint);  //remove borders
        viewerMem.rootContext()->setContextProperty("loadmem", &execMem);
        viewerMem.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
        viewerMem.setMainQmlFile(QLatin1String("qml/conkycloneqml/content/WidgetMem.qml"));
        viewerMem.move(0, 380);
        viewerMem.showExpanded();
    }
    WidgetMem.qml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    .
    .
    .
        Timer {
            running: true
            repeat: true
            interval: 6000
            onTriggered: {
                currentMemTotal = loadmem.installedMemory();
        }
    .
    .
    .
            Text {
                id: textMemTotal
                x:93; y:125
                width: 48
                height: 16
                text: currentMemTotal
            }
    .
    .
    .
    j ai ce genre de shema pour chacunes des 6 fenetres, je ne sais pas vraiment si j' ai choisi la bonne approche, etant debutant c est la premiere fois que je fais une appli avec de multiples fenetres, independantes les unes des autres.

    Cordialement.

  4. #4
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut
    Bonjour,

    J' aurai aimé savoir avec quel window manager cette technique etait possible, car la vraiment je me plante lamantablement.

    Sous GNU/linux plus specialement unity et cinnamon j ai ce comportement.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
        QWidget widget;
     
        QMainWindow mainwindow(&widget);
        mainwindow.show();
    M' affiche bien une fenetre mais aussi une entrée dans le taskbar du window manager

    par contre si je fais
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     QWidget widget;
    .
    .
    .
        QmlApplicationViewer viewerMem(&widget);
    .
    .
    .
    viewerMem.show();
    je n' ai effectivement pas d' entree dans le taskbar, je n' ai rien qui s' affiche du tout en fait.

    J' ai lu qu' il y avait une librairie sous kde, pour gerer cela, mais à ma connaissance rien pour les autres window manager.

    http://qt-project.org/forums/viewthread/8902

    http://stackoverflow.com/questions/4...e-taskbar-item

    Cette technique n' est valable que sous Windows?

    Je pense que je m' y prends mal, si vous pouviez me mettre sur les rails j' en serais ravis.

  5. #5
    Responsable 2D/3D/Jeux


    Avatar de LittleWhite
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mai 2008
    Messages
    26 896
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26 896
    Points : 219 544
    Points
    219 544
    Billets dans le blog
    125
    Par défaut
    C'est window.show() qu'il faut faire. Car le widget contient le mainWindow et le mainWindow si on fait show() sur lui, il se place dans la taskbar.

  6. #6
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut
    Oui en effet, j ai mal choisis le nom.

    J ai voulu en avoir le coeur net, j ai porté l' appli sous windows 7

    Effectivement cela marche sous windows 7.

    Mais pas sous GNU/linux ( il affiche quand meme l entree dans le taskbar ).
    J' avais lu que la taskbar du window manager sous windows, n' affichait pas non plus les fenetres sans bordures, dans la taskbar, cela n' a pas l air d etre le cas sous Unity, cinnamon, et kde plasma et surement tous les autres window manager sous GNU/linux.

    Par contre je sais qu on peut, sous kde, via une lib de kwin, effacer l' entree des fenetres dans la taskbar du window manager.

    De plus, sous windows7, la techinque fonctionne pour QMainWindow , mais je n' y arrive pas pour QmlApplicationViewer.

    Je me demande comment je vais bien pouvoir m' en sortir et y parvenir sur les autres window manager...

  7. #7
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut
    J' ai un peu avancé dans mes recherches et j ai trouvé ceci:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    #include <X11/Xlib.h>
    #include <X11/Xatom.h>
    et des bouts de code du genre:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
       Display *dpy = QX11Info::display(); // Remove taskbar button. NOTE This is
        // what breaks Windows compatibility
        Atom net_wm_state_skip_taskbar=XInternAtom(dpy,
            "_NET_WM_STATE_SKIP_TASKBAR", False);
        Atom net_wm_state = XInternAtom(dpy, "_NET_WM_STATE", False);
        XChangeProperty(dpy, winId(), net_wm_state,
            XA_ATOM, 32, PropModeAppend,
            (unsigned char *)&net_wm_state_skip_taskbar, 1);
    Par contre je patauge royalement...
    J' ai du mal à trouver des informations didactiques sur:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Atom net_wm_state_skip_taskbar

  8. #8
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut
    Bon j' ai joué avec les window flags pour parvenir +- à quelque chose.
    Les window manager ne reagissent evidement pas de la meme facon aux flags.

    J' ai pu m' en appercevoir grace à la petite demo bien pratique de windowflags.pro fournie avec.

    J' ai du tester sur chaques window manager que j avais sous la main, cad KDE, cinnamon, unity,lxde.

    Cela fait tellement "bricolage" de jouer sur les window flag dans Qt... (what a mess)

    Dans
    #include <gtk/gtk.h>
    il existe
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    void        gtk_window_set_skip_taskbar_hint
                                                (GtkWindow *window,
                                                 gboolean setting);
    http://www.gtk.org/api/2.6/gtk/GtkWi...p-taskbar-hint

    Existerait - il quelque chose de similaire qui faciliterait la vie sous Qt?

    actuellement mon code ressemble à une grosse bidouille.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
     
    Q_DECL_EXPORT int main(int argc, char *argv[])
    {
        QScopedPointer<QApplication> app(createApplication(argc, argv));
     
    QWidget mainWidget;
    mainWidget.setStyleSheet("background:transparent");
    //mainWidget.setAttribute(Qt::WA_TranslucentBackground); //background transparant
    mainWidget.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    mainWidget.resize(1,1);
    mainWidget.move(0,0);
    mainWidget.show();
    //mainWidget.hide();
     
     
    QWidget mainWidget1;
    mainWidget1.setStyleSheet("background:transparent");
    //mainWidget.setAttribute(Qt::WA_TranslucentBackground); //background transparant
    mainWidget1.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    mainWidget1.resize(1,1);
    mainWidget1.move(0,0);
    mainWidget1.show();
     
     
     
     
    QmlApplicationViewer viewerClock(&mainWidget);
        viewerClock.setStyleSheet("background:transparent");   //remove background
        viewerClock.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerClock.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
        viewerClock.show();
     
     
     
        QmlApplicationViewer viewerCpu(&mainWidget);
        viewerCpu.setStyleSheet("background:transparent");   //remove background
        viewerCpu.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerCpu.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
        viewerCpu.show();
     
     
        QmlApplicationViewer viewerMem(&mainWidget);
        viewerMem.setStyleSheet("background:transparent");   //remove background
        viewerMem.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerMem.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
        viewerMem.show();
     
     
        QmlApplicationViewer viewerHdd(&mainWidget);
        viewerHdd.setStyleSheet("background:transparent");   //remove background
        viewerHdd.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerHdd.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
        viewerHdd.show();
     
     
        QmlApplicationViewer viewerNet(&mainWidget);
        viewerNet.setStyleSheet("background:transparent");   //remove background
        viewerNet.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerNet.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint);
        viewerNet.show();
     
     
     
        QmlApplicationViewer listTest(&mainWidget1);
        listTest.setStyleSheet("background:transparent");   //remove background
        listTest.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        listTest.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);  //remove borders
        listTest.show();
    Cela n affiche plus que 2 fenetres sous Unity,Cinnamon,KDE
    Par contre LXDE m' envoit sur les roses et m affiche 8 fenetres.

    Sous lxde un seul flag va bien:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    (all).setWindowFlags(Qt::SplashScreen);
    directement, sans devoir passer par des Qwidget.
    On sait faire un alt+mouse1 et deplacer chaque QmlApplicationViewer
    De plus, il n' y a plus aucunes entrées dans le taskbar, ce que je cherche à faire evidement.

    Mais sur KDE il me les placent tous au centre de l' ecran, ignorant completement
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    (all).move(x, 20);
    Sous Unity il ne les ignores pas mais par contre il desactive alt+mouse1

    Si non sous unity, je peux faire ceci et cela fonctionne, je n ai plus d entrées dans le taskbar:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    QWidget mainWidget;
    mainWidget.setStyleSheet("background:transparent");
    //mainWidget.setAttribute(Qt::WA_TranslucentBackground); //background transparant
    mainWidget.setWindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint);
    mainWidget.resize(1,1);
    mainWidget.move(0,0);
    mainWidget.show();
    //mainWidget.hide();
    
    
    QWidget mainWidget1;
    mainWidget1.setStyleSheet("background:transparent");
    //mainWidget.setAttribute(Qt::WA_TranslucentBackground); //background transparant
    mainWidget1.setWindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint);
    mainWidget1.resize(1,1);
    mainWidget1.move(0,0);
    mainWidget1.show();
    Mais LXDE, KDE, Cinnamon m' envoient sur les roses ( ils affichent tous les QmlApplicationViewer).


    Mais tout ceci me semble vraiment horrible, de toute facon je n' arrive pas à faire un skiptaskbar total sans employer le Qt::SplashScreen, car les window managers reagissent +- tous differement au window flags.

    la bonne methode serait elle d' ecrire en C un fonction skiptaskbar vers X11 ?
    avec:

    #if define__cplusplus
    extern "C" {

    }

    et l' importer dans le projet Qt?
    Edit: je vais etudier plutot ceci : http://bazaar.launchpad.net/~compiz-...les/head:/src/


    Ca me semble tellement rebarbatif tout cela, juste pour faire un skiptaskbar sur 6 fenetres qui devraient etre dans l' ideal, independentes les unes des autres.

    Si vous avez des retours d' experience sur ce satané skiptaskbar sous GNU/linux je serais ravis si vous les partagiez.


    Compiz integre un "skiptaskbar" sur les applications que l' utilisateur desire, via le plugin "Window Rules"
    kstart --skiptaskbar <application> le fait aussi


    L' ideal serait d' avoir quelquechose de plus pratique et plus direct que de jouer sur les window flags.

    Mais je ne vois pas trop comment faire.

    Si vous aviez des pistes à fournir, ou des retours d' experience, j' en serais ravi.

    Cordialement

    PS: cela sera peut etre plus parlant par une petite video, l' ideal serait d' en faire une pour chaque WM se comporant differement avec les flags.

    http://178.32.44.120/videos/clone.webm

    Dans le meilleur des mondes je voudrais juste avoir 6 fenetres et 6 skiptaskbar via x11 sans passer par le WM ni jouer avec des QWidget parent/enfants

  9. #9
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juillet 2012
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2012
    Messages : 24
    Points : 16
    Points
    16
    Par défaut
    Bonjour,

    Petit à petit j' arrive à avoir quelque chose +- se rapprochant de ce que je cherche à faire

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
     
    QmlApplicationViewer viewerClock;
        viewerClock.setStyleSheet("background:transparent");   //remove background
        viewerClock.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerClock.setAttribute(Qt::WA_X11NetWmWindowTypeDock);  //_NET_WM_WINDOW_TYPE_DOCK, ATOM au premier plan
        viewerClock.setWindowFlags(Qt::WindowStaysOnBottomHint); //remet en arriere plan
        viewerClock.move(x, 20);
        viewerClock.show();
     
     
     
        QmlApplicationViewer viewerCpu;
        viewerCpu.setStyleSheet("background:transparent");   //remove background
        viewerCpu.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerCpu.setAttribute(Qt::WA_X11NetWmWindowTypeDock); //_NET_WM_WINDOW_TYPE_DOCK, ATOM
        viewerCpu.setWindowFlags(Qt::WindowStaysOnBottomHint);
        viewerCpu.move(x, 200);
        viewerCpu.show();
     
     
        QmlApplicationViewer viewerMem;
        viewerMem.setStyleSheet("background:transparent");   //remove background
        viewerMem.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerMem.setAttribute(Qt::WA_X11NetWmWindowTypeDock); //_NET_WM_WINDOW_TYPE_DOCK, ATOM
        viewerMem.setWindowFlags(Qt::WindowStaysOnBottomHint);
        viewerMem.move(x, 380);
        viewerMem.show();
     
     
        QmlApplicationViewer viewerHdd;
        viewerHdd.setStyleSheet("background:transparent");   //remove background
        viewerHdd.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerHdd.setAttribute(Qt::WA_X11NetWmWindowTypeDock); //_NET_WM_WINDOW_TYPE_DOCK, ATOM
        viewerHdd.setWindowFlags(Qt::WindowStaysOnBottomHint);
        viewerHdd.move(x, 560);
        viewerHdd.show();
     
     
        QmlApplicationViewer viewerNet;
        viewerNet.setStyleSheet("background:transparent");   //remove background
        viewerNet.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        viewerNet.setAttribute(Qt::WA_X11NetWmWindowTypeDock); //_NET_WM_WINDOW_TYPE_DOCK, ATOM
        viewerNet.setWindowFlags(Qt::WindowStaysOnBottomHint);
        if (y <= 768)
        viewerNet.move(x-180, y-20);
        else
            viewerNet.move(x, 740);
        viewerNet.show();
     
     
     
        QmlApplicationViewer listTest(&viewerClock);
        listTest.setStyleSheet("background:transparent");   //remove background
        listTest.setAttribute(Qt::WA_TranslucentBackground); //background transparant
        listTest.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);  //remove borders
        listTest.move(x-320, 0);
        listTest.show();
    Sous Unity:
    Plus aucune entree dans le taskbar

    Sous KDE:
    entrée dans le taskbar de "QmlApplicationViewer listTest"

    Sous Cinnamon:
    entrée dans le taskbar de "QmlApplicationViewer listTest"

    Sous LXDE:
    entrée dans le taskbar de "QmlApplicationViewer listTest"

    Autre chose assé "marrant" (je ris jaune),

    Sous Unity:
    Les 5 1er widgets sont en arriere plan, si une fenetre les recouvre partiellement, on peut clicker sur les widgets mais ils restent en arriere plan, par contre si je click sur
    QmlApplicationViewer listTest(&viewerClock);
    il revient en 1er plan, ainsi que viewerClock, et à partir de la je peux individuelllement ramener chaques widgets en 1er plan

    Sous KDE:
    Les 5 1er widgets peuvent passer directement de l' arriere plan au 1er plan, individuellement
    Si je click sur
    QmlApplicationViewer listTest(&viewerClock);
    il revient en 1er plan, ainsi que viewerClock

    Sous Cinnamon:
    Quoi qu il arrive, les 5 1er widgets restent tjrs en arriere plan.

    Sous LXDE:
    Idem que KDE sauf que viewerClock ne revient pas au 1er plan si je ramene
    "QmlApplicationViewer listTest(&viewerClock);" au 1er plan

    Tous sauf Unity:
    Désactivation de alt+mouse1 pour deplacer les 5 1er widgets.

    http://standards.freedesktop.org/wm-...tml#idp6304176

    Qt embarque
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
     
    _NET_WM_WINDOW_TYPE_DESKTOP, ATOM
    _NET_WM_WINDOW_TYPE_DOCK, ATOM
    _NET_WM_WINDOW_TYPE_TOOLBAR, ATOM
    _NET_WM_WINDOW_TYPE_MENU, ATOM
    _NET_WM_WINDOW_TYPE_UTILITY, ATOM
    _NET_WM_WINDOW_TYPE_SPLASH, ATOM
    _NET_WM_WINDOW_TYPE_DIALOG, ATOM
    _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, ATOM
    _NET_WM_WINDOW_TYPE_POPUP_MENU, ATOM
    _NET_WM_WINDOW_TYPE_TOOLTIP, ATOM
    _NET_WM_WINDOW_TYPE_NOTIFICATION, ATOM
    _NET_WM_WINDOW_TYPE_COMBO, ATOM
    _NET_WM_WINDOW_TYPE_DND, ATOM
    _NET_WM_WINDOW_TYPE_NORMAL, ATOM
    par contre je n' ai pas trouvé ou pas compris ou se trouvait dans Qt les fameux:
    _NET_WM_STATE_SKIP_TASKBAR, ATOM
    _NET_WM_STATE_SKIP_PAGER, ATOM

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    _NET_WM_STATE_MODAL, ATOM
    _NET_WM_STATE_STICKY, ATOM
    _NET_WM_STATE_MAXIMIZED_VERT, ATOM
    _NET_WM_STATE_MAXIMIZED_HORZ, ATOM
    _NET_WM_STATE_SHADED, ATOM
    _NET_WM_STATE_SKIP_TASKBAR, ATOM
    _NET_WM_STATE_SKIP_PAGER, ATOM
    _NET_WM_STATE_HIDDEN, ATOM
    _NET_WM_STATE_FULLSCREEN, ATOM
    _NET_WM_STATE_ABOVE, ATOM
    _NET_WM_STATE_BELOW, ATOM
    _NET_WM_STATE_DEMANDS_ATTENTION, ATOM
    _NET_WM_STATE_FOCUSED, ATOM
    Cela serait dommage de ne pas pouvoir les utiliser aussi facilement que le reste.

    Il y a surement un truc qui m echappe.

Discussions similaires

  1. Nom groupe de fenêtres dans la barre des tâches
    Par MortDansLAme dans le forum Général Java
    Réponses: 1
    Dernier message: 23/09/2011, 15h26
  2. Réduire une fenêtre dans la barre des tâches
    Par Invité dans le forum PyQt
    Réponses: 7
    Dernier message: 10/06/2009, 04h53
  3. Réponses: 5
    Dernier message: 12/03/2008, 09h55
  4. Impromptu multi fenêtre dans la barre des tâches
    Par JYRJLC dans le forum Cognos
    Réponses: 3
    Dernier message: 07/01/2008, 11h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo