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. QQuickWidget not showing in release build
Qt 6.11 is out! See what's new in the release blog

QQuickWidget not showing in release build

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 444 Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I am having trouble some with my 'release' version. Everything is working fine except for my QQuickWidget, which does not show in the release version. For the debug version it works as expected.

    This is my build command for the debug version:

    qmake.exe "application.pro" -spec win32-g++ CONFIG+=debug" "CONFIG+=qml_debug" && mingw32-make.exe qmake_all
    

    And for the release version I have a build command + windeploy command to copy .dll files:

    qmake.exe "application.pro" -spec win32-g++ "CONFIG+=qtquickcompiler" && mingw32-make.exe qmake_all
    
    windeployqt.exe --release --no-translations --no-patchqt --no-quick-import --no-system-d3d-compiler --no-compiler-runtime --no-webkit2 --no-angle --no-opengl-sw "release path"
    

    During initilisation of my main window class I create an instance of a class inheriting QQuickWidget as follows.

    mDesignStageView = new WDesignStageView(mUiImt->stageWidget);
    mUiImt->stageLayout->addWidget(mDesignStageView);
    mDesignStageView->hide();
    

    Constructor of WDesignStageWidget:

    WDesignStageView::WDesignStageView(QWidget *parent) : QQuickWidget(parent){
        this->setResizeMode(QQuickWidget::SizeRootObjectToView);
        this->setSource(QUrl("qrc:/ui_designstage.qml"));
    
        this->rootContext()->setContextProperty("widget", this);  
        this->rootContext()->setContextProperty("colourPrestudy", this);
        ... more colour properties
    }
    

    The other functions of WDesignStageView don't do much except changing colours when some conditions are met.

    The widget show show together with two QTreeView when clicking on an item in another QTreeView. They do show correctly however.

    1 Reply Last reply
    0

    • Login

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