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. Problem with mainwindow (the buttons desapear)

Problem with mainwindow (the buttons desapear)

Scheduled Pinned Locked Moved Solved General and Desktop
17 Posts 3 Posters 2.8k Views
  • 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 Offline
    B Offline
    BrunoVinicius
    wrote on last edited by BrunoVinicius
    #1

    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
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • B Offline
        B Offline
        BrunoVinicius
        wrote on last edited by
        #3

        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
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          0
          • B Offline
            B Offline
            BrunoVinicius
            wrote on last edited by
            #5

            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
            0
            • B Offline
              B Offline
              BrunoVinicius
              wrote on last edited by
              #6

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

              mrjjM 1 Reply Last reply
              0
              • B BrunoVinicius

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

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

                @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
                0
                • B Offline
                  B Offline
                  BrunoVinicius
                  wrote on last edited by
                  #8

                  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!

                  mrjjM 1 Reply Last reply
                  0
                  • B BrunoVinicius

                    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!

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

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

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      BrunoVinicius
                      wrote on last edited by
                      #10

                      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
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        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
                        0
                        • mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

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

                          1 Reply Last reply
                          0
                          • B Offline
                            B Offline
                            BrunoVinicius
                            wrote on last edited by
                            #13

                            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
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              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
                              0
                              • B Offline
                                B Offline
                                BrunoVinicius
                                wrote on last edited by
                                #15

                                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
                                0
                                • B Offline
                                  B Offline
                                  BrunoVinicius
                                  wrote on last edited by
                                  #16

                                  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
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by SGaist
                                    #17

                                    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
                                    0

                                    • Login

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups
                                    • Search
                                    • Get Qt Extensions
                                    • Unsolved