Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Qt and OSG GraphicsWindowQt
Forum Updated to NodeBB v4.3 + New Features

Qt and OSG GraphicsWindowQt

Scheduled Pinned Locked Moved 3rd Party Software
1 Posts 1 Posters 2.2k 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.
  • B Offline
    B Offline
    bradenedmunds
    wrote on last edited by
    #1

    Hi,

    In my application I have two different GraphicsWindowQT classes. On startup a user can select a mode and the window is loaded. My problem is if a user selects "New.." and changes to the opposite mode.

    Below is the code I've written to swap between the two GraphicsWindowQT classes:

    @QWidget *widget;
    LoadingDialog *loading;
    if(ConstructionObject::getConstructionType() == Ui::BUILDING)
    widget = new BuildingOSGWidget(this, loading);
    else
    widget = new CaveOSGWidget(this, loading);

    if(windowAlreadyCreated)
    {
    delete ui->threeD->layout();
    ui->threeD = widget;
    }

    ui->threeD->setLayout(widget->layout());
    ui->threeD->update();
    @

    After this code runs, I get a blank blue screen. I know I can always shut down the application and reopen it, but I was hoping for a more elegant solution. If anyone has any suggestions I would appreciate it.

    Thanks!

    Braden

    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