Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt example (World Time Clock Plugin Example ) Notification Error :could not find the executable please specify one
Forum Updated to NodeBB v4.3 + New Features

Qt example (World Time Clock Plugin Example ) Notification Error :could not find the executable please specify one

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 404 Views
  • 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.
  • S Offline
    S Offline
    SoheilSabz
    wrote on 27 Jun 2019, 10:11 last edited by SoheilSabz
    #1

    Hi:

    I need to learn more about using the ready and written widget into my new mainwindows or widgets, So I have reached to Custom Widget Plugin by this link descriptions and for example, I need to run this example :
    World Time Clock Plugin Example
    The file worldtimeclockplugin.pro is :

    #! [0]
    QT          += widgets uiplugin
    #! [0]
    
    QTDIR_build {
    # This is only for the Qt build. Do not use externally. We mean it.
    PLUGIN_TYPE = designer
    PLUGIN_CLASS_NAME = WorldTimeClockPlugin
    load(qt_plugin)
    CONFIG += install_ok
    } else {
    # Public example:
    
    TARGET      = $$qtLibraryTarget($$TARGET)
    #! [1]
    CONFIG     += plugin
    TEMPLATE    = lib
    #! [1]
    
    target.path = $$[QT_INSTALL_PLUGINS]/designer
    #target.path =/home/so/Qt/5.12.3/gcc_64/plugins/designer
    
    INSTALLS += target
    
    }
    
    #! [2]
    HEADERS     = worldtimeclock.h \
                  worldtimeclockplugin.h
    SOURCES     = worldtimeclock.cpp \
                  worldtimeclockplugin.cpp
    #! [2]
    

    alt text

    of Qt, but when i want to run it via relase mode i get The Could not find the executable please specify one notification :

    alt text

    So I found this instruction to solve this problem :

    It should be compiled that the plugin is not an executable file, so qt
    can't find a file that can be executed. The solution is: Solution

    Only "build" does not "run", in general, in order not to pollute the
    source code, a build folder will be created to store the compiled
    code, and then used in the build folder.

    Sudo make install
    

    now i went to the release folder :

    /home/so/Qt/Examples/Qt-5.12.3/designer/build-worldtimeclockplugin-Desktop_Qt_5_12_3_GCC_64bit2-Release/tras

    and I do sudo make install, I get this output:

    /home/so/Qt/5.12.3/gcc_64/bin/qmake -install qinstall -exe libworldtimeclockplugin.so /home/so/Qt/5.12.3/gcc_64/plugins/designer/libworldtimeclockplugin.so
    strip --strip-unneeded /home/so/Qt/5.12.3/gcc_64/plugins/designer/libworldtimeclockplugin.so
    

    It has created the libworldtimeclockplugin.so file and the folder is shown below:

    alt text

    but again I have the already notification.

    What should I do? how can I solve this problem?

    My stackoverflow question link is:

    https://stackoverflow.com/questions/56788796/qt-example-world-time-clock-plugin-example-notification-error-could-not-find

    J 1 Reply Last reply 27 Jun 2019, 12:05
    0
    • S SoheilSabz
      27 Jun 2019, 10:11

      Hi:

      I need to learn more about using the ready and written widget into my new mainwindows or widgets, So I have reached to Custom Widget Plugin by this link descriptions and for example, I need to run this example :
      World Time Clock Plugin Example
      The file worldtimeclockplugin.pro is :

      #! [0]
      QT          += widgets uiplugin
      #! [0]
      
      QTDIR_build {
      # This is only for the Qt build. Do not use externally. We mean it.
      PLUGIN_TYPE = designer
      PLUGIN_CLASS_NAME = WorldTimeClockPlugin
      load(qt_plugin)
      CONFIG += install_ok
      } else {
      # Public example:
      
      TARGET      = $$qtLibraryTarget($$TARGET)
      #! [1]
      CONFIG     += plugin
      TEMPLATE    = lib
      #! [1]
      
      target.path = $$[QT_INSTALL_PLUGINS]/designer
      #target.path =/home/so/Qt/5.12.3/gcc_64/plugins/designer
      
      INSTALLS += target
      
      }
      
      #! [2]
      HEADERS     = worldtimeclock.h \
                    worldtimeclockplugin.h
      SOURCES     = worldtimeclock.cpp \
                    worldtimeclockplugin.cpp
      #! [2]
      

      alt text

      of Qt, but when i want to run it via relase mode i get The Could not find the executable please specify one notification :

      alt text

      So I found this instruction to solve this problem :

      It should be compiled that the plugin is not an executable file, so qt
      can't find a file that can be executed. The solution is: Solution

      Only "build" does not "run", in general, in order not to pollute the
      source code, a build folder will be created to store the compiled
      code, and then used in the build folder.

      Sudo make install
      

      now i went to the release folder :

      /home/so/Qt/Examples/Qt-5.12.3/designer/build-worldtimeclockplugin-Desktop_Qt_5_12_3_GCC_64bit2-Release/tras

      and I do sudo make install, I get this output:

      /home/so/Qt/5.12.3/gcc_64/bin/qmake -install qinstall -exe libworldtimeclockplugin.so /home/so/Qt/5.12.3/gcc_64/plugins/designer/libworldtimeclockplugin.so
      strip --strip-unneeded /home/so/Qt/5.12.3/gcc_64/plugins/designer/libworldtimeclockplugin.so
      

      It has created the libworldtimeclockplugin.so file and the folder is shown below:

      alt text

      but again I have the already notification.

      What should I do? how can I solve this problem?

      My stackoverflow question link is:

      https://stackoverflow.com/questions/56788796/qt-example-world-time-clock-plugin-example-notification-error-could-not-find

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 27 Jun 2019, 12:05 last edited by
      #2

      @SoheilSabz If you're creating a plug-in for designer then you need to copy the final plug-in library to the same location where other designer plug--ins are. Also, you have to use same Qt version which was used to build your version of designer.

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

      1 Reply Last reply
      2

      1/2

      27 Jun 2019, 10:11

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved