Skip to content
QtWS25 Call for Papers
  • 0 Votes
    7 Posts
    812 Views
    fcarneyF

    You could create a standardized set of mule objects based upon QObject that handle signals of different data types. Then add the appropriate ones to the classes that need them as members or inherit them. Create callbacks that are called by these mule objects with the behavior needed from each class or other structure. If you don't inherit from them you can still use templates on the objects that own the QObjects if you need to simply other boiler plate code.

    I needed the opposite the other day. I had templated classes I wanted to add signals to. So I created a data member mule QObject.

    Edit: One problem with this approach is that object properties would not be unique. Not sure how to get around that.

  • 0 Votes
    7 Posts
    3k Views
    JKSHJ

    @Belkacem said in Qt gui C++ to read other controllers memory location through ethernet tcp/ip address:

    Can you give more information on how to establish a communication between the PC and the PLC.

    Hi, and welcome!

    First, you must tell us what communication protocols are supported by your PLC.

  • 0 Votes
    21 Posts
    8k Views
    M

    @DoughBoy
    The following SQL, with the Chinook test database open will create a new file in the same directory named 'out.sqlite' holding all of the album information for artist 51 with the original table layout.

    A Qt model is totally unnecessary. Just run the query and it will create your file. From there you can compress it and ship it.

    ATTACH DATABASE 'out.sqlite' AS outdb; CREATE TABLE outdb.album AS SELECT * from album WHERE ArtistId = 51; DETACH DATABASE outdb;

    It does use SQLite specific sql.

    Note especially that the ATTACH DATABASE and DETACH DATABASE are sql to be sent to the database just like the CREATE TABLE..

    BTW, I have never done this using Qt, only in batch files, but I see no reason for it not to work both ways.

    Mike