Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. python
    Log in to post

    • UNSOLVED What does the "yield" keyword do?
      Qt for Python • python • • Aliviya  

      3
      0
      Votes
      3
      Posts
      81
      Views

      @jsulm said in What does the "yield" keyword do?: returns a gerator object which can be iterated to get the values. See https://www.guru99.com/python-yield-return-generator.html Thank you..It has a great overview of how yield works and how to use it.
    • UNSOLVED AttributeError: 'bool' object has no attribute 'browsefiles'
      Qt for Python • python qt for python • • Adityamity  

      2
      0
      Votes
      2
      Posts
      91
      Views

      @Adityamity said in AttributeError: 'bool' object has no attribute 'browsefiles': def browsefiles(self): You have this against the left margin. It is not inside the class. Indent it all by 4 spaces. This is one reason not to like Python ;-) BTW, well done for putting your code inside forum Code tags, in your first post! Most do not. Which would have made this very hard to spot!
    • SOLVED QT charts extremely slow - QLineSeries
      QML and Qt Quick • python qtcharts qtchart qlineseries • • Witc  

      25
      0
      Votes
      25
      Posts
      282
      Views

      "append" causes a redraw. There is no way to disable the redraw that I can find. The QML api for charts is kinda crappy for adding data points. Which is why I had to use "replace" in C++. I have done thousands of points this way and it doesn't cause delays in the UI interface.
    • UNSOLVED complexity handle by PYQt5
      Qt for Python • python qt for python • • daisyvish  

      1
      0
      Votes
      1
      Posts
      83
      Views

      No one has replied

    • UNSOLVED opencv cameras into qml using python and pyside2
      Qt for Python • python pyside2 • • m.reza  

      9
      0
      Votes
      9
      Posts
      233
      Views

      @SGaist i did, it runs smooth with one camera, since its using available picture to stream, problem is when we have more than one camera, i cant choose each stream directly to communicate with in Qt. lets say i have a class in python that each def() does one job with a camera, one for focusing on for taking a picture one for sending too AI model and so on, i need to make 6 different object from this class for 6 different cameras and connect them to buttons in Qml, what i explained is alright, but the only part i can not do is the live stream for each camera separately, there is no function or at least i couldn't find which define separate stream of images for separate windows in qml, there are two method so far which looks for available stream of image not a specific one, one is imageprovider, other is paintclass this is were i have the main problem
    • UNSOLVED PyQt5 front-end and python back-end
      Qt for Python • python qt for python • • QtFranchise  

      4
      0
      Votes
      4
      Posts
      126
      Views

      You should: provide a clean way to quit your thread use a cleaner setup/tear down for the opening and closing of your device why all these sleep call ?
    • SOLVED shiboken2 compiles
      Qt for Python • python qt for python pyside2 • • wwms  

      2
      0
      Votes
      2
      Posts
      99
      Views

      Hi and welcome to devnet, You do not have a constructor without argument.
    • SOLVED Strange behaviour of QPushButton
      Qt for Python • python qt for python • • Bored Nerd  

      8
      0
      Votes
      8
      Posts
      153
      Views

      What was the issue ?
    • UNSOLVED Qt Data Visualization adjust axis scaling
      Qt for Python • python qt for python pyside • • ccortez  

      1
      0
      Votes
      1
      Posts
      114
      Views

      No one has replied

    • SOLVED Qt.CheckStateRole not work in Pyside 6.3.1
      Qt for Python • python qt for python pyside • • alonginhh  

      6
      0
      Votes
      6
      Posts
      188
      Views

      @JonB Yes, you are right. converting Qt.Checked/Unchecked to int() to make it work in PySide6.3.1. Thank you @SGaist @CristianMaureira @JonB !! Problem solved.
    • UNSOLVED How to plot python x,y data in QtCharts
      Qt for Python • python qt for python pyside • • Witc  

      1
      0
      Votes
      1
      Posts
      109
      Views

      No one has replied

    • SOLVED PyQT GUI freezes when I update several labels' text 30 times in second
      General and Desktop • python pyqt5 pyqt ros • • farhadbat  

      3
      0
      Votes
      3
      Posts
      218
      Views

      I found the problem. The problem is that I update labels in show_gaze_information. This function is a callback that is called when a message is published on the topic. To correct the code, in function show_gaze_information, the message should be stored in a variable. Nothing should be modified in UI. Then in main body of code, I added this part: # update gaze infor periodically timer_gaze = QtCore.QTimer() timer_gaze.timeout.connect(update_gaze_information) timer_gaze.setInterval(500) timer_gaze.start() This code periodically calls update_gaze_information every 0.5 seconds. Now, in this function, I update labels in the UI.
    • UNSOLVED Display large amount of data in QML window
      Qt for Python • python qt for python pyside • • aayushlakkad  

      1
      0
      Votes
      1
      Posts
      84
      Views

      No one has replied

    • UNSOLVED How to 'kill' a QThreadPool process?
      Qt for Python • python qt for python pyside • • ccortez  

      5
      0
      Votes
      5
      Posts
      559
      Views

      @jsulm My UI freezes when I press the button that goes to 'qthread_test' in that code snippet. It starts to buffer and becomes unresponsive for a bit. That is the code sample that caused it. Yes there rare other elemetns in my code, but they do not connect ao any parts of this, it is mostly other elements like buttons. variables, etc.
    • SOLVED PySide 6: GUI Freezing even when using QThreadPool class
      Qt for Python • python qt for python pyside2 pyside • • ccortez  

      4
      0
      Votes
      4
      Posts
      275
      Views

      So the one that creates a file is working but the one that changes a GUI element freezes ? Do I get you correctly ?
    • UNSOLVED Accessing text field and processing in python
      Qt for Python • python qt for python pyside2 pyside • • aayushlakkad  

      1
      0
      Votes
      1
      Posts
      174
      Views

      No one has replied

    • UNSOLVED change tick labels
      Qt for Python • python qt for python pyside2 pyside • • aayushlakkad  

      3
      0
      Votes
      3
      Posts
      130
      Views

      @CristianMaureira please find link to my plotting code link .
    • UNSOLVED Embedded pyglet Widget
      Qt for Python • python qt for python • • gadese  

      4
      0
      Votes
      4
      Posts
      289
      Views

      I tested your sample code with a conda environment, latest PyQt5, pyglet from pip and while the text is not properly placed, it's rendered correctly.
    • SOLVED Resetting a PySide6 Window after closing it
      Qt for Python • python qt for python pyside2 pyside • • ccortez  

      3
      0
      Votes
      3
      Posts
      433
      Views

      @JonB Thank you for this, it helped me solve my issues!
    • UNSOLVED Smooth change of background image / PyQt6
      Qt for Python • python qmainwindow animation background pyqt6 • • FoxyFox  

      1
      0
      Votes
      1
      Posts
      315
      Views

      No one has replied

    • SOLVED Plotting with python
      Qt for Python • python qt for python pyside2 pyside • • aayushlakkad  

      8
      0
      Votes
      8
      Posts
      274
      Views

      This is a different issue that should have it's own thread as it's not related to the problem at hand. You should also mark this thread as solved.
    • SOLVED Zooming in/out QGraphicsView
      Qt for Python • python qt for python • • Pythonic person  

      4
      0
      Votes
      4
      Posts
      453
      Views

      @Pythonic-person said in Zooming in/out QGraphicsView: And that won't affect the performance of the app or any other effect? LOL no. If anything I think it might be a microsecond faster. For all the QGraphicsItems on your scene it has to see where they are, who's on top of whom, whether the item is hidden, how to draw it etc. The foreground is just a simple layer it puts on top of any items (just as the background is below any items). There are probably lots of calculations it can skip, at a guess. If you want you can optimize the foreground/background redrawing with clip areas. Using the background/foreground of the scene or view for things which are static and not the actual objects you are playing with on the scene seems to me to keep things cleaner. E.g. if you go looking for one of your items on the scene, why do you want to have to encounter and skip a ruler or the background grid pattern or whatever?
    • UNSOLVED #include<Python.h>: Error in included file
      C++ Gurus • c++ python c++ guru • • Factao  

      8
      0
      Votes
      8
      Posts
      360
      Views

      @JonB I'm a little bit rusted in C++ (I do not remember if compiling and building are the same), but I am getting these error when I am building. I havent really done more.
    • UNSOLVED mysql query does not take the dataset user inserted
      General and Desktop • python mysql python3 cursor • • lanas  

      4
      0
      Votes
      4
      Posts
      146
      Views

      @lanas Yes to all of that, by all means read that overview link. I didn't say that "will be hard to retrive data from data base if i did not work with qtsql classes". Using the Python SQL classes instead would be fine for retrieving data from the database. But when you want to display that data in your Qt UI, rows & columns from your SQL queries, that will require some coding to get the Python-SQL-fetched-data to the Qt UI widgets and back. Whereas if you use the Qt classes they fill Qt models directly, and those are what Qt QTableViews use to display (and even edit) data. In the simplest case, see if you can't use Qt's QSqlTableModel for attaching your data retrieval to the database. That will have the necessary SELECT/INSERT/UPDATE/DELETE automatically generated/issued for you for working on a SQL table in the database, without you having to write the SQL statements like you tried to in your question. And attaching a QTableView to the QSqlTableModel will display what you fetched without any code. And it can even allow you/the user to edit the data in the table and write ot back to the database for you.
    • UNSOLVED QtDataVisualization: Setting custom colors for 3DPlots
      Qt for Python • python qt for python pyside • • ccortez  

      1
      0
      Votes
      1
      Posts
      128
      Views

      No one has replied

    • SOLVED PySide6 QTableView integration into GUI
      Qt for Python • python qt for python pyside • • ccortez  

      7
      0
      Votes
      7
      Posts
      315
      Views

      @ccortez said in PySide6 QTableView integration into GUI: Using the .resize() doesn't do anything Yes, because size of widgets in a layout is managed by the layout. What is the problem with table consuming all available space? If it would not then you would simply have unused space, it would not look better in my opinion.
    • UNSOLVED PySide6 QtDataVisualization: Q3DSurface Figure Not Showing
      Qt for Python • python qt for python pyside • • ccortez  

      7
      0
      Votes
      7
      Posts
      208
      Views

      @friedemannkleint Unfortunately that didn't do much, but thanks for sharing that resource maybe something in there can help me.
    • SOLVED Accessing the text in a TextEdit that is allocated to a QMdiSubWindow
      Qt for Python • python qt for python • • Pixelhead120  

      3
      0
      Votes
      3
      Posts
      161
      Views

      @JonB Thank you for your advice and will have a look at what you've given me.
    • UNSOLVED PySide6 QML How to connect signals and slots over different class-instances correctly
      Language Bindings • qml python signal & slot pyside6 • • test123-all  

      1
      0
      Votes
      1
      Posts
      377
      Views

      No one has replied

    • UNSOLVED QDialog in QMainwinndow and make the background dark
      Qt for Python • python widget qdialog qmainwindow child • • Emrecp  

      6
      0
      Votes
      6
      Posts
      322
      Views

      So you want a modal dialog that is in fact loaded within a widget inside your QMainWindow class ? You can manually set the modality of your dialog with setModal.
    • SOLVED Help about Custom Paint Event of Progressbar
      Qt for Python • python css custom widget theme progressbar • • Emrecp  

      5
      0
      Votes
      5
      Posts
      192
      Views

      @SGaist Wow thank you very much! I fixed with pt.setClipPath(path2, Qt.ClipOperation.ReplaceClip) Some part of total code: progress_filled_width = self.value()/self.maximum()*self.width() pt.setClipPath(path2, Qt.ClipOperation.ReplaceClip) for i in range(100):
    • UNSOLVED Threading a Qt6 fullscreen image
      Qt for Python • python threading splashscreen • • mullman1  

      5
      0
      Votes
      5
      Posts
      254
      Views

      You can pre-compute the BMP in a separate thread and then access the finished image in the main thread to use it in the splash screen.
    • UNSOLVED How to fix qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" error
      Qt for Python • python qt for python • • Gokalp  

      26
      0
      Votes
      26
      Posts
      10089
      Views

      I also encountered the same problem today I want to know exactly how to configure environment variables in the virtual environment of vscode??
    • UNSOLVED Updating GUI element (QTableview) with QThread, with conditionally setting dataframe
      Qt for Python • python qthread gui pyqt5 multithreading • • alan02011114  

      2
      0
      Votes
      2
      Posts
      314
      Views

      @alan02011114 I don't understand what your question is. As the error message tells you, your slot requires a dfreceived/second position argument and you are not supplying it in your lambda so you get the error.
    • SOLVED Fit BMP Splash to Screen
      Qt for Python • python qt for python pyside • • mullman1  

      2
      0
      Votes
      2
      Posts
      149
      Views

      Okay. I found a solution myself by using the following command... Should be solved for now :D pixmap2 = pixmap.scaled(1920, 1080)
    • SOLVED Stylesheet css or xml widgets pyqt6 python
      Qt 6 • python stylesheet css xml qtwidgets • • Jbone73  

      5
      0
      Votes
      5
      Posts
      320
      Views

      @jsulm Thank you very much ! It's exactly what I needed. In the top !
    • UNSOLVED How to call function with arguments using QThread [PySide6]
      Qt for Python • python qt for python pyside • • Andresfe  

      3
      0
      Votes
      3
      Posts
      307
      Views

      Hi, I would ask this question on the PySide mailing list. The method is also not available in PySide2 as it seems.
    • SOLVED QTreeView questions
      Qt for Python • python qt for python pyside • • jim87  

      7
      0
      Votes
      7
      Posts
      439
      Views

      Ok, I've made a PoC for this issue, where both the "extra" tree element appears and when you try to load twice it will eat all the memory, freezing . I'm running Python 3.10.1 with PySide6 6.2.2.1 under Linux Fedora 35. I can't attach the zip file here, though you can download it from the following link: https://drive.google.com/file/d/1vBZDIAZGhnS_Gi-rFalpxZKgB5zqLh7a/view?usp=sharing Thanks :) EDIT: I finally caught the error! I was creating the model's root item and I was appending all the items in it, though I was also appending the root item to the model itself (see line 184 of the last example). It was as easy as that. Thanks for the support though :)