Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. visual studio
    Log in to post

    • UNSOLVED QML_IMPORT_PATH equivalent in Visual Studio (Qt VS Tools) for qml modules
      General and Desktop • qml visual studio msbuild • • maestro22  

      1
      0
      Votes
      1
      Posts
      94
      Views

      No one has replied

    • UNSOLVED How to add qt config on visual studio?
      General and Desktop • visual studio qt vs tools qt config resource big • • MintogoDeveloper  

      2
      0
      Votes
      2
      Posts
      397
      Views

      It goes by a different name in the VS Tools. When you're not building with qmake there's no pro file and no CONFIG. You configure individual parameters of the tools used in the build process. For this particular option go to the project properties -> Qt Resource Compiler -> rcc and the option is called "Two-Pass Mode" here. Set it to Yes.
    • UNSOLVED Qt Visual Studio Tools
      Tools • visual studio qmetaobject rpi visualgdb superdata • • sbartolett  

      4
      0
      Votes
      4
      Posts
      416
      Views

      We have a little more information regarding our problem. When using Visual GDB to create a new QT project for Raspberry PI, if the toolchain folder ‘C:\SysGCC\raspberry\Qt\v5-CMake’ doesn’t exist or is empty, the QT build tools are automatically downloaded and installed. The problem we are seeing is that the build tools end up being a different version (Qt v5.15.2) than what is being used on our target Raspberry Pi platform (Qt v5.12.3). This results in the following error produced by the moc compiler indicating that its attempting to compile using the much newer header libraries. LinuxProject1_autogen/EWIEGA46WW/moc_MainWindow.cpp:80:18: error: 'QMetaObject::SuperData' has not been declared QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(), ^~~~~~~~~ LinuxProject1_autogen/EWIEGA46WW/moc_MainWindow.cpp:80:65: error: expected primary-expression before ')' token QMetaObject::SuperData::linkQMainWindow::staticMetaObject(), Is there anything we can set in Visual Studio or elsewhere that will insure the downloaded Qt build tools match the Qt version on the target board? This is our development environment Windows 10 Visual Studio 2017 Qt Visual Studio Tools Version 2.8.1.6 Visual GDB 5.6R2 Qt build tools vers 5.12.3 And we are targetting Raspberry PI OS vresion Raspbian 10. We are working around this problem by manually copying the odler set of build tools into ‘C:\SysGCC\raspberry\Qt\v5-CMake’ before making a new project using VisualGDB. We were fortunate that we had an older set of Qt build tools on another development PC to copy these from. This is not a good long term solution for us.
    • UNSOLVED Undeclared QMetaObject::SuperData
      Tools • visual studio raspberry pi visualgdb • • sbartolett  

      2
      0
      Votes
      2
      Posts
      492
      Views

      @sbartolett said in Undeclared QMetaObject::SuperData: Not sure if this error is caused by an incompatibility of versions or not. T At leasr you should not mix them. Remove the 5.15.5 stuff from your build system (did not say what you're using).
    • SOLVED How do I use Qt headers in a CMake sub-project?
      General and Desktop • windows cmake visual studio msvc msvc2017 • • tuzepoito  

      6
      0
      Votes
      6
      Posts
      1082
      Views

      @tuzepoito said in How do I use Qt headers in a CMake sub-project?: I think I have a solution, or maybe a workaround. Why workaround? If you want to use a library, you have to link against it what you're doing now - how should this be a workaround?
    • UNSOLVED Fresh windows, cant link QT...
      Tools • qtcreator visual studio linking clion-ide • • Dariusz  

      1
      0
      Votes
      1
      Posts
      232
      Views

      No one has replied

    • UNSOLVED Cannot open include file: ui_*.h when using multiple Qt projects in the same Visual Studios solution
      General and Desktop • windows visual studio x64 ui header • • Armaan Bandali  

      4
      0
      Votes
      4
      Posts
      214
      Views

      My second solution would be much more portable.
    • SOLVED How to use Qt VS Tools on VS BuildTools for CI/CD
      Tools • visual studio docker extension ci build • • Giovanni Cerretani  

      2
      1
      Votes
      2
      Posts
      224
      Views

      Solved using this answer on StackOverflow.
    • UNSOLVED How to deploy Qt C++ Application on Windows when i used Visual Studio to create my application
      General and Desktop • c++ visual studio qt 5.4 qtwidgets • • learnist  

      6
      0
      Votes
      6
      Posts
      1296
      Views

      To solve the VCINSTALLDIR problem, start the command prompt from your start menu -> Visual Studio 2017 -> x64 Native Tools Command Prompt (be sure not the ones with x86) Then call : set PATH=C:\Qt\5.14.1\msvc2017_64\bin;%PATH% to make both vc and qt dirs in your PATH. To force deploying the release binaries, add --release after windeployqt.
    • SOLVED Visual Studio 2019/Qt C++ Executable file not working ?
      General and Desktop • c++ qwidget visual studio qt 5.4 • • learnist  

      11
      0
      Votes
      11
      Posts
      4261
      Views

      @Pablo-J-Rogina Thanks , This worked just perfect.
    • UNSOLVED System Cannot Find Path Specified
      General and Desktop • c++ cmake visual studio compiler • • surferbrain  

      25
      0
      Votes
      25
      Posts
      4303
      Views

      yeah after talking to someone, I came up with a solution... hopefully this works
    • SOLVED Is it possible to compile only a part of the Qt source code?
      Installation and Deployment • visual studio compile source code qtsvg • • jeanmilost  

      6
      0
      Votes
      6
      Posts
      413
      Views

      Thank you very much
    • SOLVED Issue with Qt Visual Studio Tools in MSVC 2019
      Tools • visual studio addon visual sudio to • • mattheuw  

      2
      0
      Votes
      2
      Posts
      734
      Views

      Finally found a solution, for those of you who have the same issue, I removed Qt and Visual Studio, then installed Qt again and Visual Studio, and now it is showing properly in the Extensions menu
    • UNSOLVED QWidget actual position is shifted down right after updating Qt libraries to 5.14.1 when using a QDockWidget
      General and Desktop • c++ visual studio qdockwidget qt5.8.0 qt5.14.1 • • AleRao  

      3
      0
      Votes
      3
      Posts
      258
      Views

      Hi and welcome to devnet, That is pretty intriguing... Are you able to reproduce that with a minimal compilable example ?
    • SOLVED Create installer with Visual Studio 2017
      Installation and Deployment • visual studio installer • • GVI02  

      3
      0
      Votes
      3
      Posts
      237
      Views

      Thanks that helped a lot.
    • SOLVED Error 3668 when building QT Application against QT 5.11 with Visual Studio 2015
      General and Desktop • visual studio preprocessor • • vaultnerd  

      4
      0
      Votes
      4
      Posts
      253
      Views

      @vaultnerd Then please mark this topic as solved, thx.
    • UNSOLVED Qt VS Tools, QML Debugging
      Tools • qml visual studio • • Quawetim  

      3
      0
      Votes
      3
      Posts
      823
      Views

      Posting for the sake of other developers searching for solutions of similar issues. I had hard time using QML debugging within Visual Studio. The QML debug process mentioned in the original Qt blog post was starting but then exiting after a minute or so with the Debug output like The thread 'QML Debugger' (0x457c) has exited with code 0 (0x0). The program 'My Application.exe: QML Debugger' has exited with code 0 (0x0). My breakpoints in QML code were inactive with a tooltip The breakpoint will not currently be hit. No symbols have been loaded for this document. After some research, I found the following hint in the QML Debugging Infrastructure documentation: Note: The qmltooling plugins that are required for debugging and profiling QML applications on devices are automatically installed during Qt installation. They must be deployed to the devices for debugging and profiling to work. Once I copied that directory from Qt into my application, next to other plug-in directories like platforms, from the next debugging session things started to work the way announced in the blog post. Qt 5.15.2, VS 2017 (15.9.34), Qt VS Tools 2.7.1-8.
    • SOLVED QPushButton not clickable even if activated
      General and Desktop • visual studio qpushbutton qt 5.12 vs 2019 qt 5.12.4 • • Lanfeust  

      7
      0
      Votes
      7
      Posts
      1911
      Views

      Thank you everbody, thanks to you I have found a way to correct my program. I did as you told me to do: I removed everything the Constructor object knew about its parent (puting it in the parent instead) and the problem went away. I still don't know from where it was coming, but we can clearly see that having a better-programmed program helps to correct some bugs. ^^ Thanks again to everybody. :D If you want my corrected code, here it is: main.cpp (nothing changed) #include "Window.h" #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Window w; w.show(); return a.exec(); } Window.h #ifndef DEF_WINDOW #define DEF_WINDOW #include "Constructor.h" #include <QWidget> #include <QVBoxLayout> #include <QPushButton> #include <vector> class Window : public QWidget { Q_OBJECT public: Window(); public slots: void addConstructor(); void destroyConstructor(Constructor*); private: QVBoxLayout* mainLayout = new QVBoxLayout; QVBoxLayout* constructorLayout = new QVBoxLayout; std::vector<Constructor*>* constructorVector = new std::vector<Constructor*>; QPushButton* addConstructorButton = new QPushButton("+", this); }; #endif Window.cpp #include "Window.h" Window::Window() { connect(addConstructorButton, SIGNAL(clicked()), this, SLOT(addConstructor())); mainLayout->addLayout(constructorLayout); mainLayout->addWidget(addConstructorButton); setLayout(mainLayout); } void Window::addConstructor() { Constructor* c = new Constructor(this); constructorLayout->addWidget(c); constructorVector->push_back(c); connect(c, SIGNAL(mustBeDestroyed(Constructor*)), this, SLOT(destroyConstructor(Constructor*))); } void Window::destroyConstructor(Constructor* c) { constructorLayout->removeWidget(c); //remove object from vector for (int i = 0; i < constructorVector->size(); i++) if (constructorVector->at(i) == c) { constructorVector->erase(constructorVector->begin() + i); break; } } Constructor,h #ifndef DEF_CONSTRUCTOR #define DEF_CONSTRUCTOR #include <QWidget> #include <QLineEdit> #include <QHBoxLayout> #include <QPushButton> #include <QLayout> #include <vector> class Constructor : public QWidget { Q_OBJECT public: Constructor(QWidget* parentWidget); public slots: void destroySelf(); signals: void mustBeDestroyed(Constructor*); private: QLineEdit* lineEdit = new QLineEdit(this); QPushButton* destroyConstructorButton = new QPushButton("-", this); }; #endif Constructor.cpp #include "Constructor.h" Constructor::Constructor(QWidget* parentWidget) : QWidget(parentWidget) { connect(destroyConstructorButton, SIGNAL(clicked()), this, SLOT(destroySelf())); QHBoxLayout* layout = new QHBoxLayout; layout->addWidget(lineEdit); layout->addWidget(destroyConstructorButton); setLayout(layout); } void Constructor::destroySelf() { delete lineEdit; delete destroyConstructorButton; emit mustBeDestroyed(this); this->disconnect(); delete this; }
    • UNSOLVED How do I make my app appear on the secondary monitor?
      General and Desktop • qt creator visual studio multi monitor • • Sprezzatura  

      4
      0
      Votes
      4
      Posts
      3447
      Views

      Hi, try: myWidget->setGeometry(secondScreenGeometry);
    • SOLVED Error C2440 Qt Creator not allowing literals to be passed as "char *"
      Independent Developers • qt creator visual studio • • Sprezzatura  

      9
      0
      Votes
      9
      Posts
      2540
      Views

      @aha_1980, @Buckwheat Thank you very much! This is very helpful. Don't worry, this code has been in production for twenty-five (25) years, and has run on hundreds of thousands of desktops. It was first written with compilers that didn't have 'const'! We'll deal with it when we have a program that runs. It's all good :o)
    • SOLVED QODBC problem with VisualStudio 2017 & SQL Server 2017
      General and Desktop • visual studio c++ qt c++ windows sql server database odbc p • • Ovidiu_GCO  

      10
      0
      Votes
      10
      Posts
      1247
      Views

      @jsulm You were right. I finally understood what you meant by getting the db at any time. Thank you very much for your help! This is my working code: #include "f1_system.h" #include <QtSql/qsqldatabase.h> #include <QtSql/qsqlquery.h> #include <QtSql/qsqlerror.h> #include <QtSql/qsqldriver.h> F1_System::F1_System(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", "dataB"); QString connectionString = "Driver={SQL Server};Server=DESKTOP-4K9MAS2\\SQLEXPRESS01;Database=Formula1_BD;Trusted_Connection=yes;"; db.setDatabaseName(connectionString); connect(ui.loginPushButton, SIGNAL(clicked()), this, SLOT(validateLogin())); } F1_System::~F1_System() { QSqlDatabase::database("dataB").close(); } void F1_System::validateLogin() { if (QSqlDatabase::database("dataB").open()) { QString selectUser("SELECT Username FROM Users WHERE Username = '" + ui.usernameInputField->text() + "' AND Userpassword = '" + ui.passwordInputField->text() + "';"); QSqlQuery qry(selectUser, QSqlDatabase::database("dataB")); if (qry.next()) ui.label->setText("Status: You are logged in!"); else ui.label->setText("Status: Wrong credentials!\nTry again!"); } else ui.label->setText("Failed to connect to the database!"); }
    • SOLVED Visual Studio 15.8.0 and Qt 5.11.1 does not compile (QRandom/std::aligned_storage)
      General and Desktop • visual studio • • sophonet  

      6
      1
      Votes
      6
      Posts
      1778
      Views

      Hello @sophonet , thank you very much for your answer. You are right. In the meantime, my problem with Qt 5.9.5 was solved: [https://codereview.qt-project.org/#/c/236948/2/src/corelib/tools/qalgorithms.h](link url) Many greetings from Germany, Matthias
    • SOLVED Problem with new Visual Studio update 2017 Version 15.8.0 and Qt 5.9.5
      General and Desktop • visual studio • • QMatthias  

      29
      0
      Votes
      29
      Posts
      29023
      Views

      @Taytoo Thank you very much!
    • UNSOLVED How to configure Visual Studio to stop on qfatal?
      General and Desktop • visual studio debug qt 5.5 qfatal • • Alain38 0  

      11
      0
      Votes
      11
      Posts
      1457
      Views

      @JonB Do not misunderstand. I have not said that I will not try your solution. I have just explained my temporary approach that I'm currently using to find the origin of my crashes. For the future I will take time to investigate more with the hope to have a generic solution to apply on all my VS solutions.
    • UNSOLVED Cannot turn on overlay plane using OpenGL in Qt5
      General and Desktop • qt5 opengl visual studio • • MikeKit  

      6
      0
      Votes
      6
      Posts
      1192
      Views

      Before crossing that feature definitively, I'd recommend asking on the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.
    • SOLVED The application was unable to start correctly 0xc000007b
      Installation and Deployment • visual studio deployment qwt windeployqt qt5.8.0 • • onat  

      5
      0
      Votes
      5
      Posts
      2659
      Views

      Perhaps some dll files are missing.
    • SOLVED qwtd.lib not found
      Installation and Deployment • windows 10 visual studio installation qwt qt 5.8.0 • • onat  

      3
      0
      Votes
      3
      Posts
      1788
      Views

      @SGaist It worked. Thank you so much.
    • UNSOLVED QT Error: No winrtrunner.exe found.
      Installation and Deployment • visual studio msvc2015 msvc2017 build and run begginer • • cc672012  

      3
      0
      Votes
      3
      Posts
      21392
      Views

      hi @cc672012 you may have several problems, but the first one is that you assigned a 32bit compiler to a 64bit Qt version. That will not work.
    • UNSOLVED No examples/program is getting executed with Qt5.10.0
      Installation and Deployment • windows windows 10 visual studio install crashed • • Qjay  

      9
      0
      Votes
      9
      Posts
      2261
      Views

      @aha_1980 i cleaned my old project build tried it again. The build is successful but when i try to run same error as mentioned above. any changes : just uninstalled Qt5.9.1 .other than that nothing much. this is my compiler tab if it helps any !! p.. i have downloaded windows 10 SDK too now there is no triangle on msvc 32bit one but the problem still remains :/ .
    • UNSOLVED Building QT from source code statically to be used with Visual Studio
      Installation and Deployment • visual studio deployment static build visual c++ x64 • • onat  

      2
      0
      Votes
      2
      Posts
      989
      Views

      Hi, Use the amd64 command prompt when building Qt.
    • UNSOLVED qt 5 problem in building with visual studio 2015
      Installation and Deployment • qt5.4 visual studio qtwebkit build qt qtscript • • userprogrammer  

      3
      0
      Votes
      3
      Posts
      1928
      Views

      Also note that Qt 5.4 was released before VS2015 came out, you should use at least Qt 5.6 with this compiler
    • UNSOLVED Can't launch application. dll is missing
      General and Desktop • windows visual studio dll • • za83  

      18
      0
      Votes
      18
      Posts
      11170
      Views

      Hi, One small correction: you can use Visual Studio 2017 with libraries built for VS2015, these two compilers are compatible (which is the first time two Microsoft Compilers are compatible).
    • UNSOLVED error lnk2038: mismatch detected for '_msc_ver'
      General and Desktop • visual studio qt4 visual c++ visual studio 2 • • srikanth  

      2
      0
      Votes
      2
      Posts
      2921
      Views

      @srikanth https://stackoverflow.com/questions/19575747/error-lnk2038-mismatch-detected-for-msc-ver-value-1600-doesnt-match-valu and others like https://stackoverflow.com/questions/14692019/linking-error-because-of-different-versions-msvc-and-qt-libraries
    • UNSOLVED Qt Charts: Access Violation exception
      General and Desktop • visual studio qtcharts • • Cephas  

      9
      0
      Votes
      9
      Posts
      6014
      Views

      In case anyone else falls into this error, i found the solution was that my Debug build in Visual studio was linked against QChart.lib, not QChartd.lib. Once i changed this it worked.
    • SOLVED QtWebEngineWidgets ERROR LNK2019
      General and Desktop • visual studio qtwebengine lnk2019 qtcreator4.3.1 • • madasionka  

      3
      0
      Votes
      3
      Posts
      1892
      Views

      Hi, Thanks for replying, I solved my issue. I was missing some "#include" in different files.
    • UNSOLVED Error adding Qt Android Version with QT VS Tool
      Mobile and Embedded • android qt5.5 visual studio • • jweber  

      2
      0
      Votes
      2
      Posts
      1378
      Views

      @jweber Hi and welcome to devnet forum I am not sure if this is possible at all. It is quite a long time back when I used MSVC. However, I am having no good feelings when I read your post. I had started recently compiling for Android. Since a couple of years I am using Qt creator and MinGW compiler. The Android compiling process is GCC-based as MinGW is. That is taking some ambiguities out. Therefore my recommendation you may save time and conserve some hair, when you are going directly to Qt creator when starting Qt for Android. The error message you are presenting is probably because of the mix MSVC and GCC-make, which might errornously recognized as linux version. I might be wrong there, but this looks fishy. In case you decide to follow my advice, also go directly to Qt 5.9.0 (at least). There seem to be recent change also on the Android side, which was not really helpful in getting started. I had struggled quite a bit when trying to follow the different advices and tutorials. "gradle" seems to have replaced "ant" already on Android. At the end I had decided to go directly to newest Qt5.9.0 at that time instead of fiddling around with the previous stuff. That went much easier.
    • UNSOLVED QT Designer : Resize QPushButton so it is always square
      General and Desktop • c++ visual studio qt designer windows 7 64 bi • • John_A._Myer  

      4
      0
      Votes
      4
      Posts
      3531
      Views

      @John_A._Myer yes
    • UNSOLVED Building DLL in Visual Studio with Static Linking to QT
      Installation and Deployment • visual studio dll static static linking visual c++ • • mlathrop  

      17
      0
      Votes
      17
      Posts
      7718
      Views

      @koahnig SetName takes in a char* because it is a part of an API. @kshegunov Here are the relevant linker calls. I don't know how to get the .pro file from a VS project. Here is the linker call in the project that makes the dll: /OUT:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.dll" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.pdb" /DYNAMICBASE "sl_zed64.lib" "opencv_world310.lib" "cudart.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "qtmain.lib" "Qt5Core.lib" "Qt5Multimedia.lib" "Qt5Gui.lib" "winmm.lib" /IMPLIB:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.lib" /DEBUG /DLL /MACHINE:X64 /OPT:REF /PGD:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\3DRelease\yyy3D.dll.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/lib/x64" /LIBPATH:"C:\Program Files (x86)\ZED SDK\dependencies\opencv_3.1.0/x64/vc14/lib" /LIBPATH:"C:\Program Files (x86)\ZED SDK\lib" /LIBPATH:"C:\Program Files\boost\boost_1_63_0/lib/x64" /LIBPATH:"C:\Qt\5.7\msvc2015_64\lib" /TLBID:1 Here is the linker call for the project that uses the dll and has the run time error: /OUT:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.dll" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.pdb" /DYNAMICBASE "Qt5Core.lib" "Qt5Gui.lib" "Qt5Multimedia.lib" "yyy3D.lib" "sl_zed64.lib" "opencv_world310.lib" "cudart.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /IMPLIB:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.lib" /DEBUG /DLL /MACHINE:X64 /OPT:REF /PGD:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.pgd" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Release\AerieLib.dll.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Qt\5.7\msvc2015_64\lib" /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/lib/x64" /LIBPATH:"C:\Program Files (x86)\ZED SDK\dependencies\opencv_3.1.0/x64/vc14/lib" /LIBPATH:"C:\Program Files (x86)\ZED SDK\lib" /LIBPATH:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin" /LIBPATH:"C:\Program Files\boost\boost_1_63_0/lib/x64/" /TLBID:1