Search code examples
qtqframe

How to call a frame in Qt


I have included a frame in my ui and i'm trying to call it in my source code, and I'm guessing it should be something like this ui->frame; but while I'm typing it, it doesn't come along the suggestions...


Solution

  • compile the project and try again...

    Qt creator call the Meta object compiler and will generate/update the moc files, after that you can get the suggestions when writing the code...

    /****************************************************************************
    ** Meta object code from reading C++ file 'MyWindow.h'
    **
    ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
    **
    ** WARNING! All changes made in this file will be lost!