Skip to main content

Posts

Showing posts from May, 2010

QSystemTrayIcon VS showFullScreen

I've found strange collision when you open window on full-screen and go to other application so that full-screen is on the back, then you have tray icon, then when you press on tray icon image just disappears. I've spend some long hours searching the problem that cause this, when discovered that full-screen mode overlaps icon tray and it just being redrawn by QPainter of MainWindow. This is quite strange problem, so I've dig more and more and found out that hiding Mac OS top menu do the same to the tray icon. It looks like when you hide the menu and in same time try to show IconTray it gives you a punch, so nothing could probably solve this problem. In my case I've changed the flow of the application, so now full-screen window is modal, when you exit full-screen mode it hide main window and tray icon works fine. Conclusion: NO QSystemTrayIcon and showFullScreen at same time

Hiding Mac OS system menu in Qt

I know it not a big deal, but when you work with full screen application system menu pops up when you move mouse on the top, so here is a hack that solve this problem, I use it in main.cpp put this in header #ifdef Q_WS_MACX #include #endif and this in main procedure: int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); #ifdef Q_WS_MACX HideMenuBar(); #endif return a.exec(); //other code } thats it :) I hope it will help

Ciklum moved to new office

It's big WOW for everyone, now we have nice view from the window and work will be better :) Still I'm leaving company at 25th of May to join forces of new start-up Tuppy.com, hope this will happen smoothly without any delays. Still think that new office is big plus to stay there

How to get active window geometry on Carbon

I'm not a Carbon developer, so it took huge amount of time to find simple way how to get active window handle in Windows API it's simple as few commands and there is so much forums where you can find help for that. Don't know why, but mostly people are searching window title. My task was find window geometry on Qt. This example includes how to do this, but can be also used for retrieving other information. Still don't know how to cast AXUIElementRef to WId, so if someone have a clue let me know in comments. Example: QRect getActiveWindowGeometry() {     QRect rect;     ProcessSerialNumber psn = { 0L, 0L };     OSStatus err = GetFrontProcess(&psn); // get front process PSN     /*error check*/     pid_t *pidt;     GetProcessPID(&psn ,pidt); // get Pid from ProcessSerialNumber     AXUIElementRef theApp = AXUIElementCreateApplication(*pidt); //get Application from Pid     AXUIElementRef focusWindow;     AXValueRef value;     CGPoint xy;     CGSize