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. Dynamically creating window
Forum Updated to NodeBB v4.3 + New Features

Dynamically creating window

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 3 Posters 2.6k 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.
  • M Offline
    M Offline
    Mylavarapu.Manikanta
    wrote on last edited by
    #1

    Hi all.
    In main window after clicking "graph" button, one window(like dialog) dynamically to be created and it will come like a popup, in that i have to create two splitter windows. In each splitter window some waveforms(like sine,square) has to be drawn.

    How can i do this in qt 5.5? please tell me the solution

    jsulmJ 1 Reply Last reply
    0
    • M Mylavarapu.Manikanta

      Hi all.
      In main window after clicking "graph" button, one window(like dialog) dynamically to be created and it will come like a popup, in that i have to create two splitter windows. In each splitter window some waveforms(like sine,square) has to be drawn.

      How can i do this in qt 5.5? please tell me the solution

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Mylavarapu.Manikanta http://doc.qt.io/qt-5/qdialog.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      1
      • jsulmJ jsulm

        @Mylavarapu.Manikanta http://doc.qt.io/qt-5/qdialog.html

        M Offline
        M Offline
        Mylavarapu.Manikanta
        wrote on last edited by
        #3

        Thanks jsulm.

        But How to create a splitter widget in a dialog?

        jsulmJ 1 Reply Last reply
        0
        • M Mylavarapu.Manikanta

          Thanks jsulm.

          But How to create a splitter widget in a dialog?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Mylavarapu.Manikanta Subclass QDialog and implement what ever you need there.
          There is no difference in creating a splitter in a dialog compared to a widget. See http://doc.qt.io/qt-5/qsplitter.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          VRoninV 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Mylavarapu.Manikanta Subclass QDialog and implement what ever you need there.
            There is no difference in creating a splitter in a dialog compared to a widget. See http://doc.qt.io/qt-5/qsplitter.html

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by VRonin
            #5

            @jsulm said in Dynamically creating window:

            Subclass QDialog

            You dont even have to do that:

            QDialog dialog;
            QVBoxLayout* dialogLay = new QVBoxLayout(&dialog);
            QDialogButtonBox* diagButton =new QDialogButtonBox(QDialogButtonBox::Ok,&dialog);
            QSplitter* splitter = new QSplitter(Qt::Horizontal,&dialog);
            splitter->addWidget(new QLabel("I'm a label",&dialog));
            splitter->addWidget(new QLabel("I'm a label too",&dialog));
            dialogLay->addWidget(splitter);
            dialogLay->addWidget(diagButton);
            dialog.exec();
            

            P.S.
            If you want to be that guy you should avoid allocating QDialog on the stack like I did, see https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            M 1 Reply Last reply
            2
            • VRoninV VRonin

              @jsulm said in Dynamically creating window:

              Subclass QDialog

              You dont even have to do that:

              QDialog dialog;
              QVBoxLayout* dialogLay = new QVBoxLayout(&dialog);
              QDialogButtonBox* diagButton =new QDialogButtonBox(QDialogButtonBox::Ok,&dialog);
              QSplitter* splitter = new QSplitter(Qt::Horizontal,&dialog);
              splitter->addWidget(new QLabel("I'm a label",&dialog));
              splitter->addWidget(new QLabel("I'm a label too",&dialog));
              dialogLay->addWidget(splitter);
              dialogLay->addWidget(diagButton);
              dialog.exec();
              

              P.S.
              If you want to be that guy you should avoid allocating QDialog on the stack like I did, see https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0

              M Offline
              M Offline
              Mylavarapu.Manikanta
              wrote on last edited by
              #6

              Thank you VRonin.

              Can you tell me how can i plot graphs in qt 5.5.
              Can i use QWT or some thing else?
              Please tell me

              jsulmJ VRoninV 2 Replies Last reply
              0
              • M Mylavarapu.Manikanta

                Thank you VRonin.

                Can you tell me how can i plot graphs in qt 5.5.
                Can i use QWT or some thing else?
                Please tell me

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Mylavarapu.Manikanta What about Qt Charts?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • M Mylavarapu.Manikanta

                  Thank you VRonin.

                  Can you tell me how can i plot graphs in qt 5.5.
                  Can i use QWT or some thing else?
                  Please tell me

                  VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by VRonin
                  #8

                  Qwt if you need LGPL license
                  Qt Charts or KD Charts if you are ok with GPL license

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  M 1 Reply Last reply
                  1
                  • VRoninV VRonin

                    Qwt if you need LGPL license
                    Qt Charts or KD Charts if you are ok with GPL license

                    M Offline
                    M Offline
                    Mylavarapu.Manikanta
                    wrote on last edited by
                    #9

                    Thank you VRonin.
                    I installed QWT4.2 for QT 5.5 in windows os.
                    My doubt is how can i add QWT functions in my qt project.

                    jsulmJ 1 Reply Last reply
                    0
                    • M Mylavarapu.Manikanta

                      Thank you VRonin.
                      I installed QWT4.2 for QT 5.5 in windows os.
                      My doubt is how can i add QWT functions in my qt project.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Mylavarapu.Manikanta I googled for "qwt example" and found this: https://github.com/berndporr/qwt-example

                      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