Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 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 .
  • Popup menu branch collapses too quickly

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Need some constructive criticism[Updated+ new question]

    5
    0 Votes
    5 Posts
    2k Views
    M
    ddriver thanks for the report, I got that issue fixed now. I am trying to find a way to add a text link that would open a world document
  • QTcpSocket read QByteArray

    2
    0 Votes
    2 Posts
    3k Views
    K
    Do you see any problems when using an implementation based on your pseudo-code?
  • [self solved]Text lose highlight

    4
    0 Votes
    4 Posts
    2k Views
    P
    this problem has been fixed,just add one line: @ void MyTreeView::mouseReleaseEvent(QMouseEvent *event) { //to do my logic QTreeView::mouseReleaseEvent(event); QModelIndex currentIndex = this->indexAt(event->pos()); if(currentIndex.isValid()) { this->setCurrentIndex(currentIndex); } } @
  • [SOLVED]QWizard and currentIdChanged signal issue

    7
    0 Votes
    7 Posts
    4k Views
    A
    [quote author="mbnoimi" date="1333124811"]- Why you are against the progress?! auto connection made for easing developing process and helping developers to build rapid projects.[/quote] I am not against progress at all, but I like being able to find where slot invokations come from. Naming methods should, IMHO, not have any effect other than the readability of my code (ok, as long as they conform to the C++ naming rules). This function breaks all that, and I don't like that. I'm not stopping from anybody else using it, but I personally prefer not to.
  • 0 Votes
    3 Posts
    2k Views
    D
    why object of QObject or its subclass can't be copy can be found here: http://qt-project.org/doc/qt-4.8/object.html#identity-vs-value
  • Sharing data between an offscreen QGLContext and a QGLWidget

    2
    0 Votes
    2 Posts
    3k Views
    J
    Alright, since it seems to remain unknown the 'correct' way to do off-screen contexts now, I have just resolved to using QGLContext's deprecated functionality. I have also decided to drop QGLWidget and instead use QGLContext manually, using a regular QWidget as a paint device for on screen contexts, which solves the problems I was having. I will probably need completely different code in Qt 5, but for now this works. Any suggestions are still welcome.
  • [Solved] Signal and Slot not connecting for some reason

    12
    0 Votes
    12 Posts
    10k Views
    A
    Just a normal method call, I mean by that.
  • OpenGL Multithread

    3
    0 Votes
    3 Posts
    3k Views
    K
    Thanks for sharing your solution. Please mark your post in the title line with [Solved]. Others may find easier this it as something solved.
  • Check cursor State

    9
    0 Votes
    9 Posts
    4k Views
    N
    Got it , its my pleasure to have you sir .Thanks for your precious time but i will be available with my Questions so please guide me.
  • hide tab in Qt

    5
    0 Votes
    5 Posts
    3k Views
    N
    Thanks for the reply sir
  • [Solved] Different results in debug and release modes

    14
    0 Votes
    14 Posts
    14k Views
    K
    Either you found already or a moderator has done for you. For next time in case it was a moderator. You should be able to edit any of your entries. Just at the right of your text below your avatar is an edit link. If you do in the opening post, you can edit the title line.
  • QTreeWidget - Drag to Resize

    3
    0 Votes
    3 Posts
    2k Views
    A
    To me, it sounds like you need to look into [[doc:QSplitter]]
  • Make QTableView rows expandable and collapsable

    4
    0 Votes
    4 Posts
    5k Views
    A
    Note that you can adapt how a tree looks, so even if it functions like one, it doesn't need to look like one.
  • [Solved] Signal/Slot connection that spans 3 classes

    4
    0 Votes
    4 Posts
    2k Views
    A
    Note that the SIGNAL/SIGNAL connection in the example of mlong above is not a mistake. You can connect signals together.
  • [SOLVED] Updating the text on a QLabel

    10
    0 Votes
    10 Posts
    71k Views
    N
    Ok, I've compiled the code on Mac OS and the slots are now working perfectly. I don't know what was messed up with my Linux environment (where it was being compiled before), but my code was in fact fine.