Skip to content
QtWS25 Last Chance
  • 0 Votes
    3 Posts
    470 Views
    JonBJ
    @jsulm OoI, why did Qt6 QString feel the need to introduce sliced() when we have had mid() for years? EDIT Oh, mid() docs now say If you know that position and n cannot be out of bounds, use sliced() instead in new code, because it is faster.
  • 0 Votes
    6 Posts
    944 Views
    ekkescornerE
    @ekkescorner Assam Boudjelthia has done a great work on this and now prepared cherry-picks for 5.15 🙂 see QTBUG-98974 can someone help and test ?
  • 0 Votes
    3 Posts
    819 Views
    JuniorMLedesmaJ
    Hello, I want to know how to add a suffix to a file after saving it on filedialog in qml and I came here in hope to find my answer. But It makes me sad when I can't find it. I tried filePath = filePath + '.txt' but isn't working for me. Can anyone share a website with me in which I can find the solution? I will be very much thankful to you.
  • 0 Votes
    8 Posts
    817 Views
    H
    it worked. thanks @VRonin
  • Copy and paste contents of one file to another and modify

    Solved General and Desktop file
    8
    0 Votes
    8 Posts
    2k Views
    R
    @JonB Thanks a lot. Solved it by this: outstream<<line<<'\n'; :)
  • QCryptographicHash results mismatches

    Solved General and Desktop qcryptographich file
    12
    0 Votes
    12 Posts
    2k Views
    B
    @Christian-Ehrlicher No, and I asked you to check the original question rather than the latest update, which you seem to have trouble understanding without the original context. So here's the quote from the original question for you: When I run this [code in question] under GNU/Linux the output hash is the same as a result of running command line tool md5 or md5sum. When I run the very same code under MacOS - I get different hashes from the application and command line. I never wrote I was trying to compare hashes between two different OSes (and files for that matter). The mismatch was between hash given by the Qt code I quoted and the regular command line tool hashing a file on the same OS.
  • Double Spin Box Save to the file

    Unsolved General and Desktop doublespinbox save file spinbox
    7
    0 Votes
    7 Posts
    1k Views
    JonBJ
    @suslucoder said in Double Spin Box Save to the file: Is it possible to do it? Is it possible to do what? The fact that you divide your UI so that the data is presented on separate tabs/pages (which is fine) has nothing to do with whether it is possible to save data, nor whether you might adopt a QDataWidgetMapper approach.
  • How can I add txt file datas in QLineSeries?

    Unsolved General and Desktop read file chart
    2
    0 Votes
    2 Posts
    503 Views
    jsulmJ
    @suslucoder As the error message tells you addSeries takes a QAbstractSeries, not a string list as parameter. You have to pass it one of the QAreaSeries, QBoxPlotSeries, QCandlestickSeries, QPieSeries, and QXYSeries. You also should tell us what data your file actually contains? If it contains x/y values then you first have to convert the data to numbers and create a QXYSeries instance and fill it with that data (https://doc.qt.io/qt-5/qxyseries.html#append).
  • Read data from txt and plot it in real time

    Unsolved General and Desktop file plotting realtime
    9
    0 Votes
    9 Posts
    2k Views
    D
    Okey thank u
  • 0 Votes
    4 Posts
    1k Views
    M
    I think you can bundle lupdate in your application and create qm file on the fly. P.S. : TS files are just xml files, so you can change them in your own application, via user feedback or something else
  • Read .odt file and loop over characters

    Unsolved General and Desktop odt html file qtextdocument
    6
    0 Votes
    6 Posts
    1k Views
    T
    @artwaw Yes, it works fine eventually :)
  • File not found

    Solved QML and Qt Quick qml file directory file not found
    5
    0 Votes
    5 Posts
    1k Views
    T
    @JonB Oh yeah sorry.. I wasn't reading the right. It was opening in a VS text editor. I tried running it with notepad and it worked. I guess VS has something where they keep the file open, so i couldn't edit it and then update the display.
  • 0 Votes
    10 Posts
    6k Views
    ekkescornerE
    @shokarta try with Android FileDialog FileDialog { title: qsTr("Select a File") fileMode: FileDialog.OpenFile onAccepted: { if(selectedFiles.length) { console.log("we selected: ", selectedFiles[0]) Selected File 'München.pdf' from FileDialog ...this gives you per ex: content://com.android.providers.downloads.documents/document/32 // you can check from C++ and verify fileUrl: QFileInfo fileInfo(fileUrl); qDebug() << "verifying fileUrl: " << fileUrl; qDebug() << "BASE: " << fileInfo.baseName(); qDebug() << "FileName: " << fileInfo.fileName(); qDebug() << "Path: " << fileInfo.path(); qDebug() << "absoluteFilePath: " << fileInfo.absoluteFilePath(); return fileInfo.exists(); this gives you: verifying fileUrl: "content://com.android.providers.downloads.documents/document/32" BASE: "München" FileName: "München.pdf" Path: "content://com.android.providers.downloads.documents/document" absoluteFilePath: "content://com.android.providers.downloads.documents/document/32" file exists
  • 0 Votes
    3 Posts
    1k Views
    L
    @J.Hilk Thanks for your answer. But I want to ask how can I know I have to choose one over the another? After running the application "Bluetooth File Transfer" I faced the following error: [image: d6625786-e28b-4f23-b792-216e5877e217.PNG] Thanks in advance!
  • Preference file?

    Solved General and Desktop preference file saving
    3
    0 Votes
    3 Posts
    918 Views
    G
    @kenchan said in Preference file?: @GhostWolf Take a look at the QSettings class here Just had the chance to test. Thanx a lot
  • Downloading file from FTP server

    Unsolved General and Desktop windows 10 ftp ftp repository download file
    13
    0 Votes
    13 Posts
    12k Views
    VRoninV
    #include <QCoreApplication> #include <QNetworkAccessManager> #include <QNetworkReply> #include <QNetworkRequest> int main(int argc, char *argv[]) { QCoreApplication a(argc,argv); QNetworkAccessManager netMan; QNetworkReply* const repl = netMan.get(QNetworkRequest(QUrl::fromUserInput(R"**(ftp://131.225.104.13/linux/.snapshot/NDMP_AUTO_SNAPSHOT3210/fermi/contrib/obsolete/video/nvidia/5328/NVIDIA.5328.README.txt)**"))); QObject::connect(repl,&QNetworkReply::readyRead,[repl]()->void{ qDebug().noquote() << repl->readAll(); }); QObject::connect(repl,QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error),[repl]()->void{ qDebug() << "Error: " + repl->errorString(); }); QObject::connect(repl,&QNetworkReply::finished,repl,&QNetworkReply::deleteLater); QObject::connect(&netMan,&QNetworkAccessManager::authenticationRequired,repl,[repl](QNetworkReply *reply, QAuthenticator *authenticator)->void{ if(reply!=repl) return; aAuthenticator->setUser("MyUserName"); aAuthenticator->setPassword("MyPassword"); }); return a.exec(); }
  • how to select file and then print to printer ?

    Unsolved General and Desktop print pdf file printsupport
    11
    0 Votes
    11 Posts
    9k Views
    JonBJ
    @Qjay This may not help because I do not know quite how you would do this directly from Qt, but when we want to print a PDF under Windows we use the underlying Win32 function ShellExecute() (https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx) to go (effectively) ShellExecute("print", native-path-to-file), and let Windows shell sort it out. This is effectively the same as right-clicking on the file and picking the Print action. So you don't need to know anything about the actual process which does the printing, its arguments etc.
  • Uploading an xml file to Qt app

    Solved General and Desktop xml file upload read
    7
    0 Votes
    7 Posts
    2k Views
    L
    @koahnig Thanx mate
  • QHttpMultiPart not working

    Unsolved General and Desktop qhttpmultipart file upload
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied