Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. pyqt5
    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 Moving window to another screen will disable font size changing function
      General and Desktop • pyqt5 dpi font size • • frank.xin  

      1
      0
      Votes
      1
      Posts
      19
      Views

      No one has replied

    • 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
    • SOLVED Facing problems with switching through multiple windows in my GUI
      General and Desktop • pyqt5 • • Ahmed Zeid  

      11
      0
      Votes
      11
      Posts
      80
      Views

      Hello, @JonB, thanks a lot for your reply. Yes, this is exactly what I meant. Sorry for being unclear before.
    • UNSOLVED pyqt5-tools pip install crashes Qgis 'couldn't load sip module. Python support will be disabled'
      Tools • python qt for python pyqt5 qgis qtlinguist • • hcroope  

      2
      0
      Votes
      2
      Posts
      211
      Views

      @hcroope For PyQt question you might ask at: https://riverbankcomputing.com/mailman/listinfo/pyqt
    • UNSOLVED QApplication constructor taking very long time on Raspberry Pie python3 PyQt5
      Mobile and Embedded • pyqt5 raspberry pi qt5 raspberry p • • Marek Stocki  

      6
      0
      Votes
      6
      Posts
      80
      Views

      @Marek-Stocki Wait, wait! You absolutely do not want to move a Python3 application back to Python2! Trust me :) Even 26 seconds startup is quite unacceptable. Start up should be like ~1 second!! There is something wrong.....
    • UNSOLVED converting from mySQL to SQlite with QSqlTableModel
      General and Desktop • mysql pyqt5 sqlite qsqltablemodel • • Johnny78  

      7
      0
      Votes
      7
      Posts
      118
      Views

      I did the migration with mysqldump then I edited the dump file. Then I have the resulting file into sqlite and saved it as database. The date columns are now stored in sqlite as TEXT fields. All done on a linux machine. Thank you VRonin for your suggestion. That sounds like a great idea. Can I do this in pyQt5 or do I need to go to C++? I think QSQLiteDriver is a plugin i.e. a shared library. That means I have to do this in C++. Is that right? I wanted to avoid C++ so that my application is more portable. But anyway this solution sounds great. Thanks for you answers guys.
    • UNSOLVED QGraphicsProxyWidget undo ItemStacksBehindParent?
      General and Desktop • qt5 pyside2 qgraphicsitem pyqt5 qgraphicsproxyw • • Goffer  

      1
      0
      Votes
      1
      Posts
      54
      Views

      No one has replied

    • UNSOLVED PyQt script under C++ Qt doesn't work under Windows.
      General and Desktop • qt5 pyqt5 • • david_qt  

      1
      0
      Votes
      1
      Posts
      160
      Views

      No one has replied

    • UNSOLVED How to get customized titlebar in qml like steam own in linux
      General and Desktop • qml pyqt5 title bar • • Newtron  

      2
      0
      Votes
      2
      Posts
      74
      Views

      Hi I have not seen steam on linux , however they might have use https://en.wikipedia.org/wiki/Client-side_decoration or something similar. or have hand made it. While this works ok for win https://github.com/dfct/TrueFramelessWindow I have not seen one for linux. Maybe due to all the different managers. Short story is. Qt do not draw the title bar so one can either totally fake it and draw all - and handle all min/max resize etc by manual code or if the Desktop/Manager supports it, use direct api extensions.
    • UNSOLVED How to make a resizable gui?
      General and Desktop • pyqt5 layouts • • Dexter99  

      3
      0
      Votes
      3
      Posts
      58
      Views

      @Dexter99 said in How to make a resizable gui?: How can I solve this See https://doc.qt.io/qt-5/layout.html
    • SOLVED Pyqt5 help!!
      Qt for Python • pyqt5 labels • • Dexter99  

      7
      0
      Votes
      7
      Posts
      114
      Views

      Yes that is what SGaist said in the post previous to your last post
    • UNSOLVED How to hide running app icon from gnome panel
      General and Desktop • qml linux pyqt5 ubuntu gnome • • Newtron  

      1
      0
      Votes
      1
      Posts
      84
      Views

      No one has replied

    • SOLVED Matplotlib interfering with PyQt
      General and Desktop • pyqt5 matplotlib • • Debra Peri  

      5
      0
      Votes
      5
      Posts
      254
      Views

      Thanks for the feedback and happy hacking !
    • UNSOLVED How to create a tiny no titlebar notification window using QML and PyQt5
      General and Desktop • qml pyqt5 notifications • • Newtron  

      2
      0
      Votes
      2
      Posts
      75
      Views

      Hi and welcome to devnet, Isn't that a system notification ?
    • UNSOLVED making a Qt Designer plugin with python -- plugins not visible in Designer
      Tools • pyqt5 qt designer qtdesigner plugins designer plugin • • anp405  

      2
      0
      Votes
      2
      Posts
      854
      Views

      @anp405, my first guess would be that by setting PYTHONPATH you are losing the location of PyQt5 package. This depends on your Python and environment setup, but if there is some PYTHONPATH existing, you are overriding it completely instead of complementing. You can verify this by opening a new command line session, setting PYTHONPATH to wherever your code sets it, then running Python interpreter and trying to import PyQt5. Another guess would be that your child process uses different Python environment (e.g. built-in system Python 2), which does not have PyQt5 installed in its site-packages.
    • SOLVED Why my scrollbar track color is transparent?
      General and Desktop • stylesheet pyside2 pyqt5 pyqt scroll bar • • Ishaq Khan  

      11
      0
      Votes
      11
      Posts
      1373
      Views

      @mrjj Thank you very much! Problem solved.
    • UNSOLVED concatenate three columns into one column pyqt5
      General and Desktop • python pyqt5 python support • • badr  

      6
      0
      Votes
      6
      Posts
      421
      Views

      @badr You have one table widget (or similar, actually presumably QTableView rather than QTableWidget since you have your own model) holding rows & columns from a SQL query. You say you want another table widget to show a column "computed" (at client side) from columns in the first one. So why not create a second model whose data() method is overridden to perform the necessary computation and return the desired final string for Qt::DisplayRole using the index.row/column() (not just the index) as indexers into the SQL model's rows/columns? Or, if you want to stick with your current usage of QTableWidget (not ideal that you use Python SQL calls and copy result set into that, but up to you), you could make your second one a QTableWidget too and use setData() to populate its rows/columns with the actual corresponding strings whenever the first one changes (more work depending on how often your data changes, but in your case it might only be during loaddata() when you populate if it does not change thereafter).
    • 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.
    • UNSOLVED PyQt5 Program closes immediately after running compiled EXE
      General and Desktop • pyqt5 debug freeze compiling qt compiling • • Oscar L  

      2
      0
      Votes
      2
      Posts
      553
      Views

      Hi and welcome to devnet, How are you building your executable ? What version of PyQt5 and Qt are you using ? Since you are using PyQt, you might want to consider contacting its authors.
    • UNSOLVED QWebEngineView has no display in ubuntu-desktop-lxde-vnc docker container
      QtWebEngine • pyqt5 display docker black screen qtwebengineview • • deeperblue  

      1
      0
      Votes
      1
      Posts
      366
      Views

      No one has replied

    • UNSOLVED QQuickImageProvider and updating an image more than once (PyQt5)
      QML and Qt Quick • pyqt5 imageprovider • • Bits-n-Flips  

      1
      0
      Votes
      1
      Posts
      416
      Views

      No one has replied

    • 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 QThread Freezes GUI
      Language Bindings • qthread pyside2 pyqt5 • • GLaDOS1105  

      2
      0
      Votes
      2
      Posts
      1319
      Views

      Hi, Looks like there's some problem with the PySide 2 implementation. You should check the bug report system to see if it's something known. If not, please consider opening a new report providing your example and as much details as possible about your current setup.
    • SOLVED Configuring checkbox when using QTreeWidget
      General and Desktop • pyqt5 qtreewidget checkbox • • MATTK  

      4
      0
      Votes
      4
      Posts
      4943
      Views

      @MATTK said in Configuring checkbox when using QTreeWidget: is this a bug or a known issue from Qt Designer? No, it's 100% intended behaviour. the condition is checked here You have 2 options: set the Qt::CheckStateRole for the indexes you want to have a checkbox. In your widget constructor you'd call something like setUnchecked(ui->treeWidget->model()); void setUnchecked(QAbstractItemModel* model, const QModelIndex& parent = QModelIndex()){ if(!model) return; for(int i=0, maxRow=model->rowCount(parent);i<maxRow;++i){ for(int j=0, maxCol=model->columnCount(parent);j<maxCol;++j){ const QModelIndex currIdx = model->index(i,j,parent); model->setData(currIdx,Qt::Unchecked,Qt::CheckStateRole); if(model->hasChildren(currIdx)) setUnchecked(model,currIdx); } } } subclass the delegate to check the flag instead of Qt::CheckStateRole and call something like ui->treeWidget->setItemDelegate(new CheckFlagDelegate(this)); in your widget constructor class CheckFlagDelegate : public QStyledItemDelegate{ Q_OBJECT Q_DISABLE_COPY(CheckFlagDelegate) public: explicit CheckFlagDelegate(QObject* parent = Q_NULLPTR) : QStyledItemDelegate(parent){} protected: void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const Q_DECL_OVERRIDE{ QStyledItemDelegate::initStyleOption(option,index); if(index.model()->flags(index) & Qt::ItemIsUserCheckable) option->features |= QStyleOptionViewItem::HasCheckIndicator; } }; Since the functionality is defined in a QObject (the delegate) and not in a QWidget this is not something designer can and probably ever will manage
    • SOLVED Custom Widgets on qt designer
      General and Desktop • pyqt5 button custom • • MafiaSkafia  

      5
      0
      Votes
      5
      Posts
      1153
      Views

      @mrjj okay thank you very much! And yes, my Designer also have a StyleSheet editor like this: Cheers
    • 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 VTK integration in PyQt (wrong layout)
      General and Desktop • python pyqt5 pyqt vtk • • MafiaSkafia  

      2
      0
      Votes
      2
      Posts
      1381
      Views

      Hi, You are replacing the central widget in OpenVTK. You should rather add your widget to the current central widget's layout.
    • SOLVED How to clear QVBoxLayout by a Signal?
      General and Desktop • pyqt5 • • porsol  

      6
      0
      Votes
      6
      Posts
      2022
      Views

      def clearvbox(self, L = False): if not L: L = self.vbox if L is not None: while L.count(): item = L.takeAt(0) widget = item.widget() if widget is not None: widget.deleteLater() else: self.clearvbox(item.layout())
    • UNSOLVED How to jump millisecond in video?
      Language Bindings • pyqt5 • • Dl10  

      2
      0
      Votes
      2
      Posts
      531
      Views

      Hi, What résolution are you expecting ?
    • UNSOLVED Adding video window
      Language Bindings • pyqt5 • • Dl10  

      4
      0
      Votes
      4
      Posts
      750
      Views

      Well... Then you can translate the example from the class detailed documentation in Python and you have a minimal video player.
    • 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

    • UNSOLVED How I can to part?
      Language Bindings • pyqt5 • • Dl10  

      6
      0
      Votes
      6
      Posts
      1098
      Views

      @Dl10 Hi I think it exists https://www.youtube.com/watch?v=Dmo8eZG5I2w There you just place 4 qframes on center mainwindow Then right click (not on frames) and from layout menu select Grid layout