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. How to properly design a settings dialog?
QtWS25 Last Chance

How to properly design a settings dialog?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 5.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.
  • D Offline
    D Offline
    Deusdies
    wrote on 26 Mar 2012, 21:42 last edited by
    #1

    Hi,

    I'm writing a web scraper app and am currently designing a settings dialog. This is what it will look like:

    !http://i.imgur.com/doD9X.png!

    As you can see, there are several buttons at the top and clicking on each one brings the relevant settings page. Now how do I accomplish this? I mean, I've managed to do it by overlapping all the setting pages (having them at the same position), and then calling the .hide() (or .show()) function when the user clicks a button. I was just wondering if there was a better way to go about this.

    Oh by the way, I'm using PySide (Python's Qt bindings).

    Thanks
    Deusdies

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on 26 Mar 2012, 21:43 last edited by
      #2

      Look at [[doc:QStackedWidget]]

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Deusdies
        wrote on 26 Mar 2012, 21:49 last edited by
        #3

        Thanks for a fast reply, I just did look into it. Hmm it looks like I'd have to rewrite my dialog quite a bit in order to accomplish this.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on 26 Mar 2012, 21:53 last edited by
          #4

          Usually backing up and spending time to rewrite something correctly more than pays off for itself in the long run with saved time and energy spent having to work around a bad design.

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on 29 Mar 2012, 09:30 last edited by
            #5

            It should not be that much of a rewrite, actually. You just replace the way you make sure you show the right page at the right time, but the actual content of the pages can stay the same. I agree with mlong though: getting rid of design mistakes like these is generally well worth the effort.

            1 Reply Last reply
            0
            • ? This user is from outside of this forum
              ? This user is from outside of this forum
              Guest
              wrote on 29 Mar 2012, 11:04 last edited by
              #6

              Yep, if you already have the widgets you just add them to the stacked widget and you are good to go, if you followed OOP ethics there will be nothing to rewrite, if not, it will be a valuable lesson :P I mean if you really NEED to rewrite your code that would pretty much mean you have made a mess, going against the concepts of encapsulation and code reusability, which is always a bad idea.

              1 Reply Last reply
              0

              5/6

              29 Mar 2012, 09:30

              • Login

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