Results 1 to 6 of 6

Thread: about qt dbus custom struct type

  1. #1
    Join Date
    Jun 2011
    Posts
    45
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default about qt dbus custom struct type

    Hi,all:
    I meet a serious problem about qt dbus data struct .I get a xml file ,then I would convert the xml to cpp and h files using qdbusxml2cpp.In the xml file ,there is a line of <arg name="arg1" type="a(iiiiisis)" direction="out"/>.In my types.h file I define a struct as
    typedef struct
    {
    int a;
    int b;
    int c;
    int d;
    int e;
    QString f;
    int g;
    QString h;
    } QccMap;
    Q_DECLARE_METATYPE(QccMap)

    then add <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QccMap"/> to the xml file . Then I run qdbusxml2cpp -p audiogateway.h:audiogateway.cpp -i types.h ../xml/audiogateway.xml .But I can't use the QueryCurrentCall to get a QccMap ,a error occur. audiogateway.xmlaudiogateway.xml,I attach my xml file .
    Thanks !

  2. #2
    Join Date
    Jun 2011
    Posts
    45
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: about qt dbus custom struct type

    no suggestion?

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: about qt dbus custom struct type

    What error? The method is "QueryCurrentCalls" not "QueryCurrentCall".

  4. The following user says thank you to ChrisW67 for this useful post:

    wshn13 (4th January 2012)

  5. #4
    Join Date
    Jun 2011
    Posts
    45
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: about qt dbus custom struct type

    Quote Originally Posted by ChrisW67 View Post
    What error? The method is "QueryCurrentCalls" not "QueryCurrentCall".
    I can't get the QueryCurrentCalls return value, because of the data type error.

  6. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: about qt dbus custom struct type

    I can't get the QueryCurrentCalls return value, because of the data type error.
    What error? Share it and the code that generates it with us. Otherwise we could keep guessing forever.

  7. #6
    Join Date
    Jun 2011
    Posts
    45
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: about qt dbus custom struct type

    Quote Originally Posted by ChrisW67 View Post
    What error? Share it and the code that generates it with us. Otherwise we could keep guessing forever.
    Well ,thanks,I will generates the error again ,then post it here.

Similar Threads

  1. invalid use of incomplete type 'struct MSG'
    By libed in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2019, 12:32
  2. Problems with marshalling a struct to Qt/DBus
    By laumann in forum Qt Programming
    Replies: 3
    Last Post: 21st January 2014, 10:40
  3. QSql - incomplete type 'struct QVariant'
    By UltramaticOrange in forum Newbie
    Replies: 2
    Last Post: 5th October 2010, 19:07
  4. error: invalid use of incomplete type 'struct QMetaEnum'
    By dyngoman in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2010, 13:38
  5. Replies: 1
    Last Post: 15th October 2007, 14:21

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.