I want to do some changes on screen rotation , the code of the method that is supposed to handle such event is taken from here
edit: I have a scroll area , and its getting of border on rotation how can i adjust its size?so it could fit the screen plz check the event handler below
this my whole code :
//FORM1.CPP
#include "form1.h"
#include "ui_form1.h"
#include "form.h"
#include "ui_form.h"
#include <QResizeEvent>
Form1::Form1(QWidget *parent) :
QWidget(parent),
ui(new Ui::Form1)
{
ui->setupUi(this);
}
Form1::~Form1()
{
delete ui;
}
//the method that is supposed to handle such event
void Form1::resizeEvent (QResizeEvent* event)
{
QWidget::resizeEvent(event);
ui->textBrowser->setText("karim");
}
I got this error:
\Users\user\Desktop\karim\Qt\Project\form1.cpp:31: error: 'QMyWidget' has not been declared
Please note that I didn’t do anything else this is my whole code …
Can you please tell me whats wrong or what am not getting ?
Please be specific I would appreciate that …
I do not see any reference to your
QMyWidgetclass other than the below line. May be I’m missing something. But if you have defined yourQMyWidgetclass elsewhere, you atleast need to include the header.May be you meant this instead of the above:
Update to the comment: You can try doing this.