Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
  Question Thread: Word, adding a hyperlink from a bookmark using Python
Post: Word, adding a hyperlink from a bookmark using Pyt...

I am working python script that composes a document made out of multiple documents, which can be selected by the user. This means that the composed document is flexible in content, based on the user i...
mart79 General Coding Help 1 345 Jan-14-2021, 12:52 PM
    Thread: SharePoint Online/365 authentication using .cer file
Post: SharePoint Online/365 authentication using .cer fi...

All, I want to access our corporate SharePoint Online/365 site to collect information from our lists and/or libraries. For this I have a cer file but, I need some help setting up the code to access t...
mart79 General Coding Help 0 315 Nov-08-2020, 03:31 PM
    Thread: Help: check content of combobox in horizontal header of QTableWidget
Post: Help: check content of combobox in horizontal head...

Hi, I need to check the content of a combobox header in a QTableWidget. I found some snippets of code which I used to set up the table with the different comboboxes in the header of a QTableWidget b...
mart79 GUI 1 856 Jul-22-2020, 10:20 AM
    Thread: Create exe file including referenced image (*.png) files
Post: Create exe file including referenced image (*.png)...

Hi all, I have a small program (see below example) that opens an image if you click on the button. This image (test.png) is stored in a folder (//Images in my project directory. I want to make an exe...
mart79 GUI 0 437 Jul-21-2020, 09:49 AM
    Thread: display content from left to right in QComboBox or QLineEdit
Post: display content from left to right in QComboBox or...

Hi all, I have several QComboBoxes and QLineEdits on my UI, which can show different content depending on user selections. However, when the user changes settings, the content of the QComboBox or QLi...
mart79 GUI 2 686 May-30-2020, 12:34 PM
    Thread: HELP: collect path name
Post: HELP: collect path name

Hi all, I have a project with several folders with .py files. I also have some .png files which are used by open-cv. Currently I use the following path format, to access those .png files: So, the f...
mart79 General Coding Help 1 528 May-14-2020, 01:03 PM
    Thread: Help: Replace widgets in a QFrame on Combobox change
Post: RE: Help: Replace widgets in a QFrame on Combobox ...

(May-13-2020, 09:04 PM)deanhystad Wrote: Have you tried QStackedWidget or QStackedLyout? Instead of repopulating one frame you create different views that are all mapped to the same place in the wi...
mart79 GUI 2 1,057 May-14-2020, 05:21 AM
    Thread: Help: Replace widgets in a QFrame on Combobox change
Post: Help: Replace widgets in a QFrame on Combobox chan...

Hi all, I have the following problem which I do not seem to get solved:My aim is that I want to have a single QFrame in which QWidgets are replaced when I select a different QComboBox entry (Frame2 o...
mart79 GUI 2 1,057 May-13-2020, 07:50 PM
    Thread: QPainter issue showing black screen
Post: QPainter issue showing black screen

Hi, I have the following code which I want to use to display a figure constructed out of circles. import sys from PySide2 import QtGui, QtWidgets class MainWindow(QtWidgets.QDialog): def __ini...
mart79 GUI 0 648 May-06-2020, 12:02 PM
    Thread: Avoid clicked event from button when button is not physically selected and clicked
Post: RE: Avoid clicked event from button when button is...

(Apr-20-2020, 01:21 PM)deanhystad Wrote: This is not normal behavior. When clicking on a line edit or combo box widget the selected widget should take focus from the add button (no blue box around ...
mart79 GUI 2 670 May-05-2020, 12:54 PM
    Thread: Add validation (regex) to QTableWidget cells
Post: Add validation (regex) to QTableWidget cells

Hi all, I have a table (see below example) and want to add a regex validation to each cell in column 0 and 2 of the QTableWidget. For a standard QLineEdit it is simple but, I can't find any examples ...
mart79 GUI 0 877 May-05-2020, 12:51 PM
    Thread: Help: list comprehension for loop with double if statement
Post: RE: Help: list comprehension for loop with double ...

(May-04-2020, 06:22 AM)buran Wrote: data = {'caseA': ['Printers'], 'caseB': None, 'caseC': ['Printers', 'Computers'], 'caseD': None, 'caseE': None} item = 'Printers' result = ['affected' if item in...
mart79 General Coding Help 3 727 May-04-2020, 06:32 AM
    Thread: Help: list comprehension for loop with double if statement
Post: Help: list comprehension for loop with double if s...

Hi, I have the following piece if code which I want to write more cleanly using list comprehension. However, I am struggling with the list comprehension using the double if statement in the for loop...
mart79 General Coding Help 3 727 May-04-2020, 06:12 AM
    Thread: Expand last sub-node of treeview widget
Post: RE: Expand last sub-node of treeview widget

Does nobody know how to do this? I really need some help so, any help is much appreciated.
mart79 GUI 1 681 Apr-25-2020, 07:57 PM
    Thread: Expand last sub-node of treeview widget
Post: Expand last sub-node of treeview widget

I have the following code: import sys, os from PySide2.QtWidgets import QApplication, QDialog, QTreeWidgetItem, QTreeWidget, QHBoxLayout, \ QVBoxLayout, QStyleFactory class Form(QDialog): ...
mart79 GUI 1 681 Apr-22-2020, 01:57 PM
    Thread: Avoid clicked event from button when button is not physically selected and clicked
Post: Avoid clicked event from button when button is not...

I have a GUI with several buttons, line-edits and combo-boxes. When I load this GUI and select a line-edit or combo-box to change input, it triggers the 'add' button on hitting enter. This seems to be...
mart79 GUI 2 670 Apr-20-2020, 01:02 PM
    Thread: Help: Dockable widget
Post: Help: Dockable widget

I have a small GUI that has multiple group boxes (see below code). Group box 1 (Named: Example 1) can be made visible or hidden using the menu. However, instead of having the user to select whether t...
mart79 GUI 0 623 Apr-18-2020, 01:25 PM
    Thread: Help: for loop with dictionary and nested lists
Post: Help: for loop with dictionary and nested lists

Hi all, Can you help me with the following double for loop, writing it more cleanly and make it work for 'lc3' old = 'car' new = 'scooter' loadcases = {'lc1': [['car', 'red', '10'], ['train', 'blue...
mart79 General Coding Help 1 710 Apr-12-2020, 12:51 PM
    Thread: Help: List comprehension
Post: RE: Help: List comprehension

(Apr-09-2020, 04:20 AM)ndc85430 Wrote: Why do you need the if statement on line 4? Clearly the expression input is not None isn't going to be False. Because my input at some point can also be None, ...
mart79 General Coding Help 4 929 Apr-09-2020, 05:24 AM
    Thread: Help: List comprehension
Post: RE: Help: List comprehension

(Apr-08-2020, 01:33 PM)buran Wrote: foo = [['car', 'red', '10'], ['train', 'blue', '20'], ['airplane', 'gray', '300']] # list comprehension bar = [first if first != 'car' else None for first, *rest...
mart79 General Coding Help 4 929 Apr-08-2020, 01:40 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020