Search Results

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

Page 3/16 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • netcon.h not found with mingw?

    - by cftmon
    I am using the mingw(4.4.0) compiler that is included with QT4 and my IDE is netbeans 6.9. i noticed that i can't find netcon.h when i try to include it.I need netcon.h because i need some kind of API to bring up/down a network adapter,and after some googling i found that netcon.h is most commonly used. Linking netcon.h directly from the microsoft sdk produces lots of errors.Or is there some other library to alows me to reset an adapter, or i had to visual C++ completely to solve this problem?

    Read the article

  • QT QFileDialog how to hide hidden/backup folders (".folder")

    - by Alberto Toglia
    Basically when browsing folders inside a QFileDialog I find very annoying to have everything bloated with hidden or backup folders (don't know how to call them really); specially on home. Is there a way to prevent these type of folders from showing by default on a QFileDialog? I'm using Qt4.6 and getOpenFileName. P.D.: I'm starting to think this might be an ubuntu thing...?

    Read the article

  • QApplication In Non-Main Thread

    - by Boatzart
    I need to exec() a QApplication in a thread that is not main (my GUIs must be plugins that can be dynamically loaded and unloaded at runtime, so I have no access to the main thread). Does anyone know of a (relatively) painless way to hack around Qt's restriction against starting QApplication outside of main? I'm developing in Linux with Qt4 in C++ using gcc4.3.4.

    Read the article

  • Phonon::VideoWidget not working in Qt 4.4

    - by user249490
    Hi, I have Phonon::VideoWidget, Phonon::MediaObject and Phonon::MediaSource, all initialized as below. videoWidget=new Phonon::VideoWidget(this); mediaVideoObject=new Phonon::MediaObject(this); Phonon::createPath(mediaVideoObject, videoWidget); Phonon::MediaSource mediaSource= Phonon::MediaSource("D:\\file.avi"); mediaVideoObject->setCurrentSource(mediaSource); and all connections laid for Play, Pause, Next, Previous. It is working for few videos while for some other it is throwing IDispatch error #24 (0x80040218) and error type as Fatal. I am using Qt4.4 in windows XP and has backend support as well. I have to play those videos which are throwing the above mentioned error. What might be the reason and how i can overcome the error?

    Read the article

  • HowTo set Icon to Qt Application, created with Qt Visual Studio Add-in?

    - by mosg
    Hello. Here is what I have: Visual Studio 2008 (on 32-bit Windows XP) Qt libraries 4.6.2 for Windows (VS 2008, 194 MB) Visual Studio Add-in (44 MB) After I installed all the software, I created simple Qt Application project, with Visual Studio: menu File | New | Project... and Qt4 Projects | Qt Application. Build it, and here is the question: how to set application icon to my compiled exe file? I need to see specified ICO in explorer! Old method with MyProject.pro not interested!!! Create a .ico file with both 16x16 and 32x32-pixel versions of the icon (you can do this in Visual Studio). Create a .rc file containing the following text: IDI_ICON1 ICON DISCARDABLE "myIcon.ico" Add the following to your .pro file RC_FILE = myFile.rc Run qmake. Thanks.

    Read the article

  • Change compilation flags in Qt under Mac OS X?

    - by Lior
    I installed Qt for Mac, and am compiling my Qt project after adding in the .Pro file CONFIG(release, debug|release):QMAKE_CXXFLAGS += -O3 -fomit-frame-pointer to optimize for speed. However, I always see that the command where g++ is ran, includes -Os, which optimizes for size. I would like to remove it. I tried several approaches, like CONFIG(release, debug|release):QMAKE_CFLAGS_RELEASE -= -Os CONFIG(release, debug|release):QMAKE_CXXFLAGS -= -Os and CONFIG(release, debug|release):QMAKE_CXXFLAGS = -O3 -fomit-frame-pointer CONFIG(release, debug|release):QMAKE_CFLAGS_RELEASE = -O3 -fomit-frame-pointer (no +) But nothing. -Os ALWAYS appear. How do I change this? I found the qmake.conf file under /usr/local/QT4.5/mkspecs. It includes a mac-g++.conf file, but I cannot change it, and chmod doesn't work: chmod: mac-g++.conf: Operation not permitted Any ideas?

    Read the article

  • Cannot run an executable binary file on another Linux System??

    - by Claire Huang
    I'm using Ubuntu 10.04 and Qt4.6, and I've created an executable binary file on my own computer through QtCreator. Now I want to put my executable file on CentOS 5, but it seems that this executable file cannot run on CentOS. Do I need to set some compile parameters to make it runnable on Linux other than Ubuntu?? Or do I need to put some lib files with the executable binary file? (For windows, the .exe file should put together with some .dll files to provide the correct dynamic lib linkage, is there some similar problem on linux?) Thanks for your help!

    Read the article

  • Encrypt/Decrypt SQLite-database and use it "on the fly"

    - by Berschi
    Here's the thing: In my Qt4.6-Project, I use a SQLite-Database. This database shouldn't be unencrypted on my harddrive. So I want, that on every start of my program, the user gets asked to enter a password to decrypt the database. Of course the database never should appear "in clear" (not encrypted) on my harddrive. So is there any possibility to decrypt a SQLite-database "on the fly" and read and write data? What algorithm is here the best (maybe AES)? When it's not possible (or very slow), maybe it's better to encrypt every string in the database and decrypt the string when the password was right (so that a user could open the database, but has no clue what all the entrys could mean)?

    Read the article

  • Using QTDesigner with PyQT and Python 2.6

    - by PyNewbie27
    Hi. I'm fairly new to Python and trying to work with the latest versions of QTDesigner, PyQT 4.7 and QT4.7 (I downloaded the whole package from PyQT4.7 website). I can't figure out how to make QTDesigner integrate closely with Python: ie. If I select "Form" View Code in QTDesigners menu, it errors saying "Unable to launch C:/Python26/Lib/site-packages/PyQT4/bin\uic." If I look in that directory there is a pyuic.py but not "uic". From searching online it seems this doesn't exist because it's expecting a C++ install instead of the python version. Is there anyway to make QTDesigner use/call pyuic.py to generate the code, then open an IDE or text editor of my choice to show me the PYTHON code generated by the QTDesigner-PyUIC chain? I'd like Designer to integrate closely with python, so I can make custom slots/signals in Designer while designing, then tweak the python code directly in my IDE later. If it is not possible to code directly inside QTDesigner using python, does that mean I have to hand code my programs entire UI directly in my PythonIDE? Using Designer directly would seemingly be nearly very very nice for a newbie such as myself, since I can see what properties each widget has and visually edit them while still learning the QT syntax without constantly having to use web resources to see what properties each widget should have and helps with boilerplate code generation, and what their defaults are, etc. I've googled and nobody seems to be using QTDesigner and Python in this manner together. It seems most are either handcoding all the QT code in their Python IDE of choice, or have found an obvious/easy method of doing what I want, therefore not really producing up to date tutorials on making this work together. Please enlighten me if you can. Thanks in advance for your time. Please include any suggestions you might have to a newbie trying to use Python with QT and QTDesigner. Thank you.

    Read the article

  • Deployed Qt5 Application Doesn't Print or Show Print Dialog

    - by MustacheMcLimey
    I'm experiencing Qt4 to Qt5 troubles. In my application when the user clicks the print button two things should happen, one is that a PDF gets written to disk (which still works fine in the new version, so I know that some of the printing functions are working properly) and the other is that a QPrintDialog should exec() and then send to a connected printer. I see the dialog when I launch from my development machine. The application launches on the deployed machine, but the QPrintDialog never shows and the document never prints. I am including print support. QT += core gui network webkitwidgets widgets printsupport I have been using Process Explorer to see what DLLs the application uses on my development machine, and I believe that everything is present. My application bundle includes: {myAppPath}\MyApp[MyApp.exe, Qt5PrintSupport.dll, ...] {myAppPath}\plugins\printsupport\windowsprintersupport.dll {myAppPath}\plugins\imageformats[ qgif.dll, qico.dll,qjpeg.dll, qmng.dll, qtga.dll, qtiff.dll, qwbmp.dll ] The following is the relevant code snippet: void PrintableForm::printFile() { //Writes the PDF to disk in every environment pdfCopy(); //Paper Copy only works on my dev machine QPrinter paperPrinter; QPrintDialog printDialog(&paperPrinter,this); if( printDialog.exec() == QDialog::Accepted ) { view->print(&paperPrinter); } this->accept(); } My first thought is that the relevant DLLs are not being found come print time, and that means that my application file system is incorrect, but I have not found anything that shows me a different file structure. Am I on the right track or is there something else wrong with this setup?

    Read the article

  • Launch a QWidget from a QMain window

    - by Opera
    Hello everyone ! I'm doing my first C++ - Qt4 application and I'm having some trouble "connecting" my different uis. I have a main window with several buttons and when I click on one, I want another window to open. The MyMainWindowClass inherits from QMainWindow and the other from QWidget. Here is the code I have written so far : #include <iostream #include "MyWidgetClass.hpp" #include "MyMainWindowClass.hpp" #include "ui_MyMainWindowClassUi.h" MyMainWindowClass::MyMainWindowClass(QWidget *parent) : QMainWindow(parent), m_ui(new Ui::MyMainWindowClassUi) { m_ui-setupUi(this); initConnect(); } void MyMainWindowClass::initConnect() { QObject::connect(m_ui-SomeBtn, SIGNAL(clicked()), this, SLOT(SomeBtnClicked())); // Some other QObject::connect calls return; } void MyMainWindowClass::SomeBtnClicked() { std::cout << "Some Btn has been clicked" << std::endl; this-setEnabled(false); MyWidgetClass mwc(this); mwc.show(); return; } This calls the Ctor and the Dtor from MyWidgetClass, disables the MyMainWindowClassUi, but doesn't show my other GUI. What am I missing to have the window showed when I click on the button ?

    Read the article

  • Using sem_t in a Qt Project

    - by thauburger
    Hi everyone, I'm working on a simulation in Qt (C++), and would like to make use of a Semaphore wrapper class I made for the sem_t type. Although I am including semaphore.h in my wrapper class, running qmake provides the following error: 'sem_t does not name a type' I believe this is a library/linking error, since I can compile the class without problems from the command line. I've read that you can specify external libraries to include during compilation. However, I'm a) not sure how to do this in the project file, and b) not sure which library to include in order to access semaphore.h. Any help would be greatly appreciated. Thanks, Tom Here's the wrapper class for reference: Semaphore.h #ifndef SEMAPHORE_H #define SEMAPHORE_H #include <semaphore.h> class Semaphore { public: Semaphore(int initialValue = 1); int getValue(); void wait(); void post(); private: sem_t mSemaphore; }; #endif Semaphore.cpp #include "Semaphore.h" Semaphore::Semaphore(int initialValue) { sem_init(&mSemaphore, 0, initialValue); } int Semaphore::getValue() { int value; sem_getvalue(&mSemaphore, &value); return value; } void Semaphore::wait() { sem_wait(&mSemaphore); } void Semaphore::post() { sem_post(&mSemaphore); } And, the QT Project File: TARGET = RestaurantSimulation TEMPLATE = app QT += SOURCES += main.cpp \ RestaurantGUI.cpp \ RestaurantSetup.cpp \ WidgetManager.cpp \ RestaurantView.cpp \ Table.cpp \ GUIFood.cpp \ GUIItem.cpp \ GUICustomer.cpp \ GUIWaiter.cpp \ Semaphore.cpp HEADERS += RestaurantGUI.h \ RestaurantSetup.h \ WidgetManager.h \ RestaurantView.h \ Table.h \ GUIFood.h \ GUIItem.h \ GUICustomer.h \ GUIWaiter.h \ Semaphore.h FORMS += RestaurantSetup.ui LIBS += Full Compiler Output: g++ -c -pipe -g -gdwarf-2 -arch i386 -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED - I/usr/local/Qt4.6/mkspecs/macx-g++ -I. - I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore - I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui - I/usr/include -I. -I. -F/Library/Frameworks -o main.o main.cpp In file included from RestaurantGUI.h:10, from main.cpp:2: Semaphore.h:14: error: 'sem_t' does not name a type make: *** [main.o] Error 1 make: Leaving directory `/Users/thauburger/Desktop/RestaurantSimulation' Exited with code 2. Error while building project RestaurantSimulation When executing build step 'Make'

    Read the article

  • To connect Gstreamer with Qt in order to play a gstreamer video in the Qt Widget

    - by raggio
    I tried using phonon to play the video but could not succeed. Off-late came to know through the Qt forums that even the latest version of Qt does not support phonon. Thats when i started using Gstreamer.Any suggestions as to how to connect the Gstreamer window with the Qt widget?My aim is to play a video using Gstreamer on the Qt widget.So how do i link the gstreamer window and the Qt widget? I am successful in getting the Id of the widget through winid(). Further with the help of Gregory Pakosz, I have added the below 2 lines of code in my application - QApplication::syncX(); gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sink), widget->winId()); However am not able to link the Qt widget with the gstreamer video window. This is what my sample code would look like :- int main(int argc, char *argv[]) { printf("winid=%d\n", w.winId()); gst_init (NULL,NULL); /* create a new bin to hold the elements */ bin = gst_pipeline_new ("pipeline"); /* create a disk reader */ filesrc = gst_element_factory_make ("filesrc", "disk_source"); g_assert (filesrc); g_object_set (G_OBJECT (filesrc), "location", "PATH_TO_THE_EXECUTABLE", NULL); demux = gst_element_factory_make ("mpegtsdemux", "demuxer"); if (!demux) { g_print ("could not find plugin \"mpegtsmux\""); return -1; } vdecoder = gst_element_factory_make ("mpeg2dec", "decode"); if (!vdecoder) { g_print ("could not find plugin \"mpeg2dec\""); return -1; } videosink = gst_element_factory_make ("xvimagesink", "play_video"); g_assert (videosink); /* add objects to the main pipeline */ gst_bin_add_many (GST_BIN (bin), filesrc, demux, vdecoder, videosink, NULL); /* link the elements */ gst_element_link_many (filesrc, demux, vdecoder, videosink, NULL); gst_element_set_state(videosink, GST_STATE_READY); QApplication::syncX(); gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(videosink), w.winId()); /* start playing */ gst_element_set_state (bin, GST_STATE_PLAYING); } Could you explain more in detail about the usage of gst_x_overlay_set_xwindow_id() wrt my context? Could i get any hint as to how i can integrate gstreamer under Qt? Please help me solve this problem

    Read the article

  • How to generate .sln/.vcproj using qmake

    - by stas
    Hi! I have main.cpp in c:\test folder and do the following: qmake -project qmake -tp vc test.pro The answer is: WARNING: Unable to generate output for: C:/test//Makefile.Debug [TEMPLATE vcapp] WARNING: Unable to generate output for: C:/test//Makefile.Release [TEMPLATE vcapp] But, I don't need make files. I need .vcproj! Environment: Windows XP Pro SP3, MSVC 7.1 and 8.0. Qt is installed in C:\Qt\2010.02 (LGPL version). Commands are run from Qt Command Prompt. What's wrong with it? How to generate .sln/.vcproj? May I generate them for MSVC 7.1 and 8.0?

    Read the article

  • RubyQT QGraphicsview scale images to fit window

    - by shadowskill
    I'm trying to make an image scale inside of a QGraphicsView and having zero success. I did find this C++ question with what seemed to be the same problem:http://stackoverflow.com/questions/2489754/qgraphicsview-scrolling-and-image-scaling-cropping I borrowed the approach of overriding the drawback/foreground. However when I run the script I'm greeted with a method_missing error: method_missing: undefined method drawPixmap for #<Qt::Painter:0x7ff11eb9b088> QPaintDevice: Cannot destroy paint device that is being painted What should I be doing to get the QGraphicsView to behave the way I want? class Imageview < Qt::GraphicsView attr_reader :pixmap def initialize(parent=nil) # @parent=parent super() @pixmap=pixmap Qt::MetaObject.connectSlotsByName(self) end def loadimage(pixmap) @pixmap=pixmap end def drawForeground(painter, rect) #size=event.size() #item= self.items()[0] #Qt::GraphicsPixmapItem.new #pixmap=@pixmap #painter=Qt::Painter.new [email protected](Qt::Size.new(rect.width,rect.height),Qt::KeepAspectRatio, Qt::SmoothTransformation) # painter.begin(self) painter.drawPixmap(rect,sized,Qt::Rect.new(0.0, 0.0, sized.width,sized.height)) #painter.end() # item.setPixmap(sized) #painter.end self.centerOn(1.0,1.0) #item.scale() # item.setTransformationMode(Qt::FastTransformation) # self.fitInView(item) end def updateSceneRect painter=Qt::Painter.new() drawForeground(painter,self.sceneRect) end end app=Qt::Application.new(ARGV) #grview=Imageview.new pic=Qt::Pixmap.new('pic') grview=Imageview.new() grview.loadimage(pic) scene=Qt::GraphicsScene.new #scene.addPixmap(pic) grview.setScene(scene) #grview.fitInView(scene) grview.renderHint=Qt::Painter::Antialiasing | Qt::Painter::SmoothPixmapTransform grview.backgroundBrush = Qt::Brush.new(Qt::Color.new(230, 200, 167)) grview.show app.exec

    Read the article

  • Qt - change QWidget layout

    - by Narek
    Let's consider we have a QWidget and a layout named general_layout that contains other widgets and layouts. general_layout is set as the QWidget layout (setLayout(general_layout)). Now I should to change the content of QWidget. How should I do? I have tried to delete and create a new layout for QWidget and that new layout set as a layout of the QWidget, but could not complet my intentions successfully.

    Read the article

  • How to interact with checkbox actions ? (QTableView with QStandardItemModel)

    - by Claire Huang
    I'm using QTableView and QStandardItemModel to show some data. For each row, there is a column which has a check Box, this check box is inserted by setItem, the code is as follows: int rowNum; QStandardItemModel *tableModel; QStandardItem* __tmpItem = new QStandardItem(); __tmpItem->setCheckable(true); __tmpItem->setCheckState(Qt::Unchecked); tableModel->setItem(rowNum,0,__tmpItem); Now I want to interact with the check box. If a check box changes its state by user (from checked to unchecked or vice versa), I want to do something on the corresponding data row. I know I can use signal-slot to catch the change of checkbox, but since there are lots of data row, I don't want to connect each row one by one. Is there anyway to interact with the check action more effectively? Thanks :)

    Read the article

  • How to mix C++ Qt objects and Qt Jambi objects

    - by Dan
    Hi, I'm trying to combine some existing Qt code written in C++ with some code written in Java using Qt Jambi, but I'm not quite sure how to do it. I'm basically trying to acieve two things: Pass a QObject from C++ to Java using JNI Pass a Qt Jambi QObject from Java to C++ It looks like I can pass the pointer directly and then wrap it in QNativePointer on the Java side, but I can't figure out how to turn a QNativePointer back into the original object, wrapped by Qt Jambi. Eg: I can pass a QWidget* as a long to Java and then create a QNativePointer in Java, but how can I then construct a QWidget out of this? QJambiObject and QObject dont seem to have a "setNativePointer" method and I'm not sure how to convert it. In C++: QWidget* widget = ... jclass cls = env->FindClass("Test"); jmethodID mid = env->GetStaticMethodID(cls, "test", "(I)V"); env->CallStaticVoidMethod(cls, mid, int(widget)); In Java: public class Test { public static void test (int ptr) { QNativePointer pointer = new QNativePointer(QNativePointer.Type.Int); pointer.setIntValue(ptr); QWidget widget = ... Thanks!

    Read the article

  • Setting background image for QPushButton

    - by Surjya Narayana Padhi
    Hi Geeks, I am struggling to set an background image for an QPushButton. No Success till now. Following is my code. appsWidget::appsWidget(QWidget *parent) :QWidget(parent) { QPushButton *button1 = new QPushButton("SETTINGS",this); QPushButton *button2 = new QPushButton("TEST",this); QPushButton *button3 = new QPushButton("IE",this); button1->setStyleSheet("background-image:url(config.png)"); -> No success qDebug("appWidget initialized."); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(button1); layout->addWidget(button2); layout->addWidget(button3); this->setLayout(layout); connect(button1,SIGNAL(clicked()),this,SLOT(setClickIndex1())); connect(button2,SIGNAL(clicked()),this,SLOT(setClickIndex2())); connect(button3,SIGNAL(clicked()),this,SLOT(setClickIndex3())); } The image I am using in the stylesheet is located in the same project folder. Do anybody has any solution?

    Read the article

  • How can I create a HTTP POST request with Qt 4.6.1?

    - by Tobias Langner
    How can I create a HTTP POST request with some URL encoded parameters using Qt 4.6.1? I figured out that I can create a QNetworkRequest, set all the parameters there and send it via QNetworkAccessManagers post method. But how can I add some URL-encoded parameters to the request? In the end I want to access the Eve API using Qt/C++. A Python example can be found here: http://www.eveonline.com/api/doc/example-python.asp I managed it using something like (still to be refactored and formed into something useful): QNetworkReply *requestApi(QNetworkAccessManager &nwam) { QNetworkRequest request(QUrl("http://api.eve-online.com/account/Characters.xml.aspx")); request.setHeader(QNetworkRequest::ContentTypeHeader,"application/x-www-form-urlencoded"); QByteArray data; QUrl params; params.addQueryItem("userid","user"); params.addQueryItem("apiKey","key"); data.append(params.toString()); data.remove(0,1); QNetworkReply *reply = nwam.post(request,data); return reply; }

    Read the article

  • qftp mput rawcommand

    - by krishna
    Hello, I have a doubt regarding multiple file transfer with qftp. There is no direct way to transfer multiple files with qftp class. Well, I tried it using arbitrary ftp command "mput" with "rawCommand" in QFTP. But it doesnt work for me. Please let me know how I could do a multiple file transfer with qftp. Thanks,

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >