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. Qt/C++ The influence of the mainwidon button, to the buttons in the second window.
Forum Updated to NodeBB v4.3 + New Features

Qt/C++ The influence of the mainwidon button, to the buttons in the second window.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 279 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.
  • B Offline
    B Offline
    BarbarBarabasz
    wrote on last edited by
    #1

    Hello, i dont know how figure it out.
    I have push button in my mainWindow, and few buttons in secDialog.
    I want change button status in secDialog, when i click button in mainWindow.
    When i click button in mainWindow, i want set for example visibilty buttons in secDialog.
    Somebody can help me with my problem?

    jsulmJ 1 Reply Last reply
    0
    • B BarbarBarabasz

      Hello, i dont know how figure it out.
      I have push button in my mainWindow, and few buttons in secDialog.
      I want change button status in secDialog, when i click button in mainWindow.
      When i click button in mainWindow, i want set for example visibilty buttons in secDialog.
      Somebody can help me with my problem?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @BarbarBarabasz said in Qt/C++ The influence of the mainwidon button, to the buttons in the second window.:

      Somebody can help me with my problem?

      Hi and welcome!
      Use https://doc.qt.io/qt-5/signalsandslots.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      5
      • mr ZXM Offline
        mr ZXM Offline
        mr ZX
        wrote on last edited by
        #3

        hi bro its so easy
        u first in secDialog create a slot/method for examle:

        clsass secDialog:..
        {
        ...
        public:
         void setBtn(QString btnName,bool vis){
        //... write a sloution to show or hide a button with btnName and vis
        }
        

        so u create a object from seDalog in MainWindow and call method :

        mainwindow()//constructor
        {
         * dlg=new secDialog();
        }
        
        void btnClicked(){
        dlg->setBtn("btnxxx",false);
        }
        }
        

        good luck

        1 Reply Last reply
        1
        • B Offline
          B Offline
          BarbarBarabasz
          wrote on last edited by
          #4

          Thanks homies!!
          I will try this in home.
          Thanks for the fast response :)

          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