Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.5k Posts
  • [Solved]Error: Driver not loaded Driver not loaded on Ubuntu

    10
    0 Votes
    10 Posts
    22k Views
    R
    [quote author="Volker" date="1304607729"]@ ... qDebug() << qApp->libraryPaths(); ...@ Is the mysql plugin listed in a subdir "sqldrivers" in one of the paths printed?[/quote] Thanks for those accurate advices Volker, I was wondering why the driver wasn't found when I past the .so next to my executable. I was missing to put it in a subfolder named sqldrivers !
  • Qq-26-openglcanvas issues

    2
    0 Votes
    2 Posts
    3k Views
    D
    Use the (updated) code from here https://qt.gitorious.org/qt-labs/modelviewer .
  • Poll method for QMainWindow

    8
    0 Votes
    8 Posts
    4k Views
    A
    Yep, it's tough to come out of game lingo. Sorry for the confusion. QTimer method worked for me though. Thanks!
  • Jambi synchronisation problem

    3
    0 Votes
    3 Posts
    2k Views
    K
    finally, I did not need the synchronisation toolkit like in swing. The low FPS was caused by the fact that I had been launching the application under IDE on slower PC. Now it works great:) And I understand I will write posts there. Thank you :)
  • Using Signals and Slots with Touch Events

    3
    0 Votes
    3 Posts
    5k Views
    J
    [quote author="Vass" date="1309298312"]May be it will be interesting for you: "Image Gestures Example":http://doc.qt.nokia.com/4.7/gestures-imagegestures.html[/quote] That actually seems like a good idea. Unfortunately, I can't seem to get a QSwipeGesture to work in a QGraphicsView. Here's what I have so far: Class Declaration: @class sliceView : public QGraphicsView { Q_OBJECT public: explicit sliceView(QWidget *parent = 0); bool viewportEvent(QEvent *event); signals: void moveToMainViewer(QEvent *); void goBack(QSwipeGesture *); void goForward(QEvent *); void changeLevel(QEvent *); protected: bool event(QEvent *event); private: bool gestureEvent(QGestureEvent *event); void swipeTriggered(QSwipeGesture *); };@ .cpp file: @ #include "sliceview.h" #include <QtGui> #include <QTouchEvent> sliceView::sliceView(QWidget *parent) : QGraphicsView(parent) { viewport()->setAttribute(Qt::WA_AcceptTouchEvents); grabGesture(Qt::SwipeGesture); } bool sliceView::event(QEvent event) { if(event->type() == QEvent::Gesture) return gestureEvent(static_cast<QGestureEvent>(event)); return QGraphicsView::event(event); } bool sliceView::gestureEvent(QGestureEvent *event) { if(QGesture *swipe = event->gesture(Qt::SwipeGesture)) swipeTriggered(static_cast<QSwipeGesture *> (swipe)); return true; } void sliceView::swipeTriggered(QSwipeGesture *gesture) { if(gesture->state() == Qt::GestureFinished) { if(gesture->horizontalDirection() == QSwipeGesture::Left) emit goBack(gesture); update(); } } bool sliceView::viewportEvent(QEvent *event) { switch(event->type()) { case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: { QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event); QListQTouchEvent::TouchPoint touchPoints = touchEvent->touchPoints(); if(touchPoints.count() == 3) { if(touchEvent->touchPointStates() & Qt::TouchPointPressed) { emit changeLevel(event); } } else if(touchPoints.count() == 4) { if(touchEvent->touchPointStates() & Qt::TouchPointReleased) { emit moveToMainViewer(event); } } return true; } default: break; } return QGraphicsView::viewportEvent(event); } @
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] Reading available ODBC data source names?

    7
    0 Votes
    7 Posts
    4k Views
    E
    I know, i added line 2 manually to make sure what cbDsn is...just corrected this.
  • Mixing pthreads and main GUI thread - Can pthread function emit a signal

    11
    0 Votes
    11 Posts
    9k Views
    K
    Yes I'm aware of your view that one should not connect foreign signals to private slots, but you have not mentioned it in your original post concerning making the slot public. This may lead to a false assumptions that such connections are impossible.
  • Transfering Qt from one machine to other

    8
    0 Votes
    8 Posts
    5k Views
    S
    The following "FAQ":http://developer.qt.nokia.com/faq/answer/is_it_possible_to_move_the_qt_directory_to_another_directory_after_installa contains information on what you need to do when moving your Qt installation around.
  • QProgressbar text within QProgressbar

    3
    0 Votes
    3 Posts
    6k Views
    V
    See "format property":http://doc.qt.nokia.com/4.7/qprogressbar.html#format-prop you can add your text to this property and it will be show on progress bar
  • Font for all widget

    5
    0 Votes
    5 Posts
    3k Views
    R
    Many thanks for help!
  • Regarding Locking The File

    39
    0 Votes
    39 Posts
    20k Views
    K
    [quote author="Andre" date="1309338341"]@Rajveer: QReadWriteLock does not work across processes, so it is useless for this case. [/quote] Thanks for the hint. I hadn't stumbled upon "QSystemSemaphore's":http://developer.qt.nokia.com/doc/qt-4.7/qsystemsemaphore.html up until now. Thanks for that hint too.
  • [Solved] Strange error

    6
    0 Votes
    6 Posts
    3k Views
    T
    thats same problem with me, solved mine either.. thanks
  • C5-03: error while installing qtmobility.sis (Symbian^1 Qt 4.7.3)

    6
    0 Votes
    6 Posts
    7k Views
    T
    Sorry it was smart installer. my mistake "Your text to link here...":https://picasaweb.google.com/lh/photo/8IdRKlR4hIEYObwGDdcZoQ?feat=directlink
  • Memory scanner

    13
    0 Votes
    13 Posts
    9k Views
    K
    the whole course of the discussion reminds me of http://xkcd.com/386/ :D wait()-ing in arbitrary places obviously will cause the caller to block until the waited thread is stop or finished. It is after all a blocking call. Waiting in other places of course after using the terminate () slot is another story, i.e. one can use this as a thread synchronization scheme in some corner cases. However if the thread is running for ever why to stop/delete it? If on the other hand the thread terminates eventually how are you going to know that it has terminated? (also relevant question is why do want it terminated - this will lead you to the sort of policy you are going to implement for its termination). [for instance , If you want to terminate it just for resource/performance reasons polling on the isFinished() is a bad idea, etc] however no matter what, prior to its deletion (obviously it has been terminated either by itself or by an external factor, otherwise why should we release the resources since it is still running via delete?), one has to call the wait() to see that the thread is ready to meet its maker. This is a quirk due to the different behaviour of the many OS after a request to stop the thread. This in most sane OSes (ie linux) will take less than one scheduler's time slot (that is usually in linux 10ms). That's the full explanation of my argument about wait(). One should use it when talking for the thread delete case, just to make sure that the thread has actually stopped (after he has learned that it has stopped (signal) or it has requested it to stop). /me over and out.
  • [ENDED]set tooltip on an icon

    5
    0 Votes
    5 Posts
    5k Views
    E
    Thnaks for the advices Volker. Anyway, I'll stick with QTableWidget and will change all the presentation because QGraphicsViews messes with my head. I'm not experimented enough to work with it. Thanks
  • New to Qt! Simple button to control peripherals

    6
    0 Votes
    6 Posts
    4k Views
    T
    it would take only less than 30 minutes to do that. in desktop application select form and create two push buttons, right click on button and choose signal and slot(on Clicked()), it will provide you function where you can put your code to pass HEX or binary signal to COM port to set or reset.
  • Not able to use Microsoft nmake compiler in Windows 7 -64 bit

    6
    0 Votes
    6 Posts
    9k Views
    T
    <nitpick>nmake is not a compiler. It is just a tool that runs the actual compiler.</nitpick>
  • Create a plugins

    35
    0 Votes
    35 Posts
    17k Views
    G
    thank you for all your help. i will check this example :)
  • [Solved] Example usage of QWidget::InputMethodEvent

    6
    0 Votes
    6 Posts
    8k Views
    T
    The below link is git repo for "Mobile Extensions" Symbian 4 project. It has got whole framework of QGraphicsWidget based widgets developed for mobile phones. Sadly its scrapped. https://qt.gitorious.org/uiemo/uiemo-preview/trees/master One place where you can find this QInputMethodEvent posed is... https://qt.gitorious.org/uiemo/uiemo-preview/blobs/master/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp The software keypads code is at https://qt.gitorious.org/uiemo/uiemo-preview/trees/master/src/hbinput/inputwidgets and actual inputmethods ( QInputContext derived classes) is at https://qt.gitorious.org/uiemo/uiemo-preview/trees/master/src/hbplugins/inputmethods And HbLineEdit code which receives QInputMethodEvent is at https://qt.gitorious.org/uiemo/uiemo-preview/trees/master/src/hbwidgets/editors And https://qt.gitorious.org/uiemo/uiemo-preview/blobs/master/src/hbwidgets/editors/hbabstractedit.cpp handles some of inputMethodEvent events at line 244. And obviously one best place to study in Qt Source code it self...