Results 1 to 4 of 4

Thread: toggle pushbutton between two windows

  1. #1
    Join Date
    Dec 2016
    Posts
    10
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default toggle pushbutton between two windows

    hey guys,

    i need your help , when i click on the pushbutton in the mainwindow (it must be toggled) it must change in the dialogue window as the selected one which is also a pushbutton...
    can u help me by changing color from one window to the other

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,775
    Thanks
    262
    Thanked 773 Times in 763 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: toggle pushbutton between two windows

    Create a slot in the dialog window and connect it to the QPushButton::toggled() signal of the button in your main window. In your slot, change whatever you need to change about the color of the other button depending on whether the "checked" parameter of the signal is true or false.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    CAFFRY (28th December 2016)

  4. #3
    Join Date
    Dec 2016
    Posts
    10
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default toogle between mainwindow and dialogue

    when i pressed the three buttons ,say just like selecting a channels...after selecting ,when i press start it must show the selected buttons in the next dialogue..which must be colored.
    help me by not using thread..



    help me with the sample code
    Last edited by CAFFRY; 28th December 2016 at 08:06.

  5. #4
    Join Date
    Dec 2016
    Posts
    10
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: toggle pushbutton between two windows

    can u sent me the code...plzz


    Added after 6 minutes:


    can u sent me the code...


    Added after 10 minutes:


    can u send me the code
    Last edited by CAFFRY; 28th December 2016 at 08:15.

Similar Threads

  1. QML Toggle Button
    By ChriD in forum Qt Quick
    Replies: 2
    Last Post: 26th January 2016, 13:37
  2. QSslSocket toggle certificates
    By raszewski in forum Qt Programming
    Replies: 5
    Last Post: 29th November 2012, 20:51
  3. Replies: 3
    Last Post: 29th April 2011, 09:54
  4. Replies: 2
    Last Post: 31st March 2011, 11:15
  5. How to toggle between 2 forms
    By safknw in forum Qt Programming
    Replies: 2
    Last Post: 13th May 2006, 11:34

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.