Navigation

    Qt Forum

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

    • UNSOLVED What is the exact code to change PushButton background-color onclick in the button's stylesheet in Qt Designer?
      General and Desktop • stylesheet pyqt5 qt designer python3 pushbutton • • I-TECH  

      3
      0
      Votes
      3
      Posts
      42
      Views

      @JonB Thank you for interactions. Would you please show me an exact code of for example a PushButton and where to implement it. I am advanced python coder, I just need to see exact steps. Thank you very much.
    • UNSOLVED ValueError: could not convert string to float
      General and Desktop • pyqt5 python3 • • YassineKira  

      4
      0
      Votes
      4
      Posts
      105
      Views

      @KroMignon Well, i try to learn from anothers in every forum, sorry :), @jsulm Thank you Sir, you are a Life saver :)
    • UNSOLVED How to launch a second GUI application via a button click in another GUI application - python
      General and Desktop • pyqt5 python3 • • Stainopel  

      2
      0
      Votes
      2
      Posts
      36
      Views

      @Stainopel None of this seems relevant. Either you don't really want separate applications but just one and you just want to show the other widget. Or, to run another application as you ask, use Qt's QProcess, or the Python ones for running sub-processes if you prefer, called from your button clicked slot.
    • SOLVED Open and display a file through a function click and using the opened file as input for another function with PYQT5
      General and Desktop • pyqt5 python3 • • Stainopel  

      10
      0
      Votes
      10
      Posts
      116
      Views

      @JonB Very Good Suggestion, I used a second variable in the other function to read the opened file(s) from the first function and it did work like a charm. Thanks. Here is an update to the code def encryption_hash(self,comboBox_2): index = self.comboBox_2.currentIndex() path = self.fname_E with open(path, 'rb') as f: if index == 2: hasher1 = hashlib.md5() afile1 = f buf1 = afile1.read() a = hasher1.update(buf1) md5 =(str(hasher1.hexdigest())) self.lineEdit_E.setText("File Hash Using MD5: " + md5)
    • SOLVED Comparing two strings in different widgets
      General and Desktop • pyqt5 python3 • • Stainopel  

      9
      0
      Votes
      9
      Posts
      92
      Views

      @Pl45m4 yes I initially used a line edit but ended up changing it to a qtextedit instead. Then using the documentation I was able to get the expected results
    • UNSOLVED QT Designer can't detect python
      Language Bindings • python3 designer error • • Running_Child  

      1
      0
      Votes
      1
      Posts
      111
      Views

      No one has replied

    • UNSOLVED How to generate python bindings using shiboken from an existing C++/Qt shared library?
      Language Bindings • python python3 python support shiboken • • Alex94102  

      6
      0
      Votes
      6
      Posts
      214
      Views

      Thanks for the links !
    • SOLVED How to workaround change in Qt 5 handling of QListView.mousePressEvent and QStyledItemDelegate.editorEvent?
      General and Desktop • qlistview python3 qstyleditemdele • • DamonLynch  

      4
      0
      Votes
      4
      Posts
      257
      Views

      In case anyone comes across this in a search, I was able to solve the problem by manipulating the selection in the class member function selectionChanged(): https://bazaar.launchpad.net/~dlynch3/rapid/zeromq_pyqt/revision/1178#raphodo/thumbnaildisplay.py Perhaps that was always the best way to do it.
    • UNSOLVED Open Source viewer for genetics variation
      Qt Medical • pyside2 python3 bioinformatics genomics • • dridk2  

      4
      4
      Votes
      4
      Posts
      197
      Views

      Hi @dridk2 , I wish to help you with this project.
    • UNSOLVED How to implement virtual keyboard with PySide2 and QML
      Mobile and Embedded • qml pyside2 python3 virtualkeyboard qml binding • • RG97  

      7
      0
      Votes
      7
      Posts
      658
      Views

      try to add this to main.py import os os.environ["QT_IM_MODULE"] = "qtvirtualkeyboard"
    • SOLVED Common buttons and positioning in Python PyQt5 QStackedLayout
      General and Desktop • pyqt5 python3 • • benjibenjibenji  

      2
      0
      Votes
      2
      Posts
      1136
      Views

      Hi, You can put your QStackedLayout and buttons in a QVBoxLayout so you can re-use the buttons. Put that layout in a QWidget and set that widget as the central widget of your QMainWindow.
    • SOLVED How to forward Qt Mouse event to QQuickView?
      QML and Qt Quick • qml qt5 pyqt5 python3 • • eugeneoei  

      3
      0
      Votes
      3
      Posts
      842
      Views

      @raven-worx you sir saved my life! I cant believe i was stuck at this for 2 days, when it was simply just about using the right object in qml. thanks!
    • UNSOLVED The QMediaPlayer object does not have a valid service on Ubuntu 16.04
      General and Desktop • pyside2 python3 ubuntu 16.04 qmultimedia qt5.11 • • nekitamtip  

      1
      0
      Votes
      1
      Posts
      751
      Views

      No one has replied

    • UNSOLVED PySide2 with Python3 Built-In Multiprocessing
      Language Bindings • qthread pyside2 python3 multiprocessing • • GLaDOS1105  

      2
      0
      Votes
      2
      Posts
      883
      Views

      @GLaDOS1105 I hit the same problem recently trying to send messages from a PySide2.QRunnable via PyPubSub to the main GUI thread. The only thing I can recommend is to try adapting your code to using the QThreadPool class instead of the multiprocessing module.
    • UNSOLVED How I can create the table view having two columns in QML?
      QML and Qt Quick • qml pyqt5 python3 tableviewcolumn • • Rohn  

      2
      0
      Votes
      2
      Posts
      657
      Views

      Hi there. I think you can use TableViewColumn element to create a new column inside a TableView component. If necessary, you can define your own delegate to set how the data is showed to user. Read more: http://doc.qt.io/qt-5/qml-qtquick-controls-tableview.html#details <- TableView Documentation http://doc.qt.io/qt-5/qtquickcontrols-tableview-main-qml.html <- TableView Example
    • UNSOLVED How to read file (or multiple line string ) from python function to QML text Area?
      QML and Qt Quick • qml pyqt5 python3 signals&slots • • Rohn  

      1
      0
      Votes
      1
      Posts
      311
      Views

      No one has replied

    • UNSOLVED How do I animate the position change of a Widget while using a layout manager?
      General and Desktop • python pyqt5 pyqt python3 qpropertyanimat • • subnub99  

      1
      0
      Votes
      1
      Posts
      616
      Views

      No one has replied

    • SOLVED QByteArray to string?
      Language Bindings • pyqt5 python3 • • JonB  

      29
      -1
      Votes
      29
      Posts
      20072
      Views

      @germyrinn Hi, this was an old post of mine. As I wrote, the problem is that for the £ sign e.g. read from a file created in the way I describe, decode("utf-8") gives me a UnicodeDecodeError. I found the only conversion which works is decode("cp850").
    • UNSOLVED Resizing QMainWindow and QDialog
      General and Desktop • qmainwindow resize python3 windows10 qt 5 • • Ocram10  

      7
      0
      Votes
      7
      Posts
      2421
      Views

      @Fuel the exemples in pyqt-master do it automatically but i don't understsnd what event or property they use
    • SOLVED Render image from hsv color
      General and Desktop • qwidget qpainter python3 rendering drawpixmap • • Adam V  

      8
      0
      Votes
      8
      Posts
      2646
      Views

      I have found a solution that kind of does the job, although takes three times as much memory. Every update I calculate the difference between the new and the old saturation matrix, this eliminates 60% of the nonzero values, which means it gets drawn that much faster. As a second layer of optimization I call repaint with a rectangle describing the most important zone, and call update every 60ms.
    • UNSOLVED Python custom widget for Qt Designer
      3rd Party Software • widget pyqt5 designer python3 • • Pierone  

      2
      0
      Votes
      2
      Posts
      1354
      Views

      @Pierone Can you put you code in GitHub instead of a rar file? Its pretty awkward to unpack your code.
    • UNSOLVED Python custom widget per Qt Designer
      Italian • pyqt5 designer python3 • • Pierone  

      1
      0
      Votes
      1
      Posts
      695
      Views

      No one has replied

    • UNSOLVED Starting a python project in qt creator, how?
      General and Desktop • qt designer python3 material design qt creator 4.2 • • Pataruutu  

      3
      0
      Votes
      3
      Posts
      4828
      Views

      @Pataruutu Hi the video you link is QML :) So its its the reason it looks differently. The one you call ugly is QWidgets and it uses the default look of the platform. It seems you can use QML with pyt http://pyqt.sourceforge.net/Docs/PyQt5/qml.html
    • SOLVED Passing list to class init, pyQt
      General and Desktop • pyqt5 python3 • • robbiecooper  

      4
      0
      Votes
      4
      Posts
      1070
      Views

      Thanks @jsulm!! That sorted it!
    • UNSOLVED PyQt5 virtual keyboard (TypeError: missing 1 required positional argument)
      Language Bindings • qt5.5 python pyqt5 python3 virtualkeyboard • • alekssandrap  

      5
      0
      Votes
      5
      Posts
      3604
      Views

      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.
    • UNSOLVED PyQt5 blurpicker example
      Language Bindings • qtcreator python pyqt5 pyqt python3 • • alekssandrap  

      5
      0
      Votes
      5
      Posts
      1756
      Views

      Thank you! I didnt noticed that. I did correct this mistakes, but still getting the same error:( and empty window :/
    • UNSOLVED PyQt5 Events
      Language Bindings • python pyqt5 pyqt python3 pyqt4 • • alekssandrap  

      1
      0
      Votes
      1
      Posts
      1880
      Views

      No one has replied

    • SOLVED QProgressBar causing bad performance in QT5?
      General and Desktop • pyqt5 performance python3 qprogressbar • • Trunks10  

      3
      0
      Votes
      3
      Posts
      1295
      Views

      I did the test and appearantly it's the painting which is very expensive... with no slot connected, the program takes 1,5 seconds to complete the task. There is a very similar issue reported at https://bugreports.qt.io/browse/QTBUG-49655. But generally ProgressBars are consuming especially when we update it that often (>365000 times) while there is no significant change at each iteration. So I simply update the QProgressBar less often and the results are good (~1s) and the progression still smooth. PSB : class ParseFileAsync(QtCore.QThread): match = QtCore.pyqtSignal(str) PBupdate = QtCore.pyqtSignal(int) PBMax = QtCore.pyqtSignal(int) def run(self): with open("test_long.log", "r") as fichier: fileLines = fichier.readlines() self.lineNumber = len(fileLines) self.PBMax.emit(self.lineNumber) if (self.lineNumber < 30): self.parseFile(fileLines, False) else: self.parseFile(fileLines, True) def parseFile(self, fileLines, isBig): cpt = 0 if(isBig): for line in fileLines: cpt+=1 if(cpt % (int(self.lineNumber/30)) == 0): self.PBupdate.emit(cpt) for element in liste: if element in line: self.match.emit(line) self.PBupdate.emit(self.lineNumber) #To avoid QProgressBar stopping at 99% else: for line in fileLines: cpt+=1 self.PBupdate.emit(cpt) for element in liste: if element in line: self.match.emit(line)
    • SOLVED Can't add a stretched background image with PyQt5
      General and Desktop • stylesheet pyqt5 python3 • • Trunks10  

      4
      0
      Votes
      4
      Posts
      7833
      Views

      super :) also using "#MainWindow" makes sure it dont apply to childs as stylesheets does.
    • UNSOLVED general project gudance ! if it is possible or not
      General and Desktop • python3 threading while loop no clue what so ever • • Kourpetis  

      3
      0
      Votes
      3
      Posts
      988
      Views

      @Kourpetis Hi, it sounds like your code is getting stuck in your while loop. I believe your code needs threading.
    • Problem with program that performs multiple processes.
      General and Desktop • python gui thread pyqt qtdesigner python3 threads threading pyqt4 multithreads pyuic • • Tas-sos  

      3
      0
      Votes
      3
      Posts
      2467
      Views

      How can i create my signal for text edit with python3 ? With as many ways i tried, but I did not succeed .. :(