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. Qt modules don't seem to work
Forum Updated to NodeBB v4.3 + New Features

Qt modules don't seem to work

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 4 Posters 854 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.
  • P Offline
    P Offline
    PiotrWojtowicz
    wrote on last edited by PiotrWojtowicz
    #1

    So I was going to write some code in c++ and I wanted to connect to my databases and write some queery. Qt += sql doesn't work for me and I don't have access to QtSql lib, I have the same problem with every other module that you can find in docs, for example I was going to work with some network connections with my program but I couldn't use QtNetwork (always the same problem "file not found" ). Maybe there's something I do wrong so I'll show steps I make:

    1. I add Qt += (here module)
    2. I rebuild .pro file

    They write in documentacion, it's enough... but not in my situation. If you don't have any clues I will reinstall Qt and see if it changed anything. Also what I've noticed is I don't have location src\plugins, maybe this is the main problem. Any answer would be appreciated.
    Oh this is my first post and so I don't know if the category is correct.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What version of Qt are you using ?
      How did you install it ?
      What OS are you running ?

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

      P 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        What version of Qt are you using ?
        How did you install it ?
        What OS are you running ?

        P Offline
        P Offline
        PiotrWojtowicz
        wrote on last edited by
        #3

        @SGaist Hello, thanks for response!

        1. So according to info from Qt IDE it's "Qt Creator 4.8.2 '\n' Based on Qt 5.12.1 (MSVC 2015, 32 bit)".
        2. I downloaded installation .exe from official website
        3. Windows 10 Home 64bit

        I use mingw64 g++ as compiler.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          That's the version of Qt Creator and the Qt version used to build it. Now what version are you using to build your application ?
          Can you also share your .pro file ?

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

          P 1 Reply Last reply
          0
          • SGaistS SGaist

            That's the version of Qt Creator and the Qt version used to build it. Now what version are you using to build your application ?
            Can you also share your .pro file ?

            P Offline
            P Offline
            PiotrWojtowicz
            wrote on last edited by
            #5

            @SGaist So I think it's Qt Creator 4.8.2 (if it's not what you are looking for tell me where to find it, sorry I'm still learning). Here's my .pro file
            TEMPLATE = app
            CONFIG += console c++11
            CONFIG -= app_bundle
            CONFIG -= qt
            QT += network
            QT += sql
            SOURCES += \
            main.cpp

            jsulmJ 1 Reply Last reply
            0
            • P Offline
              P Offline
              PiotrWojtowicz
              wrote on last edited by PiotrWojtowicz
              #6

              Ok I think I know where is the problem, there's CONFIG -= qt, when I deleted it, I was able to compile "hello world" program with QtNetwork and QtSql. I'm waiting for verification if this is the clue. However there is still a case if i can compile it, why in my Qt directory I don't have 'src\plugins'.

              JKSHJ 1 Reply Last reply
              0
              • P PiotrWojtowicz

                Ok I think I know where is the problem, there's CONFIG -= qt, when I deleted it, I was able to compile "hello world" program with QtNetwork and QtSql. I'm waiting for verification if this is the clue. However there is still a case if i can compile it, why in my Qt directory I don't have 'src\plugins'.

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by JKSH
                #7

                @PiotrWojtowicz said in Qt modules don't seem to work:

                Ok I think I know where is the problem, there's CONFIG -= qt

                Yes, that's a problem. CONFIG -= qt means "Remove Qt from this project" or "Don't use Qt in this project".

                why in my Qt directory I don't have 'src\plugins'

                This is only available when you download the Qt source code. You only need it if you want to build the plugin from source.

                You don't need it if you use a pre-built plugin.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                3
                • P PiotrWojtowicz

                  @SGaist So I think it's Qt Creator 4.8.2 (if it's not what you are looking for tell me where to find it, sorry I'm still learning). Here's my .pro file
                  TEMPLATE = app
                  CONFIG += console c++11
                  CONFIG -= app_bundle
                  CONFIG -= qt
                  QT += network
                  QT += sql
                  SOURCES += \
                  main.cpp

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @PiotrWojtowicz said in Qt modules don't seem to work:

                  So I think it's Qt Creator 4.8.2

                  Again: this is QtCreator version NOT Qt.
                  QtCreator != Qt

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  P 1 Reply Last reply
                  2
                  • jsulmJ jsulm

                    @PiotrWojtowicz said in Qt modules don't seem to work:

                    So I think it's Qt Creator 4.8.2

                    Again: this is QtCreator version NOT Qt.
                    QtCreator != Qt

                    P Offline
                    P Offline
                    PiotrWojtowicz
                    wrote on last edited by
                    #9

                    @jsulm Thank you for advice, could you tell me where should I look for Qt version then?

                    jsulmJ 1 Reply Last reply
                    0
                    • P PiotrWojtowicz

                      @jsulm Thank you for advice, could you tell me where should I look for Qt version then?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @PiotrWojtowicz said in Qt modules don't seem to work:

                      where should I look for Qt version then?

                      In QtCreator in your Kit configuration (Tools/Options.../Build & Run).

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      P 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @PiotrWojtowicz said in Qt modules don't seem to work:

                        where should I look for Qt version then?

                        In QtCreator in your Kit configuration (Tools/Options.../Build & Run).

                        P Offline
                        P Offline
                        PiotrWojtowicz
                        wrote on last edited by
                        #11

                        @jsulm So my version is 5.12.1

                        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