Search Results

Search found 4081 results on 164 pages for 'qt mfc migration'.

Page 10/164 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • What exactly are signals and slots in Qt?

    - by Jen
    I know how they work conceptually, but how are signals and slots implemented in the Qt framework? Qt Creator treats them as keywords, but are they simply a set of macros, or is a special pre-processor required before these source files can be compiled? In other words, if I use Qt's signal/slot features in my code, can I easily compile it on any C++ compiler?

    Read the article

  • Connect to internet with Qt for symbian

    - by Martin
    I'm creating a Qt Symbian application and need to connect to internet. In some way I need to let the user choose a connection when the app starts. I could use Qt Mobility to get it working but when Nokia approves I wan't do publish my application on Ovi Store. As the Qt Mobility is not included in Qt 4.6 it might be a problem to publish my app later. So for this reason I'm thinking of using native APIs instead. The idea is to use: qt_SetDefaultIap() to set the connection on start. I have been looking at this to actually understand what it is doing. If I have two connections that the app could use, one with WIFI and one through mobile internet, which one will qt_SetDefaultIap() choose? And can I in some way with native api make the user choose a connection on start up? (qt_SetDefaultIap seems to just set a default connection on its own, without user choice) Thanks!

    Read the article

  • Hidden features of Qt.

    - by Lukasz Lew
    A little is hidden in Qt given splendid documentation. But given vastness of Qt functionality paradoxically many useful features have been overlooked by me (and reimplemented or work-arounded). What Qt functions you wish you have noticed earlier?

    Read the article

  • Linking error while using Qt static built libraries

    - by Kamran Amini
    I hope this is not a duplicate. Recently I'm developing a native C++ application using Qt 4.8.3 and VS2008. Since clients run the application on their naked machines, they need to install VC++ 2008 Redistribution package. So I decided to make it statically linked. I changed my project settings (C/C++ Code Generation Runtime Library) to /MTd. Also I compiled Qt again, this time using following commands for a static building; originally found on this blog Static Qt with static CRT (VS 2008) 1- replaced -MD with -MT in lines QMAKE_CFLAGS_RELEASE and QMAKE_CFLAGS_DEBUG in %QDIR%\mkspecs\win32-msvc2008\qmake.conf 2- nmake confclean 3- configure -static -platform win32-msvc2008 -no-webkit 4- nmake sub-src I compiled Qt successfully. But when I tried again to compile my application, it gave me some strange errors. 1>Linking... 1>qtmaind.lib(qtmain_win.obj) : error LNK2005: "public: bool __thiscall QBasicAtomicInt::deref(void)" (?deref@QBasicAtomicInt@@QAE_NXZ) already defined in QtCored4.lib(QtCored4.dll) 1>qtmaind.lib(qtmain_win.obj) : error LNK2005: "public: bool __thiscall QBasicAtomicInt::operator!=(int)const " (??9QBasicAtomicInt@@QBE_NH@Z) already defined in QtCored4.lib(QtCored4.dll) 1>qtmaind.lib(qtmain_win.obj) : error LNK2005: "public: __thiscall QString::~QString(void)" (??1QString@@QAE@XZ) already defined in QtCored4.lib(QtCored4.dll) I changed some lib files but with each change, situation got worse; for example I tried to use QtCored.lib instead of QtCored4.lib because it is newly created after compilation. I think I've missed something in building static Qt libs. Thanks.

    Read the article

  • Qt support for VNC

    - by muchala123
    i want to test whether qt is supporting VNC or not. For that i have written a small layout program using Qt library. the source code for the layout program is as follows: layout.cpp #include <QApplication> #include <QHBoxLayout> #include <QSlider> #include <QSpinBox> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *window = new QWidget; window->setWindowTitle("Enter The Age of the person"); QSpinBox *spinBox = new QSpinBox; QSlider *slider = new QSlider(Qt::Horizontal); spinBox->setRange(0, 130); slider->setRange(0, 130); QObject::connect(spinBox, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); QObject::connect(slider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int))); spinBox->setValue(35); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(spinBox); layout->addWidget(slider); window->setLayout(layout); window->show(); return app.exec(); } i want to run this as server application on my linux PC.For that what i configured Qt and installed like this. ./configure -qt-gfx-vnc make make install The program is working fine. But if i run the application as VNC server application like ./layout -qws -display VNC:0 i am encountering an error.it says that "_X11TransSocketINETConnect() can't get address for VNC:6000: Temporary failure in name resolution".. pls help me what i need to do. Thanks

    Read the article

  • [MFC] Creating multiple dialogs in an MFC app with no main Window, they become children of each othe

    - by John
    (title updated) Following on from this question, now I have a clearer picture what's going on... I have a MFC application with no main window, which exposes an API to create dialogs. When I call some of these methods repeatedly, the dialogs created are parented to each other instead of all being parented to the desktop... I have no idea why. But anyway even after creation, I am unable to change the parent back to NULL or CWnd::GetDesktopWindow()... if I call SetParent followed by GetParent, nothing has changed. So apart from the really weird question of why Windows is magically parenting each dialog to the last one created, is there anything I'm missing to be able to set these windows as children of the desktop? UPDATED: I have found the reason for all this, but not the solution. From my dialog constructor, we end up in: BOOL CDialog::CreateIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd, void* lpDialogInit, HINSTANCE hInst) { ASSERT(lpDialogTemplate != NULL); if (pParentWnd == NULL) pParentWnd = AfxGetMainWnd(); m_lpDialogInit = lpDialogInit; return CreateDlgIndirect(lpDialogTemplate, pParentWnd, hInst); } Note: if (pParentWnd == NULL)pParentWnd = AfxGetMainWnd(); The call-stack from my dialog constructor looks like this: mfc80d.dll!CDialog::CreateIndirect(const DLGTEMPLATE * lpDialogTemplate=0x005931a8, CWnd * pParentWnd=0x00000000, void * lpDialogInit=0x00000000, HINSTANCE__ * hInst=0x00400000) mfc80d.dll!CDialog::CreateIndirect(void * hDialogTemplate=0x005931a8, CWnd * pParentWnd=0x00000000, HINSTANCE__ * hInst=0x00400000) mfc80d.dll!CDialog::Create(const char * lpszTemplateName=0x0000009d, CWnd * pParentWnd=0x00000000) mfc80d.dll!CDialog::Create(unsigned int nIDTemplate=157, CWnd * pParentWnd=0x00000000) MyApp.exe!CMyDlg::CMyDlg(CWnd * pParent=0x00000000) Running in the debugger, if I manually change pParentWnd back to 0 in CDialog::CreateIndirect, everything works fine... but how do I stop it happening in the first place?

    Read the article

  • Using Qt with custom MinGW

    - by ereOn
    Hi, I don't know if this question would fit better on superuser.com, but since it's rather compiler related, I give it a try here. I have to use Qt with a specific version of gcc (4.5). I downloaded the last official Qt release for Windows (Vista, 32 bits version) and didn't install the shipped MinGW version; I just installed the Qt libraries/binaries. In a console, when I type qmake && make, make fails, complaining that 'g++' is not recognized as an internal command. If I type g++ in the same console, I however have the following output: g++: no input files So g++ is definitely recognized. For those who may ask, both the Qt binaries directory and MinGW binaries directory are in the system PATH environment variable. What could be wrong here ?

    Read the article

  • Qt: Styling QTabWidget

    - by Martin
    I'm using Qt and I have a QTabWidget setup in the Qt Designer Editor, you can see it in picture 1. As you can see after Tab4 there is an empty space all the way to the right edge, in someway I need to fill that space with a color, like in picture 2. Or another solution would be that the tabs float out to cover the whole screen. I use the following stylesheet right now: QTabWidget::tab-bar { } QTabBar::tab { background: gray; color: white; padding: 10px; } QTabBar::tab:selected { background: lightgray; } Is there a way to set the background color of the QTabBar using Qt stylesheets? Or can I get the tabs floating out to the edge using Qt stylesheets? Thanks!

    Read the article

  • [MFC] What is the reciprocal of CComboBox.GetItemData?

    - by Hamish Grubijan
    Instead of associating objects with Combo Box items, I associate long ids representing choices. They come from a database, so it seems natural to do so anyway. Now, I persist the id and not the index of the user's selection, so that the choice is remembered across sessions. If id no longer exists in database - no big deal. The choice will be messed up once. If db does not change, however, then it would be a great success ;) Here is how I get the id : chosenSomethingIndex = cmbSomething.GetCurSel(); lastSomethingId = cmbSomething.GetItemData(chosenSomethingIndex); How do I reverse this? When I load the stored value for user's last choice, I need to convert that id into an index. I can do: cmbSomething.SetCurSel(chosenSomethingIndex); However, how can I attempt (it might not exist) to get an index once I have an id? I am looking for a reciprocal function to GetItemData I am using VS2008, probably latest version of MFC, whatever that is. Thank you.

    Read the article

  • How should i build my GUI in Qt ?

    - by Apollo
    I am wondering which way is the best to start building a GUI+SOFT in Qt. I am trying to build a sound media player based on a MVC pattern. Until now i have found 3 ways to do so. 1- Should I use a .ui file thanks to Qt designer, is it flexible enough ? 2- Should I use QML to make the design than integrate it to a C++ development ? 3- Should I just start from scratch and do it by hand without Qt Designer and using Qt library ? Thank you very much for your answers.

    Read the article

  • Trying to make a plugin system in C++/Qt

    - by Pirate for Profit
    I'm making a task-based program that needs to have plugins. Tasks need to have properties which can be easily edited, I think this can be done with Qt's Meta-Object Compiler reflection capabilities (I could be wrong, but I should be able to stick this in a QtPropertyBrowser?) So here's the base: class Task : public QObject { Q_OBJECT public: explicit Task(QObject *parent = 0) : QObject(parent){} virtual void run() = 0; signals: void taskFinished(bool success = true); } Then a plugin might have this task: class PrinterTask : public Task { Q_OBJECT public: explicit PrinterTask(QObject *parent = 0) : Task(parent) {} void run() { Printer::getInstance()->Print(this->getData()); // fictional emit taskFinished(true); } inline const QString &getData() const; inline void setData(QString data); Q_PROPERTY(QString data READ getData WRITE setData) // for reflection } In a nutshell, here's what I want to do: // load plugin // find all the Tasks interface implementations in it // have user able to choose a Task and edit its specific Q_PROPERTY's // run the TASK It's important that one .dll has multiple tasks, because I want them to be associated by their module. For instance, "FileTasks.dll" could have tasks for deleting files, making files, etc. The only problem with Qt's plugin setup is I want to store X amount of Tasks in one .dll module. As far as I can tell, you can only load one interface per plugin (I could be wrong?). If so, the only possible way to do accomplish what I want is to create a FactoryInterface with string based keys which return the objects (as in Qt's Plug-And-Paint example), which is a terrible boilerplate that I would like to avoid. Anyone know a cleaner C++ plugin architecture than Qt's to do what I want? Also, am I safely assuming Qt's reflection capabilities will do what I want (i.e. able to edit an unknown dynamically loaded tasks' properties with the QtPropertyBrowser before dispatching)?

    Read the article

  • MFC/CCriticalSection: Simple lock situation hangs

    - by raph.amiard
    I have to program a simple threaded program with MFC/C++ for a uni assignment. I have a simple scenario in wich i have a worked thread which executes a function along the lines of : UINT createSchedules(LPVOID param) { genProgThreadVal* v = (genProgThreadVal*) param; // v->searcherLock is of type CcriticalSection* while(1) { if(v->searcherLock->Lock()) { //do the stuff, access shared object , exit clause etc.. v->searcherLock->Unlock(); } } PostMessage(v->hwnd, WM_USER_THREAD_FINISHED , 0,0); delete v; return 0; } In my main UI class, i have a CListControl that i want to be able to access the shared object (of type std::List). Hence the locking stuff. So this CList has an handler function looking like this : void Ccreationprogramme::OnLvnItemchangedList5(NMHDR *pNMHDR, LRESULT *pResult) { LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR); if((pNMLV->uChanged & LVIF_STATE) && (pNMLV->uNewState & LVNI_SELECTED)) { searcherLock.Lock(); // do the stuff on shared object searcherLock.Unlock(); // do some more stuff } *pResult = 0; } The searcherLock in both function is the same object. The worker thread function is passed a pointer to the CCriticalSection object, which is a member of my dialog class. Everything works but, as soon as i do click on my list, and so triggers the handler function, the whole program hangs indefinitely.I tried using a Cmutex. I tried using a CSingleLock wrapping over the critical section object, and none of this has worked. What am i missing ?

    Read the article

  • Output problem in mysql query in MFC program

    - by D.Gaughan
    Im currently working on a small MFC program that outputs data from a mysql database. I can get output when im using an sql statement that does not contain any variable eg. select album from Artists; but when i try to use a variable the program compiles but i get no output eg. mysql_perform_query(conn,select album from Artists where artists = '"+m_search_edit"'") Here is the function for mysql_perform_query: MYSQL_RES* mysql_perform_query(MYSQL *conn, const char* query) { // send the query to the database if (mysql_query(conn, query)) { // printf("MySQL query error : %s\n", mysql_error(conn)); // exit(1); } return mysql_use_result(conn); } And here is the code block for outputting the data: struct connection_details mysqlD; mysqlD.server = "www.freesqldatabase.com"; // where the mysql database is mysqlD.user = "**********"; // the root user of mysql mysqlD.password = "***********"; // the password of the root user in mysql mysqlD.database = "***************"; // the databse to pick // connect to the mysql database conn = mysql_connection_setup(mysqlD); CStringA query; query.Format("select album from Artists where artist = '%s'", CT2CA(m_search_edit)); res = mysql_perform_query(conn, query); //res = mysql_perform_query (conn, "select distinct artist from Artists"); while((row = mysql_fetch_row(res)) != NULL){ CString str; UpdateData(); str = ("%s\n", row[0]); UpdateData(FALSE); m_list_control.AddString(str); } The m_search_edit variable is the variable for an edit box. I am using Visual Studio 2008 with one copy of this program unicode and one nonunicode, I also have a version built with VC++ 6. Any tips on how I can get output from the databse using the m_search_edit variable??

    Read the article

  • Finding web source of Drag&Drop with Qt

    - by UncaughtException
    I'm trying to implement a simple notebook in Qt. Microsoft OneNote allows text or an image from a website to be inserted by Drag&Drop with an attached link to the source that looks like this for the stackoverflow logo on the 'ask' page: Inserted from <http://stackoverflow.com/questions/ask. With the QT dropsite example, I examined all the information thats transported by the QMimeData object, but didn't find something really helpful. Do you know a way to do this in pure Qt or at least with not so much platform-dependant code?

    Read the article

  • setup Qt and PyQt on mac osx so my app can also deployable on windows

    - by hk_programmer
    Hi, I've been coding with Python and C++ and now need to work on building a gui for data visualization purposes. I work on Mac Snow Leopard (intel), python 3.1 using gcc 4.2.1 (from Xcode 3.1) I wanted to first install Qt and then PyQt. And my goals are to be able to: - quickly prototype GUI and the accompanied logic that drives the GUI using PyQt and python - if I decided I need the speed, or if it's fairly easy to translate my GUI into C++ using the Qt tools, I have the options to translate my app into C++ - Be able to deploy my application onto Windows (both the python and c++ version of my app) Give the goals above, what are the correct steps I should take and what issues i should be aware of when setting up Qt and PyQt. Which other deployment tools do I need? From my readings so far, here's what I have: download the Qt source for mac and configure it with -platform macx-g++42 -arch x86_64 -no-framework (i've read somewhere that building as framework causes some trouble in deployment and/or debugging, can't find the article anymore) download latest SIP source and build download latest PyQt and build from source (any special options I should pay attention to?) For deployment, I've read that I would need to use py2exe/cx_freeze for windows, p2app for mac: http://arstechnica.com/open-source/guides/2009/03/how-to-deploying-pyqt-applications-on-windows-and-mac-os-x.ars but seems like what the article describe is deploying an app you build on windows on the windows platform and vice versa. How do you deploy to windows (is it even possible?) if you are writing your Qt app on a mac ? Really appreciate the help

    Read the article

  • compiling maya (3d application ) with qt

    - by knishua
    including the maya ( 3d application ) classes in qt program gives lot of errors..... i have added all required include paths and libs...the same problem persists .... this is pro file for my qt project TARGET = FileCon TEMPLATE = app SOURCES += main.cpp \ dialog.cpp HEADERS += dialog.h \ ConvertFunction.h FORMS += dialog.ui LIBS += "C:/Program Files/Autodesk/Maya2008/lib" \ -lOpenMaya.lib \ -lFoundation.lib \ -lOpenMayalib INCLUDEPATH += "C:/Program Files/Autodesk/Maya2008/include" DEFINES = _BOOL \ WIN32 \ REQUIRE_IOSTREAM /////////////////////////////////////////// How is it possible to use maya classes with qt.

    Read the article

  • How does exactly Qt works?

    - by Somebody still uses you MS-DOS
    I have seen that you can write your application in Qt, and it can be run in different operating systems. And - correct me if I'm wrong - you don't need to have Qt already installed in all of these platforms. How exactly this approach works? Does Qt compiles to the desired platform, does it bundle some "dlls" (libs), how does it do it? Is different from programming a Java application for the sake of cross-platform? If you use Python to write a Qt application with Python bindings, does the final user needs to have Python installed?

    Read the article

  • How to install the Qt mobility ?

    - by Shadow
    Hi, i have installed Qt 4.6.2 and developing the application for symbian. Now i want use Qt mobility API for accessing the contacts.. how can i install the Qt mobility and acces the API.. my build environment is windows XP :) Thanks

    Read the article

  • installing widgets for qt

    - by Lakshan Perera
    I resently found a very useful set of widgets set for qt from http://www.wysota.eu.org/wwwidgets/ and I downloaded wwWidgets 1.0 installer for MinGW and simply installed it. now I can see those widgets in qt creator, and I can drag and drop them. but when compiling the project it says that those include files are not found. (ex: qwwled.h not found) but I see that file is in C:\Qt\4.8.3\include\wwWidgets please if someone can help me in this issue I would be very thankful. im using qt 4.8.3 with mingw 4.4

    Read the article

  • A Few Questions About QT

    - by ForgiveMeI'mAN00b
    Is it free? It looks like on the website it says "Try Now", which makes me worry that it just gives you a demo. Do you have to pay the QT company anything to distribute a program using QT, or can you just throw it (the program) out there and just say you used QT. Is it native c++, or something wierd, like, the same way .NET programs aren't actual c++, they just look like it. Would somebody who uses my program have to install the QT framework before they can run it, or will the program run without any installation? Can it easily be compiled to work on a Windows, Linux and Mac OS?

    Read the article

  • How to install Qt on Windows after building?

    - by Piotr Dobrogost
    I can't find any information on how to install Qt built on Windows. In wiki article How to set up shadow builds on Mac and Linux there's description of -prefix option in configure script but this option is not available on Windows. I know I can use Qt right from the build folder but it does not seem the right thing not to perform an install step. One problem with this approach is size; Qt's build folder takes about 4GB space whereas after installing using binary installer Qt takes about 1GB space. I guess the difference is due to temporary files created during building. I hope some install procedure would install (copy) only needed files leaving temporary files in the build folder.

    Read the article

  • How do I determine the cause of Qt's "*** is not a valid Qt plugin" error?

    - by chadjoan
    When I print the value of errorString from my QPluginLoader object, I get this: The file 'C:/pyprojects/test/qsqlpsqld4.dll' is not a valid Qt plugin. I would like to avoid some days worth of doing the time consuming "guess-and-check" methodology that my current internet searches reveal (so far none of them seem relevant anyways). Is there a way for me to get the Qt library itself to tell me why it is refusing to load this plugin? I don't want to guess; I want to know. Context: I am on Windows 7 running Qt 4.8.5 (32-bit, MinGW) and the qsqlpsqld4.dll file is also 32-bit and compiled with MinGW. I am using PySide to interact with Qt.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >