On MacOS with Qt5.3.1 QToolBar is black when attached - macos

I have a QMainWindow Application that uses several QToolBars. My program works on Linux, Windows and MacOS, however on MacOs the QToolbar behaves a little bit funky. When attached to the MainWindow it is just black as shown here
When I detach it it is grey as you would expect it to be
Also when I maximize to program the toolbar creates artifacts like this
Do I need any MacOS specific things for the QToolBar?

I'm hitting this bug too. I think it is linked to using non-alien widgets inside the toolbar or app wide.
Are you using setAttribute(Qt::AA_NativeWindows);? If so, try removing it.

Would you happen to have a QGLWidget-based UI element in your application? If so, apparently this is a known issue.
https://bugreports.qt.io/browse/QTBUG-41679
I am experiencing the "double-vision" aspect of this on a Qt 5.7.0-based app.

Related

Qt OSX Incorrect Mouse Behavior

My application uses OpenCV, OpenGL, and Qt to display a webcam feed. It works perfectly on Ubuntu (clicking buttons works properly), but on OSX there seems to be a UI problem. The window displays, but I can't click and I quickly just get the loading spinning pinwheel and it doesn't stop until I force quit the application. Has anyone come across this problem before?
I solved this by adding a timer to the initialization of my gui widget:
m_timer = new QTimer();
connect(m_timer, SIGNAL(timeout()), this, SLOT(gotNewImage()));
m_timer->start(1);
where gotNewImage() is the function I call to grab a new image.

Building a gui app using wxPython (menubars)

while creating a menubar and adding menu-items to it,my panel is showing blank...the menubar is not showing and am getting this message-
(python:4106): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent.
how do i resolve this problem???
I know I'm a bit late but...
Are you using Ubuntu 11/12? It's a bug in Ubuntu's GTK implementation from what I gathered
There are unofficial patches but they are for C++ Wx. I have the same problem as you and it is annoying
http://trac.wxwidgets.org/ticket/14292
For myself, the menu bar shows itself but the signals aren't sent to the status bar when going over it with the mouse.
I removed the "global menu bar" from Unity using the link on the ticket. It fixed the problem
We kind of need a sample app: http://wiki.wxpython.org/MakingSampleApps That will help us figure out the issue. However, menus are supposed to be children of the frame in almost all cases, so I suspect that is your problem. Attach it to the frame instead of the panel. See also http://www.blog.pythonlibrary.org/2008/07/02/wxpython-working-with-menus-toolbars-and-accelerators/ or http://zetcode.com/wxpython/menustoolbars/

Animate Windows Wallpaper with QT

i want to make an animated wallpaper for windows. So far i have only expreience with Mac OS X programming and i'm new to windows. So i decided to work with QT because it seems that there is more help out there.
Until now i have created the app in a borderless window in qt. It work quiet fine.
But is there a way in QT to change the level of the window so that its appear above the windows wallpaper but behind the icons?
EDIT:
Ok if found a simple solution.
After some testing with the hints form kusg1 I figured out when there is a transparent window mouse events going still to the desktop.
I actualy want have this website has wallpaper: Ticketack. - So i created a frameless window which stays on bottom and has a transparent background and displays the text. Beside this i can change the windows wallpaper directly to get the background of the clock.
So clock text is not behind the icons but i think this will be ok.
Just some ideas: Use the windows flag as Qt::Window | Qt::FramelessWindowHint + Windows Stay at bottom hint, and set the content of the widget with your animated content (the suitable candidate is to use QGraphicsView).
The widget needs two main tasks:
Upon launching, it grabs the desktop background as pixmap and do overlay with the animated content (this needs to have the desktop to be wallpaper-less for simple scenario).
The widget needs to capture mouse and focus event and channel back to actual window command if the user wants to click the icon on the desktop.
Update:
Some pointers for the implementation:
For managing desktop icon, there is a good article here! (also found from SO).
Qt example and demos has an example on the taking desktop snapshot, the snippet is: QPixmap::grabWindow(QApplication::desktop()->winId());
Answer to your question: no, there isn't.
However, you can try something like this using Windows API: How to draw directly on the Windows desktop, C#?

Constraining window positions in other applications in Cocoa?

I'm relatively new to Cocoa development. I'm developing on Snow Leopard. I have a scenario in mind and I'm curious if the API supports it. I've not been able to find anything about it, so I assume its not possible. But I'm happy to be proved wrong.
Suppose I write an application that lives at the top of the screen just below the menu bar. The window floats, so it is always on top. This can be annoying, so one thing I had in mind was constraining other windows (especially those in other applications) so that they are below my application. Is there something in the API that would allow me to do that? To specify a maximum origin for all windows (except mine)?
Thanks.
There's no real supported way to do this. You could achieve something similar using the Accessibility API. You'd have to watch for window-moved notifications and shove the window back into the visibile area.
I don't think you can do that, you see, one of the cool things of a window's based UI is that you can stack Windows on top of others, in a desktop metafore.
Now, what you can do is a always on top window, using NSScreenSaverWindowLevel as the NSWindow level. One nice trick you can do is [window setLevel: NSScreenSaverWindowLevel+1], and it set's your window above the screensaver level.

Anyone know what program the Apple store demos likely use to make their interactive desktop

I have a project that I am attempting to do and we want something similar to what the Apple store does. We thought it was a Quartz Composer interactive desktop but I've been putting together an xcode cocoa solution to do it too.
Here is an image of what I'm wondering about it is just a Title and 3 images that link out to url locations. If anyone can point me in the direction they believe can make something like this I would appreciate it.
I have used Quartz Desktop to display a .qtz but it isn't interactive. If anyone knows of another quartz desktop displaying .app that does use the interactive parts such as mouse and keyboard, it would be appreciated.
Applestore demo http://img707.imageshack.us/img707/614/dsc03934y.jpg
It's a custom proprietary program called, if I remember correctly, Concierge. But it's not doing anything tricky. You can make any NSWindow appear on the desktop by setting its window level to kCGDesktopWindowLevel.

Resources