All Projects → jpnurmi → qtstatusbar

jpnurmi / qtstatusbar

Licence: MIT license
StatusBar for Qt allows setting the status bar color and theme on Android and iOS.

Programming Languages

C++
36643 projects - #6 most used programming language
QML
638 projects
Objective-C++
1391 projects
CMake
9771 projects
QMake
1090 projects

Projects that are alternatives of or similar to qtstatusbar

qt-qml-project-template-with-ci
Template for a Qt/QML application with batteries included: GitHub C.I. for your QML app; automated gui testing with Xvfb; automatic code-format checks and more. Compiles for Desktop and Mobile (Linux, Mac, Windows, and Android).
Stars: ✭ 33 (-62.92%)
Mutual labels:  qml
herald
Pre-alpha end-to-end encrypted instant messenger.
Stars: ✭ 23 (-74.16%)
Mutual labels:  qml
g-timetracker
Global Time Tracker
Stars: ✭ 20 (-77.53%)
Mutual labels:  qml
vatsinator-legacy
An open-source Vatsim monitor
Stars: ✭ 12 (-86.52%)
Mutual labels:  qml
SCodes
This project is Qt & Qml wrapper for ZXing-C++ Library that is used for decoding 1D and 2D barcodes.
Stars: ✭ 55 (-38.2%)
Mutual labels:  qml
python-qt-live-coding
Live coding environment for Python, Qt and QML.
Stars: ✭ 35 (-60.67%)
Mutual labels:  qml
qt-template
Template/Example of Qt/QML built with CMake/qmake. (include PyQt and PySide2)
Stars: ✭ 15 (-83.15%)
Mutual labels:  qml
oxbar
configurable X11 status bar for OpenBSD (and xstatbar successor)
Stars: ✭ 36 (-59.55%)
Mutual labels:  statusbar
xmonad-log
DBus monitor for xmonad log events.
Stars: ✭ 31 (-65.17%)
Mutual labels:  statusbar
Examples Qt
Shows how to use Qt widgets only by programming code (c++17).
Stars: ✭ 38 (-57.3%)
Mutual labels:  qml
StatusBarColorManager
A library which help you to change status bar color in a simple way
Stars: ✭ 32 (-64.04%)
Mutual labels:  statusbar
rust-sysbar
Rust library for interacting with the system's taskbar / tray / statusbar
Stars: ✭ 55 (-38.2%)
Mutual labels:  statusbar
Pagination
a paging widget based on Qt
Stars: ✭ 22 (-75.28%)
Mutual labels:  qml
mini-qml
Minimal Qt deployment for Linux, Windows, macOS and WebAssembly.
Stars: ✭ 44 (-50.56%)
Mutual labels:  qml
status-desktop
Status Desktop client made in Nim & QML
Stars: ✭ 163 (+83.15%)
Mutual labels:  qml
Sparrow.2
Sparrow.2 is a V-Play like library. Pure QML implement. Level up from Sparrow.
Stars: ✭ 31 (-65.17%)
Mutual labels:  qml
Quickeys
A mac menu bar app that provides note taking functionality though a quick dropdown menu.
Stars: ✭ 54 (-39.33%)
Mutual labels:  statusbar
Qt3D-learn
Qt3D-learn
Stars: ✭ 36 (-59.55%)
Mutual labels:  qml
widgetci
a Cross-Platform Widget Management App. (Win/Linux/Mac)
Stars: ✭ 36 (-59.55%)
Mutual labels:  qml
AndroidToRN
原生android中嵌入React Native
Stars: ✭ 95 (+6.74%)
Mutual labels:  statusbar

StatusBar for Qt

StatusBar for Qt allows setting the status bar color [1] and theme [2] on Android and iOS.

Android

screenshot

  1. NOTE: StatusBar::color requires Android 5.0 Lollipop (API level 21) or later.
  2. NOTE: StatusBar::theme requires Android 6.0 Marshmallow (API level 23) or later.

iOS

screenshot

It is recommended to set the Qt.MaximizeUsingFullscreenGeometryHint window flag, and take the difference between Screen.height and Screen.desktopAvailableHeight into account. For example:

ApplicationWindow {
    flags: Qt.Window | Qt.MaximizeUsingFullscreenGeometryHint

    header: ToolBar {
        topPadding: Qt.platform.os === "ios" ? Screen.height - Screen.desktopAvailableHeight : 0
    }
}
  1. NOTE: StatusBar::color is not available on iOS.

Build

The easiest way to include StatusBar to a project is to copy over the contents of the src folder and include statusbar.pri in the project file (see example/statusbar.pro):

include(path/to/statusbar.pri)

Register

Registering the QML type in C++ (see example/main.cpp):

#include "statusbar.h"

int main(int argc, char* argv[])
{
    QGuiApplication app(argc, argv);

    qmlRegisterType<StatusBar>("StatusBar", 0, 1, "StatusBar"); // <==

    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    
    return app.exec();
}

Usage

Example usage in QML (see example/main.qml):

import StatusBar 0.1

StatusBar {
    theme: StatusBar.Dark // or Material.Dark
    color: Material.color(Material.Indigo, Material.Shade700)
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].