filedialog

Qt customizing save file dialog

╄→гoц情女王★ 提交于 2020-01-02 04:47:06
问题 I need to customize default Qt save file dialog: add some options in it. For example, adding some checkboxes with my own values in it between file type and save/close buttons. Have Qt any ways to do it? 回答1: You can customize the Qt file dialog as long as you're okay with using the "non-native" Qt file dialog that comes with Qt; the other option Qt provides is to use the OS's native file dialog, but if you do that there is no way (that I'm aware of) to customize the dialog. Here's an example

python cx_Freeze askopenfile

折月煮酒 提交于 2019-12-24 15:31:34
问题 Following file (Python 3.7) does everything it is supposed to do. When I press the “Open file” button it opens “askopenfilename” dialog. import tkinter as tk from tkinter import ttk from tkinter import filedialog as fd from tkinter import messagebox from os import path class GUI(tk.Tk): def __init__(self): self.win=tk.Tk() self.create_widgets() def exitfcn(self): result = tk.messagebox.askquestion('Warning', 'Exit?') if result == 'yes': self.win.destroy() # Button callback def getFileName

Using VBA to enter a vlookup function in a cell using user chosen file

别说谁变了你拦得住时间么 提交于 2019-12-24 13:10:15
问题 I am trying to build a sub that will enter a formula into a cell, filldown the vlookup formula to lastrow, then copy the formula and pastespecial->values for the entire range. The table I use in vLookup is located in a separate file that is not always stored in the same location. The Table is always formatted the same, but the table size is not always the same. I have to do this on 4 different worksheets and the column that I have to enter this formula in has a heading of "Order Grade". I use

PySide2 v5.12 : Creating a FileDialog on a click of a button

南楼画角 提交于 2019-12-24 01:23:59
问题 I designed a basic UI in the QtDesigner. Now i am trying to pop a simple file dialog on click of a button, below given is my GUI Code : from PySide2 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): ..... ..... self.input_Image_GraphicsView = QtWidgets.QGraphicsView(self.centralwidget) self.input_Image_GraphicsView.setGeometry(QtCore.QRect(730, 110, 480, 320)) self.input_Image_GraphicsView.setObjectName("input_Image_GraphicsView") ...... self.output

MS Office SaveAs type FileDialog with a filter in vb

旧时模样 提交于 2019-12-23 11:59:06
问题 I want to create a 'save as' file dialog with a filter, but this doesn't seem possible using the FileDialog class (Microsoft Office 12.0 Object Library). The documentation actually mentions this here, see last paragraph, but gives no reason as to why? Is there another way of achieving this in vb? I find it strange that the FileDialog class doesn't allow this because Word, Excel and Access all have this exact SaveAs feature built-in. I realise that the FileDialog can created as a FilePicker

JFileChooser vs JDialog vs FileDialog

我与影子孤独终老i 提交于 2019-12-22 10:59:50
问题 I need to know which of the 3 is best for me. My requirements are as follows in order of importance: Save and load files with ease. File type filter during file selection (not afterwards). Look and feel is exactly the same as the native OS L&F. If there is a dialog that I've not mentioned that would be more ideal, please let me know. 回答1: What is the rest of your application written in? If you used AWT you should use FileDialog. If you used Swing you should use JFileChooser. Both classes meet

Need FileDialog with a file type filter in Java

冷暖自知 提交于 2019-12-22 08:18:55
问题 I have a JDialog with a button/textfield for the user to select a file. Here's the code: FileDialog chooser = new FileDialog(this, "Save As", FileDialog.SAVE ); String startDir = saveAsField.getText().substring( 0, saveAsField.getText().lastIndexOf('\\') ); chooser.setDirectory(startDir); chooser.setVisible(true); String fileName = chooser.getFile(); My problem is that instead of seeing an All Files filter, I want to provide a custom filter, e.g. for Word docs or something. I setup a custom

Python Tkinter: Adding widgets to file dialogs

a 夏天 提交于 2019-12-18 08:54:34
问题 I am using Tkinter with Python 2.6 and 2.7 for programming graphic user interfaces. These User Interfaces contain dialogs for opening files and saving data from the tkFileDialog module. I would like to adapt the dialogs and add some further entry widgets e.g. for letting the user leave comments. Is there any way for doing so? It seems that the file dialogs are taken directly from the operating system. In Tkinter they are derived from the Dialog class in the tkCommonDialog module and call the

qt filedialog directory [duplicate]

限于喜欢 提交于 2019-12-13 11:17:12
问题 This question already has an answer here : Copy path to QString (1 answer) Closed 5 years ago . i got a QString blabla = qtfiledialog::getOpenFileName(); now blabla gives me the full path and the exe like: C:/Program Files/imanoob.exe but i only want the path like: C:/Program Files/ how to do this? 回答1: QFileInfo fileInfo(path); const QString path = fileInfo.absolutePath(); 回答2: QString getExistingDirectory to get a directory path. Or parse the returned string from getOpenFileName() by using

Filter not working in FileDialog

一笑奈何 提交于 2019-12-13 07:52:19
问题 I have to replace JFileChooser with FileDialog. I could not Filter out the file. Following is the code. The filter is also not visible on the Save FileDialog and also user is able to save the file file with different ext. The environment is windows 10 public class ABCDialog extends JDialog { private String fileName = StringUtils.Empty; public ABCDialog (Frame frame,String title) { super(frame, title); ..... } public String getFileName () { return fileName; } private String setFileName () {