Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can use qml without Qt support?

Can use qml without Qt support?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 404 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dragondjf
    wrote on last edited by dragondjf
    #1

    Yes, you can use littlevgl_qml base on EVM

    1. what is littlevgl_qml ?

    littlevgl_qml is a new qml implement without Qt support, which qml engine is support by EVM

    github: https://github.com/scriptiot/evm/tree/master/thirds/littlevgl_qml/ports/Qt

    2. what is EVM

    EVM is Embedded Virtural Machine, which is an common and simple Virtural Machine, can run on resource limited MCU

    github: https://github.com/scriptiot/evm

    3. demo

    alt text

    Rectangle {
        id: rect
        x: 0
        y: 0
        width: 800
        height: 600
    
        style:Style{
            main_color: 'lightblue'
            grad_color: 'lightblue'
        }
    
        Rectangle{
    
            x: 200
            y: 100
            width: 400
            height: 400
    
            style:Style{
                main_color: 'lightblue'
                grad_color: 'lightblue'
            }
    
            Image{
                source: 'images/wear/ico_watch_background_011.bin'
            }
            
            Gauge{
                id: g1
                x:45
                y:45
                width:300
                height:300
    
                min:0
                max:360
    
                scale: [360, 0,0]
    
                GaugeValue{
                    id:gvsec
                    index:0
                    value:0
                }
    
                function animation(){
                    var date = new Date();
                    var offset = 31;
                    var hx = date.getHours();
                    var mx = date.getMinutes();
                    var sx = date.getSeconds();
    
                    if( hx > 12) hx = hx - 12;
    
                    if( hx <= 6 ) hx = hx * 360 / 12 + 180;
                    if( hx > 6 && hx <= 12) hx = hx * 360 / 12 - 180;
    
                    if( sx >= 30 ) sx = sx * 6 - 180;
                    else sx = sx * 6 + 180;
                    
                    if( mx >= 30 ) mx = mx * 6 - 180;
                    else mx = mx * 6 + 180;
    
                    hx = hx + date.getMinutes() * 30 / 60;
    
                    print(hx, mx, sx);
                    
    
                    gvhour.value = hx;
                    gvmin.value = mx;
                    gvsec.value = sx;
                }
    
                timer_id:0
    
                onCompleted: {
                    g1.timer_id = setInterval(g1.animation, 200);
                }
            }
    
    
            Gauge{
                x:95
                y:95
                width:200
                height:200
    
                min:0
                max:360
    
                needle: ['white']
    
                scale: [360, 0,0]
    
                GaugeValue{
                    id:gvmin
                    index:0
                    value:20
                }
            }
    
            Gauge{
                x:120
                y:120
                width:150
                height:150
    
                needle: ['yellow']
    
                min:0
                max:360
    
                scale: [360, 0,0]
    
                GaugeValue{
                    id:gvhour
                    index:0
                    value:0
                }
            }
        }
    }
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Don't double post: https://forum.qt.io/category/11/mobile-and-embedded

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved