Skip to main content

Posts

Capture full screen in muti-screens Windows XP by Qt

I've just want to put some small solution here, I've spend few hours to find out why same procedure works fine in Linux and Mac OS,but always returns only first screen image in Windows XP. This is recommended use: QPixmap::grabWindow(QApplication::desktop()->winId()); And in windows XP it always capture only 1st screen, so this hack solution how same overloaded procedure works fine : QWidget *scr = QApplication::desktop(); WId w = scr->winId(); QPixmap pm = QPixmap::grabWindow(w,0,0,scr->width(), scr->height()); Just specify geometry of all screen and it works perfect.

My speech about Qt in Ciklum Speakers' Corner(RUS)

I wanted to share my speech that took place 21 Oct, it'a about how Qt helps to build cross-platform application. It was based on my experience building Owely.com for Windows, Mac OS and Linux. This presentation is based on russian, sorry eng speaking guys. And actual presentation on Eng: http://igorrac.blogspot.com/2010/10/qt-cross-platforming-rocks.html

Magento API + Java != Friends

Recently I've had a task to write small integration of Java to the Magento API, and meet a lot of troubles on the way. First of all Magento supports SOAP web-services that actually don't work well, I've found one solution http://code.google.com/p/magja I didn't tried because we spend much time trying to make them work with no result, so next was XML RPC based API that worked quite well on PHP examples, but caused more trubles. Login worked pretty well: XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setServerURL(new URL("http://magento.dev/index.php/api/xmlrpc/")); XmlRpcClient client = new XmlRpcClient(); client.setConfig(config); Vector params = new Vector(); params.addElement( "defsan" ); params.addElement("123456"); String session = (String)client.execute( "login", params ); But other call's did worked, instead they show: Exception ...

Qt cross-platforming "rocks"!

Today I've made a topic about my experience of lunching Qt-based cross-platform product : Owely.com. In my presentation I've made few points about how C++ evolved during these years, and how it can become handy when you need high-performance cross-platform solution with high integration to the native API. Hopefully people that come to check this presentation was very interested in C++ and we had small but productive conversation. For thous who miss

Getting real presentation

this slides was prepared for Ciklum Speaker's Corner specially for developers. I've tried to squeeze only topics and quotes that's mostly important for new age application development. This slide prepared from "Getting real" book of 37signals Getting real in development View more presentations from defsan .

QPixmap::setAlphaChannel artifacts

  I found strange artifact connected with alpha channel in QPixmap. In my project Owely, I use few layers to separate different tools interactions, so you just repaint some level without worries. So all levels had alpha channels set on constructor, but strange stuff appear, on the second initialization they wasn't empty, they was filled with previous screenshot with transparency, check the image The problem was solved by this article: http://labs.trolltech.com/blogs/2009/12/16/qt-graphics-and-performance-an-overview/ there was words about setAlphaChannel that works unstable, and should be used with fill() method m_pixmap = QPixmap(parent->width(), parent->height()); m_pixmap.setAlphaChannel(m_pixmap); m_pixmap.fill(Qt::transparent); // this fix the deal I don't advise to use fill on paint event, or somewhere in the loop.

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