Results 1 to 17 of 17

Thread: Problem about staying on taskbar

  1. #1
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Problem about staying on taskbar

    How can I make an Application whose interface is a dialog appear in the taskbar under Linux, for example Fedora 6?

    1. If just only writing codes, how to implement it?
    2. And if using Qt Designer, how to implement it then?

  2. #2
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Problem about staying on taskbar

    That is specific to the window manager. If you're talking about KDE, check the KDE api. I think you want the KPanelApplet class.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  3. #3
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Problem about staying on taskbar

    But I think this has nothing to do with "specific" platform, in Fedora 6:

    1. when I use Qt4 write the program with QMainWindow and after I start up the program , I can find it on taskbar;

    2. But If I write such a program with QDialog as its main interface, then as I run it, it seems nomral except that it can't stay on task bar. So, why? Can anybody have idea?

  4. #4
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Problem about staying on taskbar

    Oh. I misunderstood you. I thought you wanted to make a taskbar applet.

    So you're just talking about a windows taskbar entry. Actually, in my Linux Gentoo / KDE installation, a QDialog does show up in the taskbar.

    Qt Code:
    1. #include <QApplication>
    2. #include <QDialog>
    3.  
    4. int main(int argc, char *argv[]) {
    5. QApplication app(argc, argv);
    6. QDialog window;
    7. window.show();
    8. return app.exec();
    9. }
    To copy to clipboard, switch view to plain text mode 

    The only thing I can think of is that you might have to play a bit with the QWidget windowFlags.

    Which window manager are you using, anyway?
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  5. #5
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Problem about staying on taskbar

    Quote Originally Posted by Michiel View Post
    The only thing I can think of is that you might have to play a bit with the QWidget windowFlags.

    Which window manager are you using, anyway?
    I am using gnome as my window manager, I regret I made the decision cause I installed and used Linux 8 months ago for the FIRST time, I had no experience about Linux before. I just think Fedora not bad, gnome is not good, many people tell me KDE is the best, but I didn't hear them and selected the DEFAULT gnome. I will install Fedora 8 by the end of year and choose KDE as my desktop.

    I'm not familiar with that "QWidget windowFlags", could you please give me small code snippet? Thanks ahead

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    Use this in the constructor of the dialog:
    Qt Code:
    1. setWindowFlags( Qt::Dialog );
    To copy to clipboard, switch view to plain text mode 

    Also, have you tried running the Window Flags example? It is in the Widgets section, in qt demos. Just switch the flags and see for which one you get an entry in the task bar.

    Regards

  7. The following user says thank you to marcel for this useful post:

    adorp (24th July 2007)

  8. #7
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    Quote Originally Posted by adorp View Post
    I am using gnome as my window manager, I regret I made the decision cause I installed and used Linux 8 months ago for the FIRST time, I had no experience about Linux before. I just think Fedora not bad, gnome is not good, many people tell me KDE is the best, but I didn't hear them and selected the DEFAULT gnome. I will install Fedora 8 by the end of year and choose KDE as my desktop.
    And what about using yum (or pirut) to install KDE packages? Is that SOOO hard to open up a package manager, select a package group, click on a button and go drinking something while your new desktop is being installed?

    Contrary to Windows, the installation process is not something that freeze your system under Linux... Everything can be changed provided you have a broadband connection (or a medium full of packages...) and enough common sense to get a package manager doing what you want
    Current Qt projects : QCodeEdit, RotiDeCode

  9. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    I say to forget about Fedora( it sucks actually ), and if you want something fast, robust and scalable just install Slackware. It's the best.

    Or, if you want something more automated, get a SuSE dist.

    Regards

  10. #9
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    [hijack=on]
    Quote Originally Posted by marcel View Post
    I say to forget about Fedora( it sucks actually ), and if you want something fast, robust and scalable just install Slackware. It's the best.
    It depends... I used to use Fedora because it was the only distro that managed to get every piece of hardware working on my 6 years old box (HP printer, Nvidia GF2MX, Wifi card with only ndiswrapper working, ...). However I finally found Frugalware (which is ,or used to be, based on Slackware) and I'm quite happy with it

    Quote Originally Posted by marcel View Post
    Or, if you want something more automated, get a SuSE dist.
    Suse is heavy and the default GUI themes are crappy... I've tested about 20 distros in a year and, apart from the two mentioned above only Pardus and Mepis someway satisfied me (but not enough to keep them obviously... )
    [/hijack]
    Current Qt projects : QCodeEdit, RotiDeCode

  11. #10
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    Quote Originally Posted by fullmetalcoder View Post
    [hijack=on]

    It depends... I used to use Fedora because it was the only distro that managed to get every piece of hardware working on my 6 years old box (HP printer, Nvidia GF2MX, Wifi card with only ndiswrapper working, ...). However I finally found Frugalware (which is ,or used to be, based on Slackware) and I'm quite happy with it
    Nowadays mostly all hardware is supported and works very well, especially if you use vendor drivers.

    Suse is heavy and the default GUI themes are crappy... I've tested about 20 distros in a year and, apart from the two mentioned above only Pardus and Mepis someway satisfied me (but not enough to keep them obviously... )
    [/hijack]
    You can always drop the themes and use a default KDE installation.
    Anyway, I don't really like updaters. It is better to compile almost everything locally.

    Regards

  12. #11
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    Quote Originally Posted by fullmetalcoder View Post
    [hijack=on]

    It depends... I used to use Fedora because it was the only distro that managed to get every piece of hardware working on my 6 years old box (HP printer, Nvidia GF2MX, Wifi card with only ndiswrapper working, ...). However I finally found Frugalware (which is ,or used to be, based on Slackware) and I'm quite happy with it
    Nowadays mostly all hardware is supported and works very well, especially if you use vendor drivers.

    Suse is heavy and the default GUI themes are crappy... I've tested about 20 distros in a year and, apart from the two mentioned above only Pardus and Mepis someway satisfied me (but not enough to keep them obviously... )
    [/hijack]
    You can always drop the themes(and even the whole package) and use a default KDE installation. It's better to compile almost everything locally.

    Regards

  13. #12
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    [hijack=on]
    Quote Originally Posted by marcel View Post
    Anyway, I don't really like updaters. It is better to compile almost everything locally.
    Gimme your PC!!! No really... one can afford the niceties offered by a source-only distro if and only if he has an extremely powerful PC. I once tried to install Gentoo and went mad compiling a whole KDE desktop, and then firefox. I just managed to log graphically (after days of compilation ) to find out that I needed even more compilation to have an usable system so I just dropped it.
    [/hijack]
    Current Qt projects : QCodeEdit, RotiDeCode

  14. #13
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    It's not much of a PC, really...
    Compiling Qt 4.3 takes about 2 hours and KDE takes about 3-4 hours( never had the patience to stay in front of it ).

    I never tried compiling Firefox though. .


    once tried to install Gentoo and went mad compiling a whole KDE desktop, and then firefox. I just managed to log graphically (after days of compilation)
    What computer do you have? A 486(DX ) or something?
    Never took that long to get KDE up and running.

    Regards

  15. #14
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    Quote Originally Posted by marcel View Post
    What computer do you have? A 486(DX ) or something?
    Never took that long to get KDE up and running.
    Athlon 1.4Ghz with 512Mb SDRAM and 40Gb HDD (no SATA)
    two power supply block died already trying to keep this old beast alive...

    [keep dreaming]Hopefully I'll win a brand new Macbook thanks to QtCentre contest [/keep dreaming]
    Current Qt projects : QCodeEdit, RotiDeCode

  16. #15
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    Athlon 1.4Ghz with 512Mb SDRAM and 40Gb HDD (no SATA)
    two power supply block died already trying to keep this old beast alive...
    I think that small memory is causing the long compile times.
    The processor is good enough.

    Qt Code:
    1. [keep dreaming]Hopefully I'll win a brand new Macbook thanks to QtCentre contest :D[/keep dreaming]
    To copy to clipboard, switch view to plain text mode 
    Your IDE is one of the most complex/useful applications in there.
    You could win.

    Regards

  17. #16
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Problem about staying on taskbar

    Quote Originally Posted by marcel View Post
    Use this in the constructor of the dialog:
    Qt Code:
    1. setWindowFlags( Qt::Dialog );
    To copy to clipboard, switch view to plain text mode 

    Also, have you tried running the Window Flags example? It is in the Widgets section, in qt demos. Just switch the flags and see for which one you get an entry in the task bar.

    Regards
    That still fails, but if we change Qt:ialog to Qt::Window, look, it works! Thanks anyway, and I found that example which although can't help solve the problem, but it is heuristic after all
    Last edited by adorp; 24th July 2007 at 21:50. Reason: spelling error

  18. #17
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem about staying on taskbar

    That is not normal. At least in KDE, Windows and Mac a QDialog has a taskbar/dock button/icon.

    Regards

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.