How to call a frame in Qt

94 Views Asked by At

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...

1

There are 1 best solutions below

0
ΦXocę 웃 Пepeúpa ツ On BEST ANSWER

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!