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. Controls Events
Forum Updated to NodeBB v4.3 + New Features

Controls Events

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 350 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.
  • J Offline
    J Offline
    jenya7
    wrote on last edited by
    #1

    In Visual Studio I place a button on a form and double click it - it creates MyButton_onClick event. How do I do it in Qt?

    sierdzioS 1 Reply Last reply
    0
    • J jenya7

      In Visual Studio I place a button on a form and double click it - it creates MyButton_onClick event. How do I do it in Qt?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @jenya7 said in Controls Events:

      How do I do it in Qt?

      In Qt Creator you mean? Right click->Go to slot->clicked()

      (Z(:^

      1 Reply Last reply
      2
      • J Offline
        J Offline
        jenya7
        wrote on last edited by jenya7
        #3

        OK. Created

        void MainWindow::on_ButtonOpenParamFile_clicked()
        {
            QMessageBox msgBox;
            msgBox.setText("Button Pressed");
        }
        

        But nothing happens on click.

        Sorry. Have to add msgBox.exec();

        1 Reply Last reply
        1
        • J Offline
          J Offline
          jenya7
          wrote on last edited by
          #4

          I failed to find Select File Dialog - is it exists?

          JonBJ 1 Reply Last reply
          0
          • J jenya7

            I failed to find Select File Dialog - is it exists?

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @jenya7
            I don't think Qt Creator (I don't use it) provides a drag-and-drop interface to creating one, but yes Qt provides a https://doc.qt.io/qt-5/qfiledialog.html. From code you call one of its methods, you may be able to get away with the https://doc.qt.io/qt-5/qfiledialog.html#static-public-members ones for simplest purposes.

            J 1 Reply Last reply
            2
            • JonBJ JonB

              @jenya7
              I don't think Qt Creator (I don't use it) provides a drag-and-drop interface to creating one, but yes Qt provides a https://doc.qt.io/qt-5/qfiledialog.html. From code you call one of its methods, you may be able to get away with the https://doc.qt.io/qt-5/qfiledialog.html#static-public-members ones for simplest purposes.

              J Offline
              J Offline
              jenya7
              wrote on last edited by
              #6

              @JonB said in Controls Events:

              @jenya7
              I don't think Qt Creator (I don't use it) provides a drag-and-drop interface to creating one, but yes Qt provides a https://doc.qt.io/qt-5/qfiledialog.html. From code you call one of its methods, you may be able to get away with the https://doc.qt.io/qt-5/qfiledialog.html#static-public-members ones for simplest purposes.

              Thank you.

              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