Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. FramelessWindowHint freezes form with QAxWidget
Forum Updated to NodeBB v4.3 + New Features

FramelessWindowHint freezes form with QAxWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
qaxwidgetframelesswindowbug
24 Posts 3 Posters 12.3k 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.
  • TikitkoT Tikitko

    I do everything on pure paper for the test...
    i create 2 example photo:
    no initialized qAxWidget
    initialized qAxWidget

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #4

    @Tikitko
    Ok, but in both cases, its included in the UI from start?
    It seems once active it dont like FramelessWindowHint

    I would look in
    https://bugreports.qt.io/secure/Dashboard.jspa

    and also test if you insert from code only
    not having it in UI .

    TikitkoT 1 Reply Last reply
    0
    • mrjjM mrjj

      @Tikitko
      Ok, but in both cases, its included in the UI from start?
      It seems once active it dont like FramelessWindowHint

      I would look in
      https://bugreports.qt.io/secure/Dashboard.jspa

      and also test if you insert from code only
      not having it in UI .

      TikitkoT Offline
      TikitkoT Offline
      Tikitko
      wrote on last edited by
      #5

      @mrjj
      I tried so

      MainWindow::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();
      }
      
      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #6

        @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 setup

        and not have it in UI.
        just to test.

        TikitkoT 1 Reply Last reply
        0
        • mrjjM mrjj

          @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 setup

          and not have it in UI.
          just to test.

          TikitkoT Offline
          TikitkoT Offline
          Tikitko
          wrote on last edited by Tikitko
          #7

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

          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #8

            well my "theory" is that
            if QAxWidget is assigned to a parent before FramelessWindowHint
            then bug comes.

            TikitkoT 1 Reply Last reply
            0
            • mrjjM mrjj

              well my "theory" is that
              if QAxWidget is assigned to a parent before FramelessWindowHint
              then bug comes.

              TikitkoT Offline
              TikitkoT Offline
              Tikitko
              wrote on last edited by Tikitko
              #9

              @mrjj Then the solution is not to create QAxWidget in the constructor?

              mrjjM 1 Reply Last reply
              0
              • TikitkoT Tikitko

                @mrjj Then the solution is not to create QAxWidget in the constructor?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #10

                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.

                }

                TikitkoT 1 Reply Last reply
                0
                • mrjjM mrjj

                  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.

                  }

                  TikitkoT Offline
                  TikitkoT Offline
                  Tikitko
                  wrote on last edited by
                  #11

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

                  mrjjM 1 Reply Last reply
                  0
                  • TikitkoT Tikitko

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

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    @Tikitko
                    Hi, np. That was what i wanted to test.

                    So if we create it before windows is fully shown we get bug?

                    But if you create in button_click , it works?

                    TikitkoT 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @Tikitko
                      Hi, np. That was what i wanted to test.

                      So if we create it before windows is fully shown we get bug?

                      But if you create in button_click , it works?

                      TikitkoT Offline
                      TikitkoT Offline
                      Tikitko
                      wrote on last edited by
                      #13

                      @mrjj Yes, once checked, it is so ...

                      mrjjM 1 Reply Last reply
                      0
                      • TikitkoT Tikitko

                        @mrjj Yes, once checked, it is so ...

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #14

                        @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);
                        ..
                        }

                        TikitkoT 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @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);
                          ..
                          }

                          TikitkoT Offline
                          TikitkoT Offline
                          Tikitko
                          wrote on last edited by
                          #15

                          @mrjj This work!

                          mrjjM 1 Reply Last reply
                          1
                          • TikitkoT Tikitko

                            @mrjj This work!

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            @Tikitko
                            ok
                            so window must be fully shown to make it happy.
                            Good testing :)

                            TikitkoT 1 Reply Last reply
                            0
                            • mrjjM mrjj

                              @Tikitko
                              ok
                              so window must be fully shown to make it happy.
                              Good testing :)

                              TikitkoT Offline
                              TikitkoT Offline
                              Tikitko
                              wrote on last edited by Tikitko
                              #17

                              @mrjj Thank you very much for your help! So show window, and then create a widget ... So still the question, it is a bug Qt or something else? The problem can be considered solved only in the bug tracker you need to add ...

                              mrjjM 1 Reply Last reply
                              0
                              • TikitkoT Tikitko

                                @mrjj Thank you very much for your help! So show window, and then create a widget ... So still the question, it is a bug Qt or something else? The problem can be considered solved only in the bug tracker you need to add ...

                                mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by
                                #18

                                @Tikitko
                                You are most welcome.
                                well I think its a bug but not sure.
                                When bug comes, it seems to me it hangs. That seems like bug.

                                Oh I forgot to ask.
                                What is {8856f961-340a-11d0-a96b-00c04fd705a2} ?

                                TikitkoT 2 Replies Last reply
                                0
                                • mrjjM mrjj

                                  @Tikitko
                                  You are most welcome.
                                  well I think its a bug but not sure.
                                  When bug comes, it seems to me it hangs. That seems like bug.

                                  Oh I forgot to ask.
                                  What is {8856f961-340a-11d0-a96b-00c04fd705a2} ?

                                  TikitkoT Offline
                                  TikitkoT Offline
                                  Tikitko
                                  wrote on last edited by
                                  #19

                                  @mrjj this is Internet Explorer but in any case, the error with any object in QAxWidget...

                                  1 Reply Last reply
                                  1
                                  • mrjjM mrjj

                                    @Tikitko
                                    You are most welcome.
                                    well I think its a bug but not sure.
                                    When bug comes, it seems to me it hangs. That seems like bug.

                                    Oh I forgot to ask.
                                    What is {8856f961-340a-11d0-a96b-00c04fd705a2} ?

                                    TikitkoT Offline
                                    TikitkoT Offline
                                    Tikitko
                                    wrote on last edited by
                                    #20

                                    @mrjj Hello, another mament noticed everything was decided widget loading after displaying the window, but if you minimize the window and deploy the freeze button again ...

                                    mrjjM 1 Reply Last reply
                                    0
                                    • TikitkoT Tikitko

                                      @mrjj Hello, another mament noticed everything was decided widget loading after displaying the window, but if you minimize the window and deploy the freeze button again ...

                                      mrjjM Offline
                                      mrjjM Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #21

                                      @Tikitko
                                      Ehh. not sure I read that correctly.

                                      You say that if made with button, then bug dont show, but if you minimize and maxi window again, bug comes back?

                                      TikitkoT 1 Reply Last reply
                                      0
                                      • mrjjM mrjj

                                        @Tikitko
                                        Ehh. not sure I read that correctly.

                                        You say that if made with button, then bug dont show, but if you minimize and maxi window again, bug comes back?

                                        TikitkoT Offline
                                        TikitkoT Offline
                                        Tikitko
                                        wrote on last edited by
                                        #22

                                        @mrjj If i minimize a window, and deploy it, the problem returns

                                        mrjjM 1 Reply Last reply
                                        0
                                        • TikitkoT Tikitko

                                          @mrjj If i minimize a window, and deploy it, the problem returns

                                          mrjjM Offline
                                          mrjjM Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #23

                                          Ok
                                          Have you tried with Qt 5.5 ?
                                          Maybe QAxWidget has bug in 5.6

                                          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