Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT WINCE7 opacity window



  • Hi!
    I am using the TORADEX Colibri T30 module with WINCE7.
    I am trying to create a opacity window in QT by setting the window property setWindowOpacity (0.3).
    But the window remains opaque.
    Then I added the SYSGEN_COMPOSITION and BSP_GLES2COMPOSITOR components to the WINCE7 assembly and created a new OS image using the Platform Builder as described here http://download.microsoft.com/download/2/4/A/24A36661-A629-4CE6-A615-6B2910A1367A/Window Compositor Developer's Guide.pdf.
    However, when I upload the image to the Colibri T30, I only see a black screen on which the mouse pointer can move.
    How can I still solve my problem?
    To check the transparency of the window, I use the code provided in the attachment.

    #include "draggablewidget.h"
    #include "ui_draggablewidget.h"
    
    #include <QDebug>
    #include <QMouseEvent>
    
    #include <QBitmap>
    
    DraggableWidget::DraggableWidget( QWidget* parent ) :
        QWidget( parent, Qt::Window | Qt::FramelessWindowHint ),
        ui( new Ui::DraggableWidget ), dx( 0 ), dy( 0 ) {
        ui->setupUi( this );
    
        ui->lbTitle->setText( windowTitle() );
    
        connect( ui->btnQuit, SIGNAL( clicked( bool ) ), qApp, SLOT( quit() ) );
    
        setWindowOpacity( 0.2 );
    }
    
    DraggableWidget::~DraggableWidget() {
        delete ui;
    }
    
    void DraggableWidget::mouseMoveEvent( QMouseEvent* e ) 
    {
        if( e->buttons() | Qt::LeftButton ) 
    	{
            setGeometry(
                pos().x() + ( e->x() - dx ),
                pos().y() + ( e->y() - dy ),
                width(),
                height()
            );
        }
    }
    

    Maybe I have the wrong code?

    Regards
    Sergey Gura


Log in to reply