Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved Problem with mainwindow (the buttons desapear)

    General and Desktop
    3
    17
    2223
    Loading More Posts
    • 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.
    • B
      BrunoVinicius last edited by BrunoVinicius

      Hello, i am new in Qt and i having a problem with the application that i am doing.
      This application has the mainwindow and a second window that open with a button in the mainwindow. When i run the program it compiles, but when i pass the mouse over a button, the window become white and the buttons desapear.
      I am using Qt creator 3.5.1.
      Based on Qt 5.5.1(MSVC 2013, 32 bits)
      My windows is 7 - 64 bits

      code of the mainwindow (posicionador_de_antenas)
      #include "posicionador_de_antenas.h"
      #include "ui_posicionador_de_antenas.h"
      #include "posicionador_manual_1.h"

      Posicionador_de_Antenas::Posicionador_de_Antenas(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::Posicionador_de_Antenas)
      {
      ui->setupUi(this);
      }

      Posicionador_de_Antenas::~Posicionador_de_Antenas()
      {
      delete ui;
      }

      void Posicionador_de_Antenas::on_pushButton_clicked()
      {
      Posicionador_Manual_1 pos_man;
      pos_man.setModal(true);
      pos_man.exec();
      }
      Figure of the problem
      error

      Thanks!!

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        Hi
        what does Posicionador_Manual_1 window look like?
        Its a qdialog type window?

        please show source for this class also.

        1 Reply Last reply Reply Quote 0
        • B
          BrunoVinicius last edited by

          Hi,

          Posicionador_Manual_1 have two buttons, one label and one doublespin box. I am setting the valour read in the box to a variable float when i press the button ok. The other button close this window. Here is the code:

          #include "posicionador_manual_1.h"
          #include "ui_posicionador_manual_1.h"
          #include "posicionador_de_antenas.h"

          Posicionador_Manual_1::Posicionador_Manual_1(QWidget *parent) :
          QDialog(parent),
          ui(new Ui::Posicionador_Manual_1)
          {
          ui->setupUi(this);
          }

          Posicionador_Manual_1::~Posicionador_Manual_1()
          {
          delete ui;
          }

          void Posicionador_Manual_1::on_pushButton_clicked()
          {
          float posicao = ui->doubleSpinBox->value();
          }

          Thanks!

          1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion last edited by

            Hi
            I don't see anything wrong with code.
            The picture you shown.
            Seems just to be Mainwindow.
            Not the Posicionador_Manual_1 dialog

            So the dialog do show?

            1 Reply Last reply Reply Quote 0
            • B
              BrunoVinicius last edited by

              That's the issue.
              The mainwindow turns white even when i do not click in any button, just pass the mouse over it.
              This is the two windows after the problem.
              I am suspecting of a problem with compatibility in my windows or something like that. i don't know for sure.

              error

              1 Reply Last reply Reply Quote 0
              • B
                BrunoVinicius last edited by

                Hi,

                i tried to do a simple window, with just one button to close this mainwindow and i am geting the same problem, the window turns white. I will reinstall my Qt with a an older version that have 64 bits version and see what happend.

                thank you anyway!!

                mrjj 1 Reply Last reply Reply Quote 0
                • mrjj
                  mrjj Lifetime Qt Champion @BrunoVinicius last edited by

                  @BrunoVinicius
                  Ok it does seem a bit strange.
                  Just moving mouse over window should not make it white/non responsive.

                  If you open any of the many examples. do they run?

                  1 Reply Last reply Reply Quote 0
                  • B
                    BrunoVinicius last edited by

                    I did not try exemples, but i followed some videos in youtube, and did just the same program the video shows, and give me the same error. Like you said, it does seem a bit strange.
                    when i reinstall the Qt, i will post the result.

                    Thanks!

                    mrjj 1 Reply Last reply Reply Quote 0
                    • mrjj
                      mrjj Lifetime Qt Champion @BrunoVinicius last edited by

                      @BrunoVinicius
                      ok before u reinstall,maybe try example just to see?

                      1 Reply Last reply Reply Quote 0
                      • B
                        BrunoVinicius last edited by

                        hi again,

                        like you said i tried some exemples and the same error. I tried childwidget, most basic impossible!!!

                        I try to install some older version, but i had problem with the compiler.
                        i don't know what to do anymore.

                        1 Reply Last reply Reply Quote 0
                        • SGaist
                          SGaist Lifetime Qt Champion last edited by

                          Hi,

                          What if you use the 64 bit version of Qt ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply Reply Quote 0
                          • mrjj
                            mrjj Lifetime Qt Champion last edited by

                            Also, make sure to try to disable your virus scanner for a moment to test.

                            1 Reply Last reply Reply Quote 0
                            • B
                              BrunoVinicius last edited by

                              Hi,

                              SGaist, i downloaded a Qt 5.0.2-msvc2012_64-x64-offline, but i had some problems with the compiler, because its not integrate, i assume. Do i need to desinstall my current version to install this one? And how i can configure the compiler?

                              mrjj, i do not have a antivirus runing in the moment, so that's is not the problem.

                              thanks a lot guys!!

                              1 Reply Last reply Reply Quote 0
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                Because that's a version for Visual Studio 2012 and you have 2013. You can't mix and match compilers on Windows, they are not compatible one with the other.

                                Just download the 64 bit Qt 5.5.1 for Visual Studio 2013

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply Reply Quote 0
                                • B
                                  BrunoVinicius last edited by

                                  Hello,

                                  i know it is not the topic problem but,
                                  i installed Qt 5.5.1 64 (MSVC2013) version, and know in Build and Run, Qt versions and Kits configurations have problem. In compilers, the program just detect Micrsoft Visual C++ Compiler 14.0. How i configure and do i have to install another program?

                                  Thanks

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    BrunoVinicius last edited by

                                    Hello again,

                                    i reinstall Qt, using "qt-opensource-windows-x86-mingw491_opengl-5.4.0" and works properly.
                                    Thanks anyaway guys.

                                    1 Reply Last reply Reply Quote 0
                                    • SGaist
                                      SGaist Lifetime Qt Champion last edited by SGaist

                                      Out of curiosity, did you by any chance change from Visual Studio 2013 to Visual Studio 2015 ?

                                      Also, why install an older version of Qt and not the current ?

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post