Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. HOw to display new windows
Qt 6.11 is out! See what's new in the release blog

HOw to display new windows

Scheduled Pinned Locked Moved Mobile and Embedded
16 Posts 5 Posters 11.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.
  • I Offline
    I Offline
    ifewalter
    wrote on last edited by
    #7

    you know funny thing is i've tried that parenting suggestion you justst gav, but it gave same error. I'll try the build thing again when i get home.

    Or maybe just reinstall qt. I the vode is seemingly ok.
    But that will be when i get home. I'm currently in transit from school.

    --Ifewalter--

    1 Reply Last reply
    0
    • ZlatomirZ Offline
      ZlatomirZ Offline
      Zlatomir
      wrote on last edited by
      #8

      You don't need to reinstall Qt, that won't solve the problem
      Also the parent isn't a solution for this compile error

      If you give a parent you will also need to tell Qt that you want formb to be a new window, this is because your formb inherits from QWidget and not from QMainWindow or QDialog.
      So complete code for slot is:
      @
      void forma:: on_ButtonName_clicked()
      {
      formb *j = new formb(this);
      j->setWindowFlags(Qt::Window); //this way you show your QWidget as a new window and pass a parent

      j->showMaximized();
      

      }
      @
      Put something inside formb and see without that line where it will appear

      https://forum.qt.io/category/41/romanian

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ifewalter
        wrote on last edited by
        #9

        thank you. I'll be sure to try that too and let you know what happens

        --Ifewalter--

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #10

          Are formb.h and formb.cpp added to your project file?

          The error message

          bq. undeclared reference formB::formB(QWidget*).

          leads me to the guess that formb.cpp is not compiled at all.

          You can post your .pro file, we can check.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • I Offline
            I Offline
            ifewalter
            wrote on last edited by
            #11

            tried all the above, same problem. Thanks guys. I'll like to concentrate my efforts on something else for now.

            --Ifewalter--

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #12

              Your setup is broken, the classes you have showed us are not complete (and erroneous too - wrong destructor name in forma.h). There's no chance to solve the problem from here.

              Good luck with your further debugging efforts.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TioRoy
                wrote on last edited by
                #13

                Same problem here. Simulator build/run ok and Device build not.

                @
                void MainWindow::on_actionAbout_triggered()
                {
                DialogAbout about(this);
                about.exec();
                }
                @

                My .pro:

                @
                #-------------------------------------------------

                Project created by QtCreator 2011-02-07T21:00:21

                #-------------------------------------------------

                QT += core gui

                TARGET = QTBible
                TEMPLATE = app

                SOURCES += main.cpp dialogabout.cpp mainwindow.cpp

                HEADERS += dialogabout.h
                mainwindow.h

                FORMS += dialogabout.ui
                mainwindow.ui

                OTHER_FILES +=
                Welcome.html
                Notes.txt

                RESOURCES +=
                resources.qrc

                @

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  TioRoy
                  wrote on last edited by
                  #14

                  ifewalter,

                  I was searching into log to discover some issue and found this:

                  @Configuration unchanged, skipping qmake step.@

                  I don't know why, but my dialog was not included in Makefile, because qmake creates the makefile, and it is not running!!!!

                  Solution: manual delete the Makefile (in your project dir). Doing a rebuild..... Voi lá.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on last edited by
                    #15

                    What exactly is the error?
                    just posting code is not very helpful and will not result in too many answers...

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      TioRoy
                      wrote on last edited by
                      #16

                      Gerof,

                      I've create a application, add a Dialog and write a code to show the dialog. Simple.
                      Compiling for simulator ok, but for device gives me an error (the same problem of first post):

                      @
                      /NokiaQtSDK/Symbian/SDK/EPOC32/BUILD/Quati/develop/Nokia/QTBible/QTBIBLE_0XE3918DBB/GCCE/UDEB/mainwindow.o: In function `MainWindow::on_actionAbout_triggered()':

                      /Quati/develop/Nokia/QTBible/mainwindow.cpp:91: undefined reference to `DialogAbout::DialogAbout(QWidget*)'

                      /Quati/develop/Nokia/QTBible/mainwindow.cpp:95: undefined reference to `DialogAbout::~DialogAbout()'

                      /Quati/develop/Nokia/QTBible/mainwindow.cpp:95: undefined reference to `DialogAbout::~DialogAbout()'

                      make[2]: *** [\NokiaQtSDK\Symbian\SDK\epoc32\release\gcce\udeb\QTBible.exe] Error 1

                      make[1]: *** [TARGETQTBIBLE_0XE3918DBB] Error 2

                      make[1]: Leaving directory `C:/Quati/develop/Nokia/QTBible'
                      @

                      I don't know what cause this. But Volker writes a clue:

                      [quote author="Volker" date="1296165540"]Are formb.h and formb.cpp added to your project file?

                      The error message

                      bq. undeclared reference formB::formB(QWidget*).

                      leads me to the guess that formb.cpp is not compiled at all.

                      You can post your .pro file, we can check.[/quote]

                      He was right: my dialogabout class was not compiling.

                      I've posted my .pro, but I know that information is not sufficient to resolve my problem.
                      So I decided to invetigate the log to find references of my class. But the first lines of log says:

                      @
                      Running build steps for project QTBible...
                      Configuration unchanged, skipping qmake step.
                      Starting: "C:/NokiaQtSDK/Symbian/SDK/epoc32/tools/make.exe" debug-gcce -w
                      C:\NokiaQtSDK\Symbian\SDK\epoc32\tools\make.exe: Entering directory `C:/Quati/develop/Nokia/QTBible'
                      .......
                      @

                      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