Skip to content
Qt 6.12 LTS is out! See what's new in the release blog
  • Pireal 2.0.2 - Educational tool for working with RA

    Unsolved Announcements qml pyqt python qt5 database
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Implementing QThread into code

    Moved Solved Language Bindings python
    5
    0 Votes
    5 Posts
    3k Views
    C
    Problem solved with mooving to PyQtGraph. Thanks for help. Vlado import pyqtgraph as pg OUT_Buffer_Time = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26] # 26 spominskih mest OUT_Buffer_Zg = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # 26 spominskih mest OUT_Buffer_Sp = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # 26 spominskih mest def simple_graph(): H = pg.plot(OUT_Buffer_Time, OUT_Buffer_Zg, pen='b') H.plot(OUT_Buffer_Time, OUT_Buffer_Zg, pen=(255, 0, 0)) H.plot(OUT_Buffer_Time, OUT_Buffer_Sp, pen=(0, 255, 200))
  • python error with debugger -yet again

    Unsolved Installation and Deployment mingw debugger python error
    2
    0 Votes
    2 Posts
    2k Views
    the_T
    @Technologist Which python and mingw version do you use?
  • 0 Votes
    3 Posts
    2k Views
    ?
    Hello @mrjj : In my main window, I call to launch my pop-up window : def show(self): self.project.load() if self.project.tranus_project: self.tranus_folder.setText(self.project.tranus_project.path) self.activate_launch_button() self.launch_options_TRANUS() super(OptionsTRANUSDialog, self).show() ...... def launch_options_TRANUS(self): self.get_checked_list() if self.checked_list != [] : dialog = launch_tranus_dialog.LaunchTRANUSDialog(self.checked_list,self.folder,self.tranus_binaries,parent=self) dialog.show() result = dialog.exec_() self.reinitialise_checked_list() The class of my pop-up window is defined as : class LaunchTRANUSDialog(QtGui.QDialog, FORM_CLASS): def __init__(self,checked_list,project_directory,tranus_bin_path,parent=None): """Constructor.""" super(LaunchTRANUSDialog, self).__init__(parent) self.setupUi(self) self.project = parent.project self.proj = QgsProject.instance() self.tranus_bin_path = tranus_bin_path self.project_directory = project_directory self.project = parent.project self.checked_list = checked_list self.is_all_checked = False self.tabs = self.findChild(QtGui.QTabWidget, 'tabWidget') self.proj = QgsProject.instance() #control actions self.tabs.blockSignals(True) self.tabs.currentChanged.connect(self.onChange) self.tabs.blockSignals(False) def show(self): self.put_tabs() super(LaunchTRANUSDialog, self).show()
  • 0 Votes
    10 Posts
    11k Views
    P
    @mrjj no, a callback is just the nomenclature you use to describe functions passed as arguments to other functions to be invoked later.
  • 0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, QSignalMapper might be what you are looking for.
  • TypeError: __init__() takes at least 2 arguments (2 given)

    Moved Solved Language Bindings python
    4
    0 Votes
    4 Posts
    5k Views
    ?
    Hello, It was an other problem that causes this problem. So, I solved and now it works. Thanks .
  • Import error : cannot import name OptionsTRANUSDialog

    Moved Unsolved Language Bindings python
    7
    0 Votes
    7 Posts
    5k Views
    ?
    For more information, here is the error that I get : Couldn't load plugin OptionsTRANUS due to an error when calling its classFactory() method ImportError: cannot import name OptionsTRANUSDialog Traceback (most recent call last): File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 333, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/emna/.qgis2/python/plugins\OptionsTRANUS__init__.py", line 34, in classFactory from .Options_TRANUS import OptionsTRANUS File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/emna/.qgis2/python/plugins\OptionsTRANUS\Options_TRANUS.py", line 30, in from .OptionsTRANUS_project import OptionsTRANUSProject File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/emna/.qgis2/python/plugins\OptionsTRANUS\OptionsTRANUS_project.py", line 24, in from .Options_TRANUS_dialog import OptionsTRANUSDialog File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/emna/.qgis2/python/plugins\OptionsTRANUS\Options_TRANUS_dialog.py", line 29, in from .launch_tranus_dialog import LaunchTRANUSDialog File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/emna/.qgis2/python/plugins\OptionsTRANUS\launch_tranus_dialog.py", line 7, in from .Options_TRANUS_dialog import OptionsTRANUSDialog ImportError: cannot import name OptionsTRANUSDialog Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.18.3 Las Palmas, 77b8c3d Python Path: C:/OSGEO4~1/apps/qgis/./python C:/Users/emna/.qgis2/python C:/Users/emna/.qgis2/python/plugins C:/OSGEO4~1/apps/qgis/./python/plugins C:\OSGEO4~1\apps\Python27\lib\site-packages\setuptools-0.9.8-py2.7.egg C:\OSGEO4~1\bin\python27.zip C:\OSGEO4~1\apps\Python27\DLLs C:\OSGEO4~1\apps\Python27\lib C:\OSGEO4~1\apps\Python27\lib\plat-win C:\OSGEO4~1\apps\Python27\lib\lib-tk C:\OSGEO4~1\bin C:\OSGEO4~1\apps\Python27 C:\OSGEO4~1\apps\Python27\lib\site-packages C:\OSGEO4~1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg C:\OSGEO4~1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg C:\OSGEO4~1\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg C:/Users/emna/.qgis2//python
  • 0 Votes
    5 Posts
    7k Views
    C
    Hay i saw your keyboard its really good, i also want to design this kind of keyboard, can you please tell me when i move the cursor on the keys it automatically enlarge. how is it possible ? and another one is, when i am typing it does not show anything but my only cursor move forward.
  • PyQt5 blurpicker example

    Unsolved Language Bindings pyqt pyqt5 python3 python qtcreator
    5
    0 Votes
    5 Posts
    3k Views
    A
    Thank you! I didnt noticed that. I did correct this mistakes, but still getting the same error:( and empty window :/
  • Which you suggest PySide or PyQt? + Why?

    Moved Unsolved Language Bindings python
    2
    0 Votes
    2 Posts
    2k 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.
  • How to move class method out of gui modul

    Moved Unsolved Language Bindings python
    35
    0 Votes
    35 Posts
    31k Views
    C
    Thanks for this useffull link.
  • PyQt5 Events

    Unsolved Language Bindings python python3 pyqt5 pyqt pyqt4
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Getting Started - downloading Designer

    Moved Unsolved Language Bindings python
    2
    0 Votes
    2 Posts
    1k 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 Language Bindings python
    3
    0 Votes
    3 Posts
    3k 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 Language Bindings python
    18
    0 Votes
    18 Posts
    9k Views
    the_T
    Model is the QSqlQueryModel of your QTableView
  • What is the meaning of this?

    Moved Solved Language Bindings python
    4
    0 Votes
    4 Posts
    3k Views
    ?
    @jsulm Thank you already solve the problem ^_^
  • What's wrong with my code?

    Moved Unsolved Language Bindings python
    19
    0 Votes
    19 Posts
    10k 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();
  • Is there any Function in PyQt4 that refresh Data Table?

    Moved Solved Language Bindings python
    3
    0 Votes
    3 Posts
    2k Views
    ?
    @the_ Thank you ! you help me a lot ! :) GodBless!
  • 1 Votes
    2 Posts
    3k Views
    B
    I traced the build failure down to pyside commit eb28469e - "Fix QtQuick bindings generation". I haven't had a chance to triage the root cause but pyside builds on macOS up through the previous commit.