Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • A few small documentation shortages

    5
    0 Votes
    5 Posts
    3k Views
    M
    [quote author="Johannes Kleimola" date="1309434429"]Thanks. I noticed it and added my comments there for all the shortages.[/quote] Thanks!
  • How can my program have 2 languages?

    26
    0 Votes
    26 Posts
    14k Views
    L
    Ok then, thanks again!
  • MS Word write to field

    4
    0 Votes
    4 Posts
    4k Views
    M
    @koahnig Thanks...
  • [SOLVED] Set Scroll Per Item

    4
    0 Votes
    4 Posts
    4k Views
    K
    Use a QAbstractItemView sub class. QScrollArea dose not work with items it works with widgets. Consider reading a book "C++ GUI Programming with Qt-4 1st edition.":http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip Reading a C++ book wouldn't hurt too, ass you are having problems understating simple compiler output. Or at least use assistant.
  • Spell checker?

    3
    0 Votes
    3 Posts
    7k Views
    S
    Thanks a lot. Second one looks good. I'll try. :)
  • How to do grahics options with QML

    4
    0 Votes
    4 Posts
    3k Views
    B
    thanks Vijay and sigrid , currently my solution is to implement a widget inheriting from QGraphicsProxyWidget , and export it to QML with qmlRegiesterType
  • [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