Qt Taskbar like application possible?

Hello everyone,

I have an idea to create an application much like the windows taskbar. Ideally it would live at the top, left or right of the screen and not allow other applications to go above it. If maximized they would dock the appropriate edge to it rather than go above or below it.

Does anyone know if this is possible or have any resources where I can search a bit more on the topic? It’s been hard to find the right terms to put into google to get any results. I know I’m asking a fairly large question here. For the first iteration I would only want to support Windows.

Thanks very much!

-tony

About making something always on top:
QWidget has a method called setWindowFlags. You can pass Qt::WindowStaysOnTopHint to it or any other combination of flags, check the doc :slight_smile:
You can pass Qt::ToolTip aswell, which will take care of masking the window title bar for you, or you can mask it yourself by using QWidget method called setMask with a QRegion.

About the taskbar functionality, not sure if Qt has something like that already, though worst case making your own maximize logic should be no problems.
On a side note; check setAttribute method of QWidget that can take enum Qt::WidgetAttribute, you might also want to explore the rest of the flag combinations setWindowFlags method can take, there might be useful stuff in there for this.

Might also be worth checking: QToolBar, it has docking functionality, though this only works with a QMainWindow as it’s parent.

Thanks for the information! The problem I see is the maximize logic will have to apply to ALL windows that I don’t actually have control over.

ie. Maya, Nuke, Chrome etc. All of these windows will have to not be able to maximize to the full screen width + height. That is where I see getting tripped up.

I’ll definitely look into the information you’ve provided. I’m not sure if it will be possible to not allow other window’s applications to not maximize and be covered up by my custom “taskbar”.

-tony

Hmm if I understood it correct, QDesktopWidget might be useful for this. Never used it myself though :slight_smile:

Not sure if there’s an easy solution so that other apps “dock” to your taskbar when maximized since you’d have to change the info about the available desktop size that those apps get back.

But here’s another issue your taskbar will have to deal with: Windows+D - aka show desktop. I had to deal with this not long ago but I found a good solution inside this: http://www.codeproject.com/KB/gadgets/CalendarGadget.aspx

  • Keeps your Qt window visible despite any show desktop commands. I’m using this in a “desktop widget” style program which lives in a corner of the desktop and shows some info.

Your point of view is so wonderful, and I feel very interesting. I have a lot of immature idea where you get the answer, I will continue to focus on your posts, I hope you can continue to update, I will put my views and ideas to share with you.
Green Weight Loss Tea
p57 hoodia
Ralph Lauren Polo Shirts
Men’s Ralph Lauren Shorts

Tony, Raymond Chen has some words for you: http://blogs.msdn.com/b/oldnewthing/archive/2011/03/10/10138969.aspx

Thanks everyone for the info.

Especially you, Rob! After I had posted this and thought about the issue more, I realized it’s pretty ridiculous to try and hijack people’s computers. I was trying to think of a way to provide an easy access “HUD” for artists to show their tasks, messages, send in tickets, etc. There are a lot of web solutions, but some people don’t seem inclined to use their browser for these things and I wanted to provide an easy way for the information to be there.

Robert: That’s a very interesting article. I never thought about trying to avoid the desktop button. I’ll save this for later, it may come in useful.

Thanks again everyone.

-tony

I’d definitely, definitely encourage you to do this through the web.

Yea I’m definitely set on the web. No matter how I approach how to house the UI, it’s going to be web driven.

I still like having the ability to present some sort of HUD that will have easy access to important settings/information. No matter the route there will be a more fleshed out web version as well.

Thanks again.

-tony

that’s right…

Web is the way to go (assuming people visit your page that is ;)).

For a HUD, why have it on top? seems rather annoying. I would go the way of rainlendar and other “widget” type applications and have it on the bottom - together with the “show desktop” workaround.
Make a small and lightweight custom skin (via Qt Stylesheets for example) with a subtle appearance (e.g. some transparency) so it blends better with the user’s wallpaper and feels like it’s a part of the desktop itself.

Hide the thing in the taskbar by choosing the appropriate Qt window flags and provide a tray icon, which can also be used for basic user alerts (e.g. by using different colors or text bubbles).

The whole thing is not very difficult to implement. I started writing something like this just for the heck of it, because I wanted a “widget” style application template. If you go for this, do it in C++. Using Python + Qt unfortunately bloats those small apps’ memory demands beyond reasonable.