Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
865 Topics 3.4k Posts
  • PyQt5 blurpicker example

    Unsolved pyqt pyqt5 python3 python qtcreator
    5
    0 Votes
    5 Posts
    2k Views
    A
    Thank you! I didnt noticed that. I did correct this mistakes, but still getting the same error:( and empty window :/
  • How to move class method out of gui modul

    Moved Unsolved python
    35
    0 Votes
    35 Posts
    13k Views
    C
    Thanks for this useffull link.
  • Which you suggest PySide or PyQt? + Why?

    Moved Unsolved python
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, No special suggestions, the goal of both is to provide a complete set of bindings for the Qt modules. PySide2 information can be found here. If you need to start right now with Qt 5 and python, PyQt might be the current best option. I haven't tested Python for mobile application so I can't comment on that however there might be catches with the mobile platform development rules about using an interpreter that you should check.
  • Extreme confusion over Qthread and avoiding subclassing

    Unsolved
    2
    0 Votes
    2 Posts
    715 Views
    SGaistS
    Hi and welcome to devnet, Yes, do_work will be called in your thread. For such a use case, it's a bit overkill, QtConcurrent::run would likely be simpler and cleaner.
  • app.setStyleSheet performance

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, Putting your stylesheet at the application level (especially if the one your wrote) means that each and every widget might be customised which requires changing the style used to draw the widget. So you should be careful with what you put in your stylesheet.
  • What is this means? my code is running and working well

    Moved Solved
    14
    0 Votes
    14 Posts
    3k Views
    A
    @SGaist DATE_RECEIVED = self.date_received.text() i stop passing self.date_received.text() to DATE_RECEIVED and i do it in all of my variable
  • PyQt5 Events

    Unsolved python python3 pyqt5 pyqt pyqt4
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QWidget touch event

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    the_T
    What does " i have problem with touch events" mean in your case? ps: And please use code tags when posting code import foo from bar def foobar(): print("this is more readable") is much easier to read than import foo from bar def foobar(): print("this is not readable") ;)
  • Getting Started - downloading Designer

    Moved Unsolved python
    2
    0 Votes
    2 Posts
    938 Views
    SGaistS
    Hi and welcome to devnet, I'd recommend brining this to the PyQt forum. They'll be best to answer packaging related questions. Just in case, I saw the pyqt5-tools package that might be interest. Hope it helps
  • How to organize custom diagraming project with PyQt5?

    Moved Unsolved python
    3
    0 Votes
    3 Posts
    2k Views
    P
    @jsulm PyQt does indeed deploy to iOS. Acceptance is another issue. But aside from this, my question is really regarding best use of the Qt API for my project.
  • QSql refresh()?

    Moved Solved python
    18
    0 Votes
    18 Posts
    6k Views
    the_T
    Model is the QSqlQueryModel of your QTableView
  • What's wrong with my code?

    Moved Unsolved python
    19
    0 Votes
    19 Posts
    7k Views
    the_T
    @Gelo said in Whats wrong with my code!: self.query = QSqlQuery() self.query.prepare("SELECT username FROM users WHERE username = '%s' and password = '%s'"%(USERNAME,str(PASSWORD))) self.query.addBindValue(USERNAME) self.query.addBindValue(PASSWORD) I just wonder this works... did you read http://pyqt.sourceforge.net/Docs/PyQt4/qsqlquery.html for how to use prepare statement and binding values? To bind values to a prepared statement you need placeholders. According to the examples on http://pyqt.sourceforge.net/Docs/PyQt4/qsqlquery.html it should be done like this: Named binding using named placeholders: QSqlQuery query; query.prepare("INSERT INTO person (id, forename, surname) " "VALUES (:id, :forename, :surname)"); query.bindValue(":id", 1001); query.bindValue(":forename", "Bart"); query.bindValue(":surname", "Simpson"); query.exec(); Positional binding using named placeholders: QSqlQuery query; query.prepare("INSERT INTO person (id, forename, surname) " "VALUES (:id, :forename, :surname)"); query.bindValue(0, 1001); query.bindValue(1, "Bart"); query.bindValue(2, "Simpson"); query.exec(); Binding values using positional placeholders (version 1): QSqlQuery query; query.prepare("INSERT INTO person (id, forename, surname) " "VALUES (?, ?, ?)"); query.bindValue(0, 1001); query.bindValue(1, "Bart"); query.bindValue(2, "Simpson"); query.exec(); Binding values using positional placeholders (version 2): QSqlQuery query; query.prepare("INSERT INTO person (id, forename, surname) " "VALUES (?, ?, ?)"); query.addBindValue(1001); query.addBindValue("Bart"); query.addBindValue("Simpson"); query.exec();
  • What is the meaning of this?

    Moved Solved python
    4
    0 Votes
    4 Posts
    2k Views
    ?
    @jsulm Thank you already solve the problem ^_^
  • Is there any Function in PyQt4 that refresh Data Table?

    Moved Solved python
    3
    0 Votes
    3 Posts
    1k Views
    ?
    @the_ Thank you ! you help me a lot ! :) GodBless!
  • How can i pass my QLineEdit data into my database?

    Locked Moved Solved
    3
    0 Votes
    3 Posts
    2k Views
    SGaistS
    Hi, Indeed, as @the_ wrote, it looks like the same question. @Gelo please don't post the same questions in multiple sub forums, one is enough. Closing this one.
  • PyQt4 and MySQL I want to learn how to insert data using QLineEdit and QPushButton

    Moved Solved
    7
    0 Votes
    7 Posts
    5k Views
    ?
    @the_ Thank you so much for your help ^__^
  • Load an extensions for the QScriptEngine by subclass QScriptExtensionPlugin

    Solved
    2
    0 Votes
    2 Posts
    789 Views
    korut94K
    I solved the problem! Just puts the shared library into a directory named "script", inside the directory where the application binary is placed, and it's done. Sorry for the trivial issue :(.
  • PyQt4 and scip for python on Mac OS Sierra

    Moved Unsolved pyqt4
    4
    0 Votes
    4 Posts
    4k Views
    SGaistS
    The module name is PyQt4 case sensitive.
  • Using JOGL with QtJambi

    Unsolved qtjambi jogl java
    5
    0 Votes
    5 Posts
    2k Views
    S
    Thanks for the information. I tested on a Windows 7 virtual machine and it works. So I suppose you are right about a compatibility problem with Sierra. I'll contact the current dev team of QtJambi.
  • Where can I get sample qtjambi-deployment.xml?

    Moved
    3
    0 Votes
    3 Posts
    2k Views
    J
    I still got error. I tried to run this example: https://doc.qt.io/archives/qtjambi-4.5.2_01/com/trolltech/qt/qtjambi-hellowebkit-code.html I put your file to root folder of project (same where I have pom.xml and src directory.) Is this right place? Or what would you do with the following error? /usr/lib/jvm/java-8-oracle/bin/java -Djava.library.path=/home/rain/jthesis/org.eclipse.swt-3.3.2.jar -Didea.launcher.port=7532 -Didea.launcher.bin.path=/home/rain/idea-IU/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/rain/jthesis/target/classes:/home/rain/jthesis/qtjambi-4.8.7.jar:/home/rain/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.7.0/jackson-dataformat-csv-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.7.0/jackson-core-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.7.0/jackson-databind-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.7.0/jackson-annotations-2.7.0.jar:/home/rain/.m2/repository/org/projectlombok/lombok/1.16.6/lombok-1.16.6.jar:/home/rain/.m2/repository/info/cukes/gherkin/2.12.2/gherkin-2.12.2.jar:/home/rain/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/rain/idea-IU/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain HelloWebKit java.lang.RuntimeException: Loading library failed, progress so far: No 'qtjambi-deployment.xml' found in classpath, loading libraries via 'java.library.path' Loading library: 'libQtCore.so.4'... - using 'java.library.path' at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:615) at com.trolltech.qt.internal.NativeLibraryManager.loadQtLibrary(NativeLibraryManager.java:455) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:346) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:342) at com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:55) at com.trolltech.qt.internal.QtJambiObject.<clinit>(QtJambiObject.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122) Caused by: java.lang.RuntimeException: Library 'libQtCore.so.4' was not found in 'java.library.path=/home/rain/jthesis/org.eclipse.swt-3.3.2.jar' at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(NativeLibraryManager.java:673) at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:610) ... 8 more java.lang.RuntimeException: Loading library failed, progress so far: No 'qtjambi-deployment.xml' found in classpath, loading libraries via 'java.library.path' Loading library: 'libQtCore.so.4'... - using 'java.library.path' Loading library: 'libQtCore.so.4'... - using 'java.library.path' at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:615) at com.trolltech.qt.internal.NativeLibraryManager.loadQtLibrary(NativeLibraryManager.java:455) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:346) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:342) at com.trolltech.qt.core.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:8) at com.trolltech.qt.core.QObject.<clinit>(QObject.java:13) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122) Caused by: java.lang.RuntimeException: Library 'libQtCore.so.4' was not found in 'java.library.path=/home/rain/jthesis/org.eclipse.swt-3.3.2.jar' at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(NativeLibraryManager.java:673) at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:610) ... 8 more java.lang.RuntimeException: Loading library failed, progress so far: No 'qtjambi-deployment.xml' found in classpath, loading libraries via 'java.library.path' Loading library: 'libQtCore.so.4'... - using 'java.library.path' Loading library: 'libQtCore.so.4'... - using 'java.library.path' Loading library: 'libQtCore.so.4'... - using 'java.library.path' at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:615) at com.trolltech.qt.internal.NativeLibraryManager.loadQtLibrary(NativeLibraryManager.java:455) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:346) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:342) at com.trolltech.qt.gui.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:8) at com.trolltech.qt.gui.QWidget.<clinit>(QWidget.java:18) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122) Caused by: java.lang.RuntimeException: Library 'libQtCore.so.4' was not found in 'java.library.path=/home/rain/jthesis/org.eclipse.swt-3.3.2.jar' at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(NativeLibraryManager.java:673) at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:610) ... 8 more 64 /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/rain/jthesis/target/classes:/home/rain/jthesis/qtjambi-4.8.7.jar:/home/rain/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.7.0/jackson-dataformat-csv-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.7.0/jackson-core-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.7.0/jackson-databind-2.7.0.jar:/home/rain/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.7.0/jackson-annotations-2.7.0.jar:/home/rain/.m2/repository/org/projectlombok/lombok/1.16.6/lombok-1.16.6.jar:/home/rain/.m2/repository/info/cukes/gherkin/2.12.2/gherkin-2.12.2.jar:/home/rain/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/rain/idea-IU/lib/idea_rt.jar Process finished with exit code 0