how to get current path in qt
来源:互联网 发布:windows ble蓝牙开发 编辑:程序博客网 时间:2024/04/29 02:45
method 1:
cout << QDir::currentPath().toUtf8().constData(); //home/tjiang/Workspace/TestQT/build-TestCGAL-Desktop_Qt_5_3_0_GCC_64bit-Debug
method 2:
define a macro in pro file
message($${PWD}) #/home/tjiang/Workspace/TestQT/TestCGAL#message($(PWD)) #/home/tjiangDEFINES += CGAL_EIGEN3_ENABLEDDEFINES += PROJECT_PATH=\\\"$${PWD}\\\"
then use this macro to define a variable in cpp file
QString projectPath(PROJECT_PATH); cout << projectPath.toUtf8().constData();
0 0
- how to get current path in qt
- How to get current date in magento?
- How to get current thread ID in asp.net
- how to get cwd(current working directory) in python?
- How to get file path in onActivityResult in Android 4.4
- How to get the current time in milliseconds in C Programming?
- how to get current tss address
- How to get the current epoch time
- How to get current full screen dimention and orientation in run time
- How to get current date time in SharePoint Site Time Zone
- Magento 获取当前货币和货币符How to get current currency in Magento
- how to access current Project in eclipse?
- How to get a path to a resource in a Java JAR file
- get current project path
- How to get service execuable path
- PHP: How to Get the Current Page URL
- How to get the current user logged into Sharepoint
- SQL - How to get the current day, month and year
- 论----计算机程序智能化
- LeetCode_39 Combination Sum
- MSB&LSB与Endianness
- LeetCode_40 Combination Sum II
- 【Leetcode】Copy List with Random Pointer
- how to get current path in qt
- xfire客户端调用cxf服务端,一直报错
- hdu 1806 RMQ
- Leetcode 252Meeting Rooms
- Leetcode 253Meeting Rooms II
- Leetcode 296Best Meeting Point
- 202——砖块染色问题 Blocks (POJ 3734)
- 如何让win7崩溃
- Leetcode 286.Walls and Gates