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?
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?
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
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?
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:
#include <QApplication> #include <QDialog> int main(int argc, char *argv[]) { QDialog window; window.show(); return app.exec(); }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
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
Use this in the constructor of the dialog:
Qt Code:
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
adorp (24th July 2007)
Last edited by adorp; 24th July 2007 at 21:50. Reason: spelling error
That is not normal. At least in KDE, Windows and Mac a QDialog has a taskbar/dock button/icon.
Regards
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
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
[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
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
Nowadays mostly all hardware is supported and works very well, especially if you use vendor drivers.
You can always drop the themes and use a default KDE installation.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]
Anyway, I don't really like updaters. It is better to compile almost everything locally.
Regards
[hijack=on]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
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. .
What computer do you have? A 486(DX ) or something?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)
Never took that long to get KDE up and running.
Regards
Nowadays mostly all hardware is supported and works very well, especially if you use vendor drivers.
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.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]
Regards
Bookmarks