Tag Archives: image

Transparent, dynamically generated from text tray icon in Qt and C++

[Qt C++] – Transparent, dynamically generated from text tray icon

#include <QApplication>
#include <QSystemTrayIcon>
#include <QPixmap>
#include <QPainter>
#include <QFont>
int main(int argc, char *argv[])
    QApplication app(argc, argv);
    QPixmap pixmap(20, 20); // small size should work fine on every platform
    pixmap.fill(Qt::transparent); // set transparency of the icon
    QPainter painter(&pixmap);
    int size = 15;  // size 15 looks nice on KDE and GNOME
    QFont font("", size);
    QString theText = "3"; // this will be the text in the system tray icon
    painter.drawText(QPoint(5, size+1), theText);
    QSystemTrayIcon *tray = new QSystemTrayIcon();
    return app.exec();

Continue reading

Problem with camera’s up-side-down view on Linux

This problem is known for everyone who has ASUS or Acer notebook and uses its webcam.

Provided default library to use camera gives us up-side-down view.

I wrote a post how to permanently fix this bug on Skype, but the fix doesn’t work for all applications. You can still meet this bug in Firefox, Chromium and any other application which can use your web-cam.

Continue reading