FramelessWindowHint freezes form with QAxWidget
-
An interesting problem when installing FramelessWindowHint flag all the content in the form as it is frozen, those buttons does not change when you hover style (: hover), and you can not edit the text field and more. All this happens when the form has QAxWidget. What could it be?
Win10 x32-x64
Qt 5.6 - 5.7 -
Hi
That sounds odd.
Have you tried to create the QAxWidget later ?
Like via button.
After window is up and running etc.
Im wondering if QAxWidget get truma if put in
UI and then u set FramelessWindowHint in code. -
I do everything on pure paper for the test...
i create 2 example photo:
no initialized qAxWidget
initialized qAxWidget -
@Tikitko
Ok, but in both cases, its included in the UI from start?
It seems once active it dont like FramelessWindowHintI would look in
https://bugreports.qt.io/secure/Dashboard.jspaand also test if you insert from code only
not having it in UI . -
@mrjj
I tried soMainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); this->setWindowFlags(Qt::FramelessWindowHint); }
like this
void MainWindow::on_pushButton_clicked() { this->setWindowFlags(Qt::FramelessWindowHint); this->show(); }
and
int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.setWindowFlags(Qt::FramelessWindowHint); w.show(); qDebug() << w.windowFlags(); return a.exec(); }
-
@Tikitko said:
setWindowFlags(Qt::FramelessWindowHint);
ok, but the flag is not the issue. that works.
I was thinking about
void MainWindow::on_pushButton_clicked()
{
QAxWidget *Test = new QAxWidget(this);
Test->Show();
.. other setupand not have it in UI.
just to test. -
@mrjj hmm
i do this:void MainWindow::on_pushButton_clicked() { QAxWidget *Test = new QAxWidget(this); Test->setControl("{8856f961-340a-11d0-a96b-00c04fd705a2}"); Test->dynamicCall("Navigate(const QString&)","http://vk.com/"); Test->show(); }
And work! this bug work when i create QAxWidget in Disigner...
Hmm when i creat not in on_pushButton_clicked also this bug...
-
well my "theory" is that
if QAxWidget is assigned to a parent before FramelessWindowHint
then bug comes. -
Well I assume u tested that ?
Create it after setupUI and FramelessWindowHint does not make it work ?If no, you can try with the showEvent
void maiwinxx::showEvent( QShowEvent* event ) {
QMainwindxx::showEvent( event );// create it here.
}
-
@mrjj i create:
void MainWindow::showEvent( QShowEvent* event ) { QAxWidget *Test = new QAxWidget(this); Test->setControl("{8856f961-340a-11d0-a96b-00c04fd705a2}"); Test->dynamicCall("Navigate(const QString&)","http://vk.com/"); Test->show(); }
Not help...
Excuse me, I find it hard to understand you, because I'm Russian ... -
@Tikitko
very strange!
I though showEvent would been same as clicked.
Try timer so that we first create after window fully shown.// in constructor
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(nowcreate()));
timer->start(4000);
}void MainWindow::nowcreate() << add this to .h also
{
qDebug() << "nowcreate";
// create here
QAxWidget *Test = new QAxWidget(this);
..
}