Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. forgot to setup the environment using 'qmake -projects'
Forum Updated to NodeBB v4.3 + New Features

forgot to setup the environment using 'qmake -projects'

Scheduled Pinned Locked Moved Solved General and Desktop
environment
23 Posts 4 Posters 2.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    uglybug
    wrote on last edited by
    #21

    Success !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    QStringList fileNames;
    if (dialog.exec()) {
    fileNames = dialog.selectedFiles();
    // ".exactMatch" is discontinued in Qt6 so i am using @Christian-Ehrlicher suggestion ".
    QStringList str = fileNames;
    if (str.endsWith(".jpeg")){
    return;
    }
    i don't want to break this now working windows program but, if i wanted to test for 'bmp' and 'png' file extensions
    would it look something like:
    if (str.endsWith(".jpeg"||".bmp"||".png"))

    thanks to @SGaist @Pl45m4 @Christian-Ehrlicher for all the this help and to forum readers who didn't make snide remaks.

    1 Reply Last reply
    0
    • U uglybug has marked this topic as solved on
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #22

      You would either have multiple or statements using endsWith or use QRegularExpression.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        uglybug
        wrote on last edited by
        #23

        @SGaist thank you for your answer. i am so appreciative of all the help i received on this forum. it's amazing how quickly the assistance arrives.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved