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. Deleting Content From Main Window (Newb)
Qt 6.11 is out! See what's new in the release blog

Deleting Content From Main Window (Newb)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.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.
  • T Offline
    T Offline
    tzepo
    wrote on last edited by
    #1

    Hi All,

    Apologies for having to ask what could be perceived as a 'newbish' question.

    I'm fairly new to Qt and so will just go ahead and ask;

    What is the procedure for 'calling' new content into your main window? I have tried Googling this but it seems somewhat difficult to phrase

    Like any standard app, I want the main window to be fixed but the content inside to change on_Button_clicked for example. Currently all I can figure out how to do is generate a new 'window' - whereas in my case I just want to re-use the existing one with new buttons etc

    Once again, apologies if it's a somewhat trivial question

    Regards
    Tzepo

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What exactly would you like to change in your QMainWindow ? Show a different center widget ? Show a dialog ? Something else ?

      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
      • T Offline
        T Offline
        tzepo
        wrote on last edited by
        #3

        [quote author="SGaist" date="1424207695"]Hi and welcome to devnet,

        What exactly would you like to change in your QMainWindow ? Show a different center widget ? Show a dialog ? Something else ?[/quote]

        Hello!

        Thanks for reposnding.

        Apologies for my lack of eloquence with the phrasing of the question.

        What I'm asking is really basic but I fear I've overcomplicated it.

        I'm just wondering how I'd go by re-using my MainWindow so that, for example;

        I click on a Button on the MainWindow, but it loads a new page (in the same Window) but with different widgets etc

        Just wondering how I could call this?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Again, it depends but you have several tools like QStackedWidget if you simply want to change from one widget to another or QTabWidget.

          You should take a look at Qt's examples and demos, you'll probably find there something to get started

          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