Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. shiboken2 compiles
Qt 6.11 is out! See what's new in the release blog

shiboken2 compiles

Scheduled Pinned Locked Moved Solved Qt for Python
pyside2pythonqt for python
2 Posts 2 Posters 671 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.
  • W Offline
    W Offline
    wwms
    wrote on last edited by
    #1

    I want to compile my c++ module with shiboken2

    this is my c++ header file

    #ifndef ZIPSMODULE_ZIPFILES_H
    #define ZIPSMODULE_ZIPFILES_H
    
    #include <QObject>
    #include <QString>
    
    class ZipFiles : QObject
    {
    Q_OBJECT
    	ZipFiles(QString sevenz_dll_path, QString zip_file_path, int volume_size);
    	~ZipFiles();
    
    public:
    	bool zipFilesWithInOut(std::map<std::wstring, std::wstring> &zipped_file);
    
    private:
    	void progressCallback(uint64_t progress_size);
    
    signals:
    	void progress_value(uint64_t progress_size, uint64_t total_size);
    
    private:
    	int _volume_size;
    	QString _7z_dll_path;
    	QString _zip_file_path;
    	uint64_t _total_size;
    };
    
    #endif //ZIPSMODULE_ZIPFILES_H
    

    this is my bindings.xml file

    <?xml version="1.0"?>
    <typesystem package="zipFilesModule">
        <load-typesystem name="typesystem_core.xml" generate="no"/>
        <load-typesystem name="core_common.xml" generate="no"/>
        <load-typesystem name="typesystem_core_common.xml" generate="no"/>
        <load-typesystem name="typesystem_printsupport.xml" generate="no"/>
        <primitive-type name="bool"/>
        <primitive-type name="qstring"/>
        <primitive-type name="int"/>
        <primitive-type name="std::map"/>
    
        <object-type name="ZipFiles">
        </object-type>
    </typesystem>
    

    then I compiles it, success

    but when I load it in python, it is has some errors,
    7faeec9a-c0cb-4c69-b18f-933ec2e7135a-image.png
    how could I solve this proplem

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You do not have a constructor without argument.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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