Questions tagged [getopenfilename]

QFileDialog::getOpenFileName is a static function provided by Qt to show a dialog for opening a file. If a file is selected, this function return the path of the file.

96 questions
-1
votes
3 answers

C++ Simple IF clause changes value of a static const char variable

Okay, I've been dealing with this for two days now, and I can't find a solution. Problem: I'm trying to set a filter to a File Selection Dialog using Winapi. I'm using GetOpenFileName function to do this. This function uses a structure to set…
ProtectedVoid
  • 1,293
  • 3
  • 17
  • 42
-2
votes
1 answer

How do i get names outputted when i read a file

i am having trouble with reading names from a file the file contains a name and their score #include #include #include using namespace std; int main(){ // ifstream reader; const int arraySize=100; //storing names and…
victoria
  • 1
  • 1
-2
votes
1 answer

How to get the path to a file by using the QFileDialog.getOpenFileName() function?

I am trying to display the name of a user-selected file in a line-edit box (for a QGIS python plugin), but nothing happens when I run the code. Here is my code: from PyQt5.QtWidgets import QFileDialog filename = QFileDialog.getOpenFileName(self,…
Pawel
  • 39
  • 1
-2
votes
2 answers

Why am I getting this type error? TypeError: '>=' not supported between instances of 'str' and 'int'

I am a newbie student and trying to write a program that converts a list of raw scores to a list of letter grades. I need the loop, file open/close, if-elif-else statements, and 2 functions for the criteria of my assignment. The file I'm opening for…
-3
votes
1 answer

How to make a unique dataframe from multiple .txt files?

I'm trying to make a data frame from multiple .txt files. It may be important to say, those .txt files used to be .dat files, which I've just converted by changing the .dat to .txt. Anyway, it opens normally with a double click. My code is: path =…
-3
votes
1 answer

Check the validity of a file opened in Excel using Application.GetOpenFilename

Is there an easy way to check if a file, opened using Application.GetOpenFilename, has the expected structure? For example, the value of A1 in the first sheet have to be "Archive". If the file is not as expected, then the VBA script should not…
agustin
  • 1,311
  • 20
  • 42
1 2 3 4 5 6
7