Code Jamming Everyday IT problems, solutions and discussions

Handling drag'n'drop of files in Qt under OS X

If you ever tried to handle drag’n’drop files in your Qt application, you would usually come up with the code like the following. First of all you will need a Drop Area somewhere in your application, which will handle drops DropArea { anchors.fill: parent onDropped: { if (drop.hasUrls) { var filesCount = yourCppModel.dropFiles(dr... Read more

How to keyword and upload photos/illustrations to microstocks

If you’re a photographer new to microstock photography, I highly reccomend you to embark this wonderful way of passive earning using your artworks. But I will suppose that you know what is this about and how basically use it. I would even suppose you’ve passed an exam on some stock agency and uploaded your first artworks. But did you know there’... Read more

How to download huge folder from Dropbox

If you face a problem to download folder from Dropbox which contains tons of files, no known browser extension can help you. Dropbox moves each file download to it’s separate page and you can’t do it directly. When I faced this problem I knew I would need to create my own solution and quick googling just confirmed that. I opened javascript con... Read more

Tips and tricks to improve performance of your ACM solution

Here I gathered system-programming tricks that can improve performance of your solution in C++ dramatically! Use scanf/printf functions for standard IO instead of cin/cout Memory-align buffers and structures to WORD size of your architecture (4 bytes for 32-bit and 8 bytes for 64-bit) Use arrays instead of linked lists (to use memory blo... Read more

Interesting issues and features of Qt programming

In this post I enlist all interesting facts and issues I’ve experienced while developing my first project in Qt (from 5.3 to 5.4 5.6) 18.02 - QSettings interface in Qml transformed bool to string and was always true on deserialization 18.02 - QByteArray returned from local scope crashed with heap corruption on return of function (destructor of... Read more