I have a QTreeWidget that contains rows of data for multiple students. When double clicking on a row, a window opens, with a number of drop down menus and text edits that a user can input into. Currently, the user can open the file menu in the top left corner of that window and save the file manually in a folder from there and also open it, but this is inefficient for my program, and I want to make it so that each individual student in the QTreeWidget will have their own individual window open up, that, when a save button is pressed in the window, the data within the window will save within a database of some sort, and when that student's window is opened again, the information inputted specifically in the window and saved earlier for that student will load up automatically.
The QTreeWidget looks something like this (ignore the issue with the scroll bar in the corner. Names have been censored for data protection):
QTreeWidget
And the window containing user inputted data looks like so:
Popup Window
If there are any documentations or tutorials that could help me with this issue, I'd love to know, because I can't seem to find anything related to this anywhere. Even any basic ideas on how I could go about introducing this function into my program would be of great help. I am using Python 3.4 and MySql.
Why don't you start with studying how the standard MVC is implemented in Qt?
The following resources should be a good start for you:
this intro site
or this video series
Related
I want to create a suggestions system for a console I'm embedding into my interface, but there's one feature I want to add that I don't see how to. My inspiration is how minecraft consoles work:
As you can see, the autocomplete tries to fill up the rest of the lineEdit based on what the first suggestion in the input is. I assume that this behaviour could be replicated using the placeholder text system we have now, but I don't really see how to make the placeholder show when there's text written. Any ideas?
I am currently developing an automated test case which performs actions on a console application (very simple, just clicking buttons and inputting text).
I have been able to successfully click through the application and input data without many problems, which includes identifying elements and things like that.
I have not been able to verify the existence of GUI elements that aren't clickable, ie an image that is loaded into the console application. I have tried looking through the output when using print_control_identifiers() for any indication of where data about an image in the window might be stored. I have tried looking at the tree diagram of the windows before and after loading the image in to see if it changes (it does not).
I have also then looked into verifying basic things, like font type or other properties that exist in the VS development platform, without success. To do this I used handleprops.font among other things. I have also read through the handleprops class and tried to find anything in there that I can use, but none of it is working.
My question is: is there a way to access an image's information that is stored in the window? I am able to identify where it is stored (picturebox1) and get information about that window (handleprops.rectangle) but cannot get anything about whether the image is there (like a path to image for example). All I can access is 'controllable' items, those that show up in print_control_identifiers()
I'm not sure this is possible with pywinauto but I have been stuck on this for a while and wondered if there were any suggestions people had.
Thanks
I am working on a small project using PyQt5 (Python 3) and I want a widget where a user can select/modify a file, somewhat akin to the left-hand side of file explorer on Windows:
This cannot be done with QFileDialog as I want to display files that are not on the user's drive.
I have tried writing my own, however I am a beginner and I lack the skills to do it correctly (hence the reason why I'm trying to learn). I can provide the code if that would be useful.
Is there such a thing built in to pyqt? Has anyone created one before, with source code available?
Thanks in advance.
EDIT: More specifically I don't want a way to access remote files, just a widget that displays entries (along with icons, preferably) and subentries in a sort of drop-down menu, like the section of file explorer mentioned above. It doesn't necessarily have to be to do with files, consider it a drop-down menu if that helps.
I know this is old but for anyone looking for an answer it's the QTreeView widget.
I have an app that creates powerpoints. Everything goes well except that every time I want to open one of these powerpoints it opens it in the slide master view. This isn't necessarily a problem per se, but just annoying since I open a lot of these powerpoint files. Has anyone else encountered this? Any idea what this is due to?
This happens on both mac and windows.
I create a presentation from a template, generate the slides and then save it more or less like this:
self.prs = Presentation(
self.template_path)
for c, slide in enumerate(self.data):
self.generate_slide(slide)
self.prs.save(save_location)
I had this issue before, it was because the template slide was saved in the slide master view same as what Johnathon said.
I have an application developed in Python using PyQt4, In which i used QTableView to display a reports.
when i open one report window with QTableView it shows the result properly.
If i open another report window with QTableView it shows the result properly.
Now both the windows are displaying the data in there QTableViews.
Now the issue is, When i select the 1st report window the data in it is disappearing.
Can anyone tell me exactly whats wrong i am doing.
Check if you are using same instance of QtSql.QSqlDatabase for all the views you create.