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. Designing in QtCreator.
Forum Updated to NodeBB v4.3 + New Features

Designing in QtCreator.

Scheduled Pinned Locked Moved General and Desktop
13 Posts 5 Posters 4.6k 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.
  • K Offline
    K Offline
    Ketan Shah
    wrote on last edited by
    #4

    Hi,

    Thanks for your reply.
    Actually my main window consists of many UI elements.
    So while designing I am unable to locate that element which I want to edit/design/modify as there are many elements on top of each other.
    What I want to know is while editing a particular element is there any way that can hide all other elements?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goblincoding
      wrote on last edited by
      #5

      [quote author="Ketan Shah" date="1358329825"]Hi,
      Thanks for your reply.
      Actually my main window consists of many UI elements.
      So while designing I am unable to locate that element which I want to edit/design/modify as there are many elements on top of each other.[/quote]

      Could you post a screenshot of what you mean? I find it hard to visualise your problem.

      [quote author="Ketan Shah" date="1358329825"]What I want to know is while editing a particular element is there any way that can hide all other elements?[/quote]

      Not as far as I know...

      http://www.goblincoding.com

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QMartin
        wrote on last edited by
        #6

        Hello!

        I think you can do it with "foreach":http://doc.qt.digia.com/qt/containers.html#the-foreach-keyword, looking for all widgets except the current one, and calling ->hide() on every other. Maybe something like

        @foreach (QWidget *widget, QApplication::topLevelWidgets())
        {
        if (!wigdet->hasFocus())
        widget->hide();
        }@

        Hope it helps.

        Regards

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          QMartin
          wrote on last edited by
          #7

          Mmmm sorry, you want to do it before execution? I agree with goblincoding, the most similar thing to that is to disable every widget, but they aren't hidden.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Ketan Shah
            wrote on last edited by
            #8

            !http://s13.postimage.org/4mrrvmjxz/test.pnghttp://(Test)!

            I have uploaded the screenshot of my Ui file, please check it.
            The Ui file consists of 3 groupboxes, each groupbox contains some elements.
            The problem is when I want to modify/redesign GroupBox1, I am not able to see it.
            So my question is how can I hide GroupBox and GroupBox2, when I want to redesign GroupBox1? The same goes for other elements too.
            Hope now my question is clear.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goblincoding
              wrote on last edited by
              #9

              OK, now it all makes sense. Your problem is that you aren't making use of Qt's layout system. Have a look at the "widgets and layouts":https://qt-project.org/doc/qt-4.8/widgets-and-layouts.html documentation and pay special attention to "layout management":https://qt-project.org/doc/qt-4.8/layout.html

              That should help you solve your problem :)

              EDIT: If you really want to have widgets "on top of each other", have a look at "QStackedWidget":https://qt-project.org/doc/qt-4.8/qstackedwidget.html

              http://www.goblincoding.com

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pke62
                wrote on last edited by
                #10

                Or even "QStackedLayout":http://qt-project.org/doc/qt-4.8/qstackedlayout.html.

                • Phil
                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  Ketan Shah
                  wrote on last edited by
                  #11

                  Hi,

                  Thanks @goblincoding and @pke62 for your replies. It worked.
                  But now I have one more problem while using QStackedWidget.
                  How can I hide the borders of QStackedWidget that appears on all the four sides of it?

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

                    If I understand you correctly, it sounds as if you still aren't using layouts correctly, please see "this previous post":https://qt-project.org/forums/viewthread/23776/#110704 for links to more information.

                    http://www.goblincoding.com

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      pke62
                      wrote on last edited by
                      #13

                      [quote author="goblincoding" date="1358514448"] If you really want to have widgets "on top of each other", have a look at "QStackedWidget":https://qt-project.org/doc/qt-4.8/qstackedwidget.html[/quote]

                      In the documentation for QStackedWidget referenced above by goblincoding, look for:

                      setFrameShadow ( Shadow )
                      setFrameShape ( Shape )
                      setFrameStyle ( int )

                      • Phil
                      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