Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • Phonon::VideoPlayer does not display video

    5
    0 Votes
    5 Posts
    6k Views
    J
    I download the latest version of Qt (QtSDK V1.1) and all is fine now ! Thanks to all of you (especially vinb) !
  • Using Multitouch features on Linux

    3
    0 Votes
    3 Posts
    5k Views
    T
    Hello everyone. I got the same problem. X-server frequently crashes on Ubuntu 11.04 64 bits. I'm just running the fingerpaint example.
  • 0 Votes
    2 Posts
    3k Views
    F
    Everything is ok now! Just my fault!. The code is correct
  • [Moved] taking the value of a pixel from an image

    8
    0 Votes
    8 Posts
    5k Views
    L
    The code you posted does not really give a complete picture of your widgets and how they are related. But since you are getting the event in your QMainWindow subclass, you will get them in QMainWindow coordinates. If you use a QLabel to display the image, you should get the event there instead. And the transformation between top-left origin and bottom left-origin is just simple maths - nothing to do with Qt, really. Something like y = height - y.
  • Access all dialogs of application

    5
    0 Votes
    5 Posts
    3k Views
    S
    Thank you. It works well. I write a subclass of QDialog and add retranslateUI method to it. that method simply calls ui->retranslateUi(). I subclass all my dialogs from it. iterating over children of main window of type DialogProxy*, program calls that method: @ QList<DialogProxy*> list = this->findChildren<DialogProxy*>(); for(int i=0; i<list.size(); i++) list.at(i)->retraslateUI(); @ when clicking on the change language menu item all open dialogs are translated.
  • Why QTime::start() giving segmentation fault in amd64 architecture?

    4
    0 Votes
    4 Posts
    3k Views
    M
    I built the whole project in amd64 bit platform. And while running the executables the error occurred. If comment-out those lines for QTime then it's running correctly. Ok. I will post the back trace. @peppe Can you tell me what is "valgrind log" and how to get it. [quote author="peppe" date="1305564304"] a valgrind log[/quote]
  • Buttons in QTextTable

    6
    0 Votes
    6 Posts
    3k Views
    L
    Hi, In my opinion QGridLayout might suit better for your needs. You can insert QPushButton and QLabel as well as other widget inside the grid layout. Best regards, Leon
  • RGB to hex conversion

    2
    0 Votes
    2 Posts
    4k Views
    A
    @QColor( QRgb color ).name()@
  • Problem with Qt SDK 1.1 and SQL drivers

    12
    0 Votes
    12 Posts
    5k Views
    A
    I am new to using QT. I need to build the ODBC plugin on my windows7 box. I have QT4.6.3 installed. What are the steps I need to build the plugin. Do I need to use MinGW? Do I need to install and complie anything else to talk to my MSSQL db? Thanks
  • 0 Votes
    6 Posts
    6k Views
    G
    That should be passed to the linker, using the linker flags. In regular Makefiles it's usually LDFLAGS
  • Half-resizable window

    10
    0 Votes
    10 Posts
    5k Views
    L
    Right... the documentation actually says you have to use Qt::CustomizeWindowHint to make Qt::WindowMaximizeButtonHint have any effect, so that was not so unexpected. If I would just have read the manual I would have probably have seen that too... :)
  • Saving notes on a particular date in a custom calendar

    12
    0 Votes
    12 Posts
    5k Views
    I
    Hello mr_gui,can u tell whether your method works for a mobile app also..and suppose i write something on a textbrowser in my app of mobile device,how shall i retrieve it..,how shall i save it..i want to know how shall i save the data? regards imrrk
  • 0 Votes
    2 Posts
    3k Views
    L
    You could, obviously, use the same base class for all your buttons. But I guess you want to be able to use QPushButton (if that is what you mean by 'button widget') directly, right? You could also use an event filter. Either on one or more specific widgets in the widget hierarchy, or on the entire application. If you really want to get ALL those key events, an event filter on the application should do it. But are you sure you really want to filter out ALL of them...?
  • QTableWidget spaces between columns

    3
    0 Votes
    3 Posts
    13k Views
    E
    Very usefull Thank you
  • QGridlayout problems

    11
    0 Votes
    11 Posts
    7k Views
    G
    Perhaps reading the "introduction to layouts":http://doc.qt.nokia.com/4.7/layout.html could also give some insight.
  • Access to QStackedWidget's widget

    4
    0 Votes
    4 Posts
    4k Views
    M
    It was SO EASY, i thought that the widget were located under ui->stackedwidget->bla bla, indeed they are simply under ui->mywidget. So easy! Huge thanks!
  • [SOLVED] QListView scrolling animation

    4
    0 Votes
    4 Posts
    9k Views
    A
    It works nicely, thanks
  • Key press event in a templated class

    5
    0 Votes
    5 Posts
    3k Views
    F
    Depending on what T you intend your template for, you can consider using QVariant instead.
  • Tablet Events in the Graphics View Framework

    3
    0 Votes
    3 Posts
    3k Views
    S
    Thank you for you reply. Yes, this is what I have eventually done. It took me 4 steps: Subclass QGraphicsView - override event(QEvent *) method, detect tablet events and send them to the scene @ bool MyGraphicsView::event(QEvent *event) { switch (event->type()){ case QEvent::TabletPress: case QEvent::TabletRelease: case QEvent::TabletMove: QApplication::sendEvent(scene(), event); return true; default: return QGraphicsView::event(event); } } @ Subclass QGraphicsScene, override event method, detect if the event is a tablet event @ bool MyGraphicsScene::event(QEvent *event) { MyTabletEvent tabletEvent; switch(event->type()){ case QEvent::TabletPress: case QEvent::TabletRelease: case QEvent::TabletMove: if (static_cast<QTabletEvent>(event)){ tabletEvent = new MyTabletEvent(static_cast<QTabletEvent *>(event), someOtherArgs); sendEvent(itemAt(tabletEvent->scenePos()), tabletEvent); return true; } return false; default: return QGraphicsScene::event(event); } } @ Subclass QGraphicsWidget, override event method, and detect mytabletevent @ bool MyGraphicsWidget::event(QEvent *event) { switch(event->type()){ case QEvent::TabletPress: case QEvent::TabletRelease: case QEvent::TabletMove: manageTabletEvent(static_cast<MyTabletEvent *>(event)); return true; default: return QGraphicsWidget::event(event); } } @ Create a custom event (MyTabletEvent) inherited from QTabletEvent which should be passed between the classes above. It should provied similar API to QGraphicsSceneEvent Actually this is where I am facing a new problem: how to map coordinates between view->scene->items. From view->scene I guess mapToScene(viewPos) it's OK, but from scene->items I don't exactly know what to do. Maybe someone helps me figure it out. Thanks
  • Loading raw and complete email source into a QMessage

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied