Search Results

Search found 386 results on 16 pages for 'qt4'.

Page 13/16 | < Previous Page | 9 10 11 12 13 14 15 16  | Next Page >

  • Cannot press QPushButton in a simple program

    - by shadyabhi
    Basically, I want a simple pushButton with a colorful text which when pressed exits the application. Why cant I press PushButton in this simple program. I am using QT 4.6 on Arch x86_64. #include <QtGui/QApplication> #include <QLabel> #include <QPushButton> #include<QtGui> int main(int argc, char *argv[]) { QApplication a(argc, argv); QMainWindow *Main=new QMainWindow; QPushButton *button = new QPushButton(Main); QLabel *label = new QLabel(Main); label->setText("<h2><i>Hello</i> ""<font color=red>Qt!</font></h2>"); label->setVisible(true); QObject::connect(button, SIGNAL(clicked()),label, SLOT(clear())); label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); label->setWindowTitle("HelloWorld Test Program"); Main->show(); return a.exec(); }

    Read the article

  • Qt 4.7 QtDeclarative headers

    - by bitc
    I installed Qt 4.7 beta on OS X. Then I wanted to try out the declarative module: The doc says #include <QtDeclarative> The Minehunt example says #include <qdeclarative.h> Neither is found! Most of the other header files are where they are supposed to be: /Library/Frameworks/Qt*.framework/Versions/4/Headers What do I do?

    Read the article

  • Building Qt 4.5 with Visual C++ 2010

    - by Catalin Piti?
    Did somebody tried to build Qt 4.5 with Visual Studio 2010 (Beta 2)? Any hints on doing that successfuly? Later edit I tried to run configure from a Visual Studio 2010 console. There is no makespecs support for 2010, so configure fails because of that.

    Read the article

  • How can I use Qt to get html code of this NCBI page??

    - by user308503
    I'm trying to use Qt to download the html code from the following url: http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=nucleotide&cmd=search&term=AB100362 this url will re-direct to www.ncbi.nlm.nih.gov/nuccore/27884304 I try to do it by following way, but I cannot get anything. it works for some webpage such as www.google.com, but not for this NCBI page. is there any way to get this page?? QNetworkReply::NetworkError downloadURL(const QUrl &url, QByteArray &data) { QNetworkAccessManager manager; QNetworkRequest request(url); QNetworkReply *reply = manager.get(request); QEventLoop loop; QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); loop.exec(); if (reply->error() != QNetworkReply::NoError) { return reply->error(); } data = reply->readAll(); delete reply; return QNetworkReply::NoError; } void GetGi() { int pos; QString sGetFromURL = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi"; QUrl url(sGetFromURL); url.addQueryItem("db", "nucleotide"); url.addQueryItem("cmd", "search"); url.addQueryItem("term", "AB100362"); QByteArray InfoNCBI; int errorCode = downloadURL(url, InfoNCBI); if (errorCode != 0 ) { QMessageBox::about(0,tr("Internet Error "), tr("Internet Error %1: Failed to connect to NCBI.\t\nPlease check your internect connection.").arg(errorCode)); return "ERROR"; } }

    Read the article

  • How to make the tittle bold?

    - by Solitaire
    Hi all, In Qmessagebox how can I make the tittle text bold? Here is the sample code, which I am using to disply a messagebox int ret = QMessageBox::warning(this, tr("My Application"), tr("document has been modified.\n" "Do you want to save your changes?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save); I just want “tr("My Application")” to be bold, and rest to be in normal font. How can I do that? By default I am getting the normal font for both title and descriptive text. Thanks.

    Read the article

  • Normal C++ code in Qt doesnt build and run

    - by Nick
    Hello. I am using Qt under linux, if it matters. I ran successfully under Geany (a simple c++ compiler) the following: //my first program in C++ Hello World! include using namespace std; int main () {cout << "Hello World!"; return 0;} I opened Qt source file and copied the exact same code and i can't build or run. Thank you for your responses to this simple problem.

    Read the article

  • c++ program debugged well with Cygwin4 (under Netbeans 7.2) but not with MinGW (under QT 4.8.1)

    - by GoldenAxe
    I have a c++ program which take a map text file and output it to a graph data structure I have made, I am using QT as I needed cross-platform program and GUI as well as visual representation of the map. I have several maps in different sizes (8x8 to 4096x4096). I am using unordered_map with a vector as key and vertex as value, I'm sending hash(1) and equal functions which I wrote to the unordered_map in creation. Under QT I am debugging my program with QT 4.8.1 for desktop MinGW (QT SDK), the program works and debug well until I try the largest map of 4096x4096, then the program stuck with the following error: "the inferior stopped because it received a signal from operating system", when debugging, the program halt at the hash function which used inside the unordered_map and not as part of the insertion state, but at a getter(2). Under Netbeans IDE 7.2 and Cygwin4 all works fine (debug and run). some code info: typedef std::vector<double> coordinate; typedef std::unordered_map<coordinate const*, Vertex<Element>*, container_hash, container_equal> vertexsContainer; vertexsContainer *m_vertexes (1) hash function: struct container_hash { size_t operator()(coordinate const *cord) const { size_t sum = 0; std::ostringstream ss; for ( auto it = cord->begin() ; it != cord->end() ; ++it ) { ss << *it; } sum = std::hash<std::string>()(ss.str()); return sum; } }; (2) the getter: template <class Element> Vertex<Element> *Graph<Element>::getVertex(const coordinate &cord) { try { Vertex<Element> *v = m_vertexes->at(&cord); return v; } catch (std::exception& e) { return NULL; } } I was thinking maybe it was some memory issue at the beginning, so before I was thinking of trying Netbeans I checked it with QT on my friend pc with a 16GB RAM and got the same error. Thanks.

    Read the article

  • QTime or QTimer wait for timeout

    - by user968243
    I'm writting a Qt application, and I have a four hour loop (in a seperate thread). In that four hour loop, I have to: do stuff with the serial port; wait a fixed period of time; do some more stuff with the serial port; wait an arbitrary amount of time. when 500ms have past, do more stuff; Go to 1. and repeat for four hours. Currently, my method of doing this is really bad, and crashes some computers. I have a whole bunch of code, but the following snippet basically shows the problem. The CPU goes to ~100% and eventually can crash the computer. void CRelayduinoUserControl::wait(int timeMS) { int curTime = loopTimer->elapsed(); while(loopTimer->elapsed() < curTime + timeMS); } I need to somehow wait for a particular amount of time to pass before continuing on with the program. Is there some function which will just wait for some arbitrary period of time while keeping all the timers going?

    Read the article

  • PyQt4.QtCore doesn't contain many of its classes and attributes

    - by toc777
    Hi everyone, I have built PyQt4 from source and everything went smoothly until I tried to use some of the classes and attributes located in QtCore. For some reason QtCore is missing a lot of functionality and data that should be there. For example from PyQt4.QtCore import QT_VERSION_STR is an import error. There were no errors or warnings given when building the packages and I have also tried with the PyQt packages from yum but I have the same problem. Has anyone else encountered this problem before? Thanks.

    Read the article

  • How to restart Linux from inside a C++ program?

    - by Dave K
    I have a Qt 4 GUI where I need to have a option in a drop-down menu that allows the user to choose to restart the computer. I realize this might seem redunant with the ability to restart the computer in other ways, but the choice needs to stay there. I've tried using system() to call the following: a suid-root shell script a non-suid shell script a suid-root binary program and all of them just cause reboot: must be superuser to be printed. Using system() to call reboot directly does the same thing. I'm not especially attached to using system() to do this, but it seemed like the most direct choice. How can I reboot the system from the GUI?

    Read the article

  • how to create window that opened when close main window??

    - by Abeer
    Hi everyone .. Iam a absolute Beginner in QT.. i am trying to create window that has only text and one push button when you press it, you will get another window that has menu for program .. but Unfortunately, i didn't know how can i create new window and connect it with main window! so, i need to helping you

    Read the article

  • How to force calling of QWidget::paintEvent() when its hovered by other window?

    - by Pie_Jesu
    Hi there. I have occured a problem: I'm writing a widget, which displays current date's day number. It's like a button, but it's not derived from QPushButton class. Just from QWidget. So I reimplemented enterEvent(), leaveEvent(), mousePressEvent(), mouseReleaseEvent(). I call update() inside these methods and widget has realistic button behavior (paintEvent() is reimplemented too). But when I change system date and hover that widget with other window, my widget doesn't calls paintEvent() and displays old date. Only when I place mouse over it, widget repaints it's contents. I guess there is an option, which paints old contents on hover event to avoid unnecessary paint events. But I need to disable it. Tried to set many attributes (Qt::WidgetAttribute enum). But it doesn't helps. Please, help me (and sorry for my bad english).

    Read the article

  • How to remove synaptic without installing all the unwanted packages?

    - by Jay
    I am trying to uninstall synaptic. I prefer using apt-get and other command line tools to manage my packages. So I do not need synaptic and the software manager. I'm trying to remove both of them using apt-get. Its a new box. Recently installed Linux Mint mate 15. After installation, the only thing I did was, sudo apt-get update and sudo apt-get dist-upgrade After that, I did this command for removing synaptic, sudo apt-get remove --purge synaptic But this gives me a very weird output, Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: apturl-kde icoutils kate-data katepart kde-runtime kde-runtime-data kdelibs-bin kdelibs5-data kdelibs5-plugins kdesudo kdoctools kubuntu-debug-installer libattica0.4 libdlrestrictions1 libkactivities-bin libkactivities-models1 libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkidletime4 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4 libkpty4 libkrosscore4 libktexteditor4 libkxmlrpcclient4 libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomukutils4 libntrack-qt4-1 libntrack0 libphonon4 libplasma3 libpolkit-qt-1-1 libpoppler-qt4-4 libqapt2 libqapt2-runtime libqca2 libqt4-qt3support libsolid4 libsoprano4 libstreamanalyzer0 libstreams0 libthreadweaver4 libvirtodbc0 nepomuk-core nepomuk-core-data ntrack-module-libnl-0 odbcinst odbcinst1debian2 oxygen-icon-theme phonon phonon-backend-gstreamer plasma-scriptengine-javascript qapt-batch shared-desktop-ontologies soprano-daemon virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common Use 'apt-get autoremove' to remove them. The following extra packages will be installed: apturl-kde icoutils kate-data katepart kde-runtime kde-runtime-data kdelibs-bin kdelibs5-data kdelibs5-plugins kdesudo kdoctools kubuntu-debug-installer libattica0.4 libdlrestrictions1 libkactivities-bin libkactivities-models1 libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkidletime4 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4 libkpty4 libkrosscore4 libktexteditor4 libkxmlrpcclient4 libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomukutils4 libntrack-qt4-1 libntrack0 libphonon4 libplasma3 libpolkit-qt-1-1 libpoppler-qt4-4 libqapt2 libqapt2-runtime libqca2 libqt4-qt3support libsolid4 libsoprano4 libstreamanalyzer0 libstreams0 libthreadweaver4 libvirtodbc0 libxml2-utils nepomuk-core nepomuk-core-data ntrack-module-libnl-0 odbcinst odbcinst1debian2 oxygen-icon-theme phonon phonon-backend-gstreamer plasma-scriptengine-javascript qapt-batch shared-desktop-ontologies soprano-daemon virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common Suggested packages: libterm-readline-gnu-perl libterm-readline-perl-perl djvulibre-bin finger hspell libqca2-plugin-cyrus-sasl libqca2-plugin-gnupg libqca2-plugin-ossl phonon-backend-vlc phonon-backend-xine phonon-backend-mplayer The following packages will be REMOVED: aptoncd* apturl* mintupdate* mintwelcome* synaptic* The following NEW packages will be installed: apturl-kde icoutils kate-data katepart kde-runtime kde-runtime-data kdelibs-bin kdelibs5-data kdelibs5-plugins kdesudo kdoctools kubuntu-debug-installer libattica0.4 libdlrestrictions1 libkactivities-bin libkactivities-models1 libkactivities6 libkatepartinterfaces4 libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5 libkidletime4 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4 libkpty4 libkrosscore4 libktexteditor4 libkxmlrpcclient4 libnepomuk4 libnepomukcore4abi1 libnepomukquery4a libnepomukutils4 libntrack-qt4-1 libntrack0 libphonon4 libplasma3 libpolkit-qt-1-1 libpoppler-qt4-4 libqapt2 libqapt2-runtime libqca2 libqt4-qt3support libsolid4 libsoprano4 libstreamanalyzer0 libstreams0 libthreadweaver4 libvirtodbc0 libxml2-utils nepomuk-core nepomuk-core-data ntrack-module-libnl-0 odbcinst odbcinst1debian2 oxygen-icon-theme phonon phonon-backend-gstreamer plasma-scriptengine-javascript qapt-batch shared-desktop-ontologies soprano-daemon virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common 0 upgraded, 78 newly installed, 5 to remove and 0 not upgraded. Need to get 60.9 MB of archives. After this operation, 146 MB of additional disk space will be used. Do you want to continue [Y/n]? n Abort. As you can see, apt-get is trying to install the same packages that it is asking me to autoremove. Could someone please tell me, how to uninstall synaptic properly? Or am I missing something? Just for the record, I also did, sudo apt-get autoremove --purge like it asked me to ... and this is what I got, Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

    Read the article

  • Problem installing qtbase

    - by teucer
    I am getting the following error when installing "qtbase" package for R: [ 68%] Building CXX object smoke/qt/CMakeFiles/smokeqt.dir/x_1.cpp.o /home/mroot/qtbase/kdebindings-build/smoke/qt/x_1.cpp: In static member function ‘static void __smokeqt::x_QAbstractPrintDialog::x_8(Smoke::StackItem*)’: /home/mroot/qtbase/kdebindings-build/smoke/qt/x_1.cpp:4893: error: cannot allocate an object of abstract type ‘__smokeqt::x_QAbstractPrintDialog’ /home/mroot/qtbase/kdebindings-build/smoke/qt/x_1.cpp:4834: note: because the following virtual functions are pure within ‘__smokeqt::x_QAbstractPrintDialog’: /usr/include/qt4/QtGui/qabstractprintdialog.h:89: note: virtual int QAbstractPrintDialog::exec() /home/mroot/qtbase/kdebindings-build/smoke/qt/x_1.cpp: In constructor ‘__smokeqt::x_QAbstractPrintDialog::x_QAbstractPrintDialog()’: /home/mroot/qtbase/kdebindings-build/smoke/qt/x_1.cpp:4896: error: no matching function for call to ‘QAbstractPrintDialog::QAbstractPrintDialog()’ /usr/include/qt4/QtGui/qabstractprintdialog.h:116: note: candidates are: QAbstractPrintDialog::QAbstractPrintDialog(const QAbstractPrintDialog&) /usr/include/qt4/QtGui/qabstractprintdialog.h:113: note: QAbstractPrintDialog::QAbstractPrintDialog(QAbstractPrintDialogPrivate&, QPrinter*, QWidget*) /usr/include/qt4/QtGui/qabstractprintdialog.h:86: note: QAbstractPrintDialog::QAbstractPrintDialog(QPrinter*, QWidget*) make[3]: *** [smoke/qt/CMakeFiles/smokeqt.dir/x_1.cpp.o] Error 1 make[3]: Leaving directory `/home/mroot/qtbase/kdebindings-build' make[2]: *** [smoke/qt/CMakeFiles/smokeqt.dir/all] Error 2 make[2]: Leaving directory `/home/mroot/qtbase/kdebindings-build' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/mroot/qtbase/kdebindings-build' make: *** [all] Error 2 ERROR: compilation failed for package ‘qtbase’ * removing ‘/home/mroot/R/i686-pc-linux-gnu-library/2.12/qtbase’ Any ideas?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16  | Next Page >