Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • 0 Votes
    28 Posts
    19k Views
    U
    finally ! this wasn't trivial at all man . its working thanks to you . thanks!
  • Can't compile qtconfig using SDK

    3
    0 Votes
    3 Posts
    2k Views
    A
    They used to build in an older version of the SDK, though.
  • Scaling QSlider to fill layoutmanager

    2
    0 Votes
    2 Posts
    2k Views
    A
    No, the slider handle itself does not scale as a widget. However, you could use the setGlobalStrut function to set a minimum size for elements on the screen.
  • [SOLVED] QShortcut to slotToggleInspector

    9
    0 Votes
    9 Posts
    3k Views
    J
    I solved it by not needing the @toggle@ argument. Win!
  • 0 Votes
    2 Posts
    2k Views
    A
    Just guessing, but perhaps you should compile Qt itself with this option too for this to work?
  • Adding a QSizeGrip to the corner of a QLabel

    2
    0 Votes
    2 Posts
    2k Views
    G
    Hi! If you like easy and lazy solutions: put a QLablel inside the QDialog (instead of your QWidget) and enable the SizeGrip (QDialog has built-in sizeGripEnabled property). I think that's the easiest way. Hope that helps, Marek
  • How can I draw text via QGLPainter?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Ways to keep GraphicItems inside GraphicsSceneRect

    3
    0 Votes
    3 Posts
    2k Views
    K
    Hey Jake, thanks a lot for your answer. Unfortunately a bunch of other major problems popped up since, so I was not able to implement it yet. If there come up more questions to this specific problem, I will post it here. Again thanks for your help! Regards, Kringol
  • How to make my custom QGraphicsPolygonItem() selectable ?

    4
    0 Votes
    4 Posts
    3k Views
    K
    this is exactly what i want, thanks
  • Qt open external links from flash player hosted on QWebKit

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Change style

    5
    0 Votes
    5 Posts
    2k Views
    A
    [quote author="1+1=2" date="1333230079"]I have no idea why the example does work under your computer. Do other examples work?[/quote] Most of the other examples work perfectly.
  • Qt Creator double spin box possible broken[inprecise values]

    8
    0 Votes
    8 Posts
    4k Views
    M
    [quote author="1+1=2" date="1333229922"] [quote author="koahnig" date="1333222906"]you can use "qRound":http://qt-project.org/doc/qt-4.8/qtglobal.html#qRound for rounding to the nearest int. You need scaling up and back down. In your case: @ qreal num = 0.90000000000002; qreal rounded = qRound ( num * 10 ) / 10.0; @[/quote] This is wrong here. Round used in following case. 0.9029293424 == > 0.9 (And of course, the later will actually be 0.90000000000002)[/quote] well yeah it still have me the weird 0.90000000000002 number but when my spinbox reached 0.0 it didn't mess it up so i guess it did work
  • Unevenly drawn circle from QPainter->drawEllipse()

    4
    0 Votes
    4 Posts
    4k Views
    D
    All you need is the border of the circle? If so, you should. @ painter.setBrush(Qt::NoBrush); @
  • [Solved] Windows Port: mingw32 issue (C and C++)

    5
    0 Votes
    5 Posts
    4k Views
    X
    Ok, finally I discovered what was wrong with my project settings: I installed Cygwin to use it as alternative toolchain and to use the zlib headers required by my project I included the PATH of the cygwin headers into my .pro file In some way, the cygwin headers are incompatible with the Qt headers, generating the compilation error. To solve it: I just copied the zlib.h/zconf.h files in a new directory, and then I set this new PATH into my .pro file. Now the compilation is clean!
  • Serious bug in QGLWidget::renderText() (fixed link, no need to register)

    6
    0 Votes
    6 Posts
    4k Views
    T
    Sorry, but I'm a bit angry because on stackoverflow no one volunteered to open the file, and so was the case here, so I was going crazy already. I was hoping to get some discussion and confirmation that this is a bug before reporting it; but OK, I'm submitting it as it's.
  • QTextBrowser setSearchPaths not working correctly

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Q_PROPERTY[SOLVED]

    8
    0 Votes
    8 Posts
    5k Views
    D
    Thank you very much. I guess, now case is closed=)
  • Localization in Qt

    2
    0 Votes
    2 Posts
    2k Views
    A
    I don't know how to do it using only a visual studio solution file, but you can pass the files the parse manually to the lupdate tool as well.
  • SetProperty : Cannot send events to objects owned by a different thread

    11
    0 Votes
    11 Posts
    16k Views
    A
    well, it can be used through the proxy object that I suggested. You can use QMetaObject::invokeMethod on the slot you define there. That slot can then use a normal method invocation on the object you pass for the actual property setting. The invokeMethod should use the Qt::QueuedConnection connection type. The proxy object could be quite simple, I guess something like this would suffice: @ class PropertySetProxy: public QObject { Q_OBJECT public: PropertySetProxy(QObject* parent = 0): QObject(parent) {} setProperty(const QObject* target, const char* property, QVariant value); }; //implementation PropertySetProxy::setProperty(const QObject* target, const char* property, QVariant value) { //check if target object lives in the same thread as we do if (thread() != target->thread()) { qWarning() << "Can't set property of object living in different thread!"; return; } target->setProperty(property, value); } @ Note: brain to forum editor, code is not tested and to be understood as an example only.
  • 0 Votes
    15 Posts
    13k Views
    F
    @ QString ipserver,LoginName,database,Pass; QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", "MyDatabase"); db.setDatabaseName("DRIVER={SQL Server};Server="+ipserver+";Database="+database+";Uid="+LoginName+";Port=1433;Pwd="+Pass+";WSID="); if(db.open()) { qDebug() << "Opened"; db.close(); } else qDebug() << "Error" << db.lastError().text(); @ the WSID =. “is used to hide the client machine to the database server log ,is optional .