Results 1 to 2 of 2

Thread: How to change only part of an application with signals/button clicked?

  1. #1
    Join Date
    Dec 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to change only part of an application with signals/button clicked?

    Hi, I am really new in Qt and I am trying to make a window application which has search and go to date on top of the page, it always stays there, and buttons on the left, they change the middle of the page. I can't figure out how to do it since the whole mid area should change. And there is nothing in my .cpp file. Just a few lines of code. I choose window application when I first started the project. Is it true?
    Can you please help me about this? I only want to change the middle area completely as it is going to open like a new panel in Java but I don't know what it is in Qt. How can I do this when certain buttons are clicked?

    Sorry about my English.


    Added after 1 39 minutes:


    Any replies, please? I can't think Qt way, I mix it with Visual Studio & C#.

    I would be really happy if you can direct me to a link or video about how to do that
    Last edited by ada; 4th December 2010 at 16:14.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to change only part of an application with signals/button clicked?

    The "middle of the page" sounds like a candidate for a QStackedWidget with the "buttons on the left" switching between pages of the stacked widget. The equivalent of a Java panel would be, I assume, a QWidget with a layout of subordinate widgets. The code to construct the UI that you are looking for is generated on your behalf from the UI file created by Designer (which I assume you are using). Behaviours associated with the widget events in your UI are yours to write. You need to read the signals and slots information in the Assistant manuals.

Similar Threads

  1. Replies: 6
    Last Post: 21st August 2010, 21:09
  2. Replies: 5
    Last Post: 10th July 2009, 12:11
  3. button background color when it is clicked
    By navi1084 in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2008, 15:02
  4. I want to change color of a part of QGraphicsLineItem
    By validator in forum Qt Programming
    Replies: 1
    Last Post: 17th September 2008, 10:01
  5. Replies: 10
    Last Post: 6th July 2008, 09:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.