Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • 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
  • Problem with scrollBar

    9
    0 Votes
    9 Posts
    4k Views
    R
    I find where I was mistaken and do all wight http://bugreports.qt.nokia.com/browse/QTBUG-19314
  • Using graphicsView to display an image

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    A
    I agree with vinb: lets keep your image-displaying topics together. Closing this one.
  • Display 3D image file

    6
    0 Votes
    6 Posts
    5k Views
    A
    There is a 3D viewer demo available in your Qt installation. But as koahning states: you need to know what you are dealing with exactly.
  • [Solved] QGraphicsView very fast on Mac and XP, glacially slow on Linux

    6
    0 Votes
    6 Posts
    4k Views
    Z
    It depends. Raster will give performance that mainly scales with CPU since it is entirely software based. The raster paint engine is still actively developed whereas the older X11 paint engine is not (and also has several bugs). If you are running on a system with hardware accelerated OpenGL support then you may be able to get even better performance by using a QGLWidget as the viewport for your QGraphicsView: @ myView->setViewPort( new QGLWidget() ); @
  • PyQt application hangs

    2
    0 Votes
    2 Posts
    2k Views
    D
    [quote author="ssal" date="1303155063"]the application always create a new instance of QGraphicsScene ( since the contents change frequently ) [/quote] I don't believe it's really necessary. Did you try PySide?
  • Avoid entering energy saving mode

    3
    0 Votes
    3 Posts
    3k Views
    T
    You will need platform specific code to disable energy saving.
  • Target multiples MacOS X version with one computer

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