Anchor animation in QML

Some time ago I was looking for clear way to provide anchor animation in QML.
First of all,

AnchorAnimation can only be used in a Transition and in conjunction with an AnchorChange. It cannot be used in behaviors and other types of animations.

But I want to have some pattern-like way to provide all animations inside project.

Now, I want to share my results, hope someone find it usefull.

Here is picture of how I done all:

What I’ve done in few words:

  • Created fakeLeftItem and anchored it to left of my main view
  • Explicitly set fakeLeftItem‘s width and heigth (if that fakeLeftItem is only for leftPanel, we can set its size to leftPanel‘s size). fakeLeftItem must be invisible, but we must understand that it is outside our main view.
  • leftPanel anchored to the top and to the bottom of main.
  • Next moment is anchoring of left side of leftPanel. It can be anchored to leftFakeItem.left — so panel will be hide; and to the main.left — so panel will be visible.

To animate anchor changes, I added states into leftPanel:

states: [ State {
  name: "show"
  AnchorChanges { 
    target: leftPanel
    anchors.left: parent.left 
 State {
  name: "hide"
  AnchorChanges { 
    target: leftPanel
    anchors.left: fakeLeftPanel.left 
  }} ]

Add animation effect on anchor changes is quite simple:

transitions: Transition {
  AnchorAnimation { duration: 200 }

Thats all. Here you can seee whole qml-file:


Evolus Pencil on Debian Jessie

There is no Firefox package in Debian. You can read about it here:

If you found this article, it means that you tried to install Pencil from officially provided deb-package (today it is

Generally, dpkg can not resolve firefox-dependency. I do not see any advantages of Firefox over Iceweasel. Keep in mind, that you can have only one of that applications — Firefox or Iceweasel. So I don’t want to install Firefox. Instead, I updated my Iceweasel guided by

You need to add the following entry in /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/:

deb unstable main
deb experimental main

You can install it with the following commands:

$ apt-get update
$ apt-get install -t experimental iceweasel

After that, I avoid firefox dependency in Pencil by simple swapping firefox to iceweasel in deb-package next way (as described here

Basically what you have to do is extract the files from the deb

dpkg-deb -R file.deb temp-dir

Then edit DEBIAN/control and remove the firefox occurrence from the dependency list.

After that you repackage the deb

dpkg-deb -b temp-dir file-mod.deb

Once you’ve done that the installation should go smoothly and you can see if it works and in case it doesn’t, what errors it gives you.

[EN] Typical workflow with GitHub on shared project


I found this very strange, that all around the Internet there are lot of articles on how to do some extended techniques using git. But nowhere can find short, simple and easy recommendations on how to use GitHub to work on shared project.

This article is effort to describe typical workflow on shared project using git on GitHub.
Читати далі

[UA] Типовий підхід до роботи над спільним проектом засобами GitHub


В Інтернеті є багато статей про те як користуватися git, є дуже багато статей про різного роду складні і вичурні техніки використання git.

Але, чомусь, ніде не знайшов толкового, простого і зрозуміло розписаного підходу до роботи засобами git над спільним проектом на GitHub.

Ця стаття — спроба описати підходу до роботи засобами git над спільним проектом на GitHub.

Читати далі

[EN] Using scons with QtCreator (on Mixxx example)


Mixxx has everything you need to start making DJ mixes in a tight, integrated package.”

We’ll try to compile it and by the way, understand how to make QtCreator use scons build system instead of qmake. Why not use qmake? SCons is implemented as a Python script and set of modules, and SCons “configuration files” are actually executed as Python scripts. This gives SCons many powerful capabilities not found in other software build tools. Here is SCons vs other build tools.

Читати далі

[EN] Rendering DPI in Qt’s WebKit


Some time ago, I stuck on reading manuals trying to find correct and clear way to enlarge DPI of images rendered by WebKit (in Qt).

If you need to render HTML page in your Qt app, you can use widgets that use QTextDocument, such as QLabel and QTextEdit. But all of them support limited subset of HTML 4 and CSS 2.1 (Qt Project — Supported HTML Subset). But if you need to use some more complicated things (or even some typical CSS styles) excluded from that list, you should use WebKit (WebKit in Qt).

Читати далі

Компіляція Qt 4.8 під Лінукс

Вирішив трошки “get hands dirty”. Постійно використовую Qt та QtCreator як середовище для розробки як під Windows так і під Linux.

Цього разу вирішив зібрати бібліотеку Qt з вихідних кодів.

Читати далі