Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • [SOLVED] Allowing a QVBoxLayout to auto scroll

    4
    0 Votes
    4 Posts
    6k Views
    T
    yeah, one sec
  • ActiveQt with QT5.1 problem

    2
    0 Votes
    2 Posts
    784 Views
    SGaistS
    Hi and welcome to devnet, This sounds like a regression, you might want to ask on the mailing list. You'll find there Qt's developers/maintainers (this forum is more user oriented) Maybe also check the "bugreport system":bugreports.qt-project.org/issues/ to see if someone else already had this problem
  • QGraphicsView/QGraphicsScene with custom DirectX viewport

    2
    0 Votes
    2 Posts
    2k Views
    M
    Any advice?
  • [SOLVED]Determine which ip has received a UDP datagram

    3
    0 Votes
    3 Posts
    2k Views
    A
    Thanks for your reply I will do that.
  • Signal is emitted, slot is not running

    5
    0 Votes
    5 Posts
    1k Views
    B
    @void Manager::start() { if(mStuff.size() > 0) { instance()->processStuff(); } else { initStuff(); } }@ and @void Manager::processStuff() { //here is where process stuff and empty the Stuff queue //when queue is empty we emit initStuff(); }@ work but looking at your code you call initStuff at the end of processStuff and in the else section of start(). Why not just @void Manager::processStuff() { //here is where process stuff and empty the Stuff queue } void Manager::start() { if(mStuff.size() > 0) { instance()->processStuff(); } initStuff(); } @
  • Live camera image in QGraphicsVIew

    19
    0 Votes
    19 Posts
    9k Views
    J
    I'll have a look at that example. Thanks again
  • Manage the resizing of related widgets

    5
    0 Votes
    5 Posts
    2k Views
    A
    Thanks for the link. I will probably not using QSingleItemSquareLayout. But it gives me an idea. Instead of subclassing QLayout I will subclass QWidgetItem by just overridding setGeometry (that is virtual).
  • Qt5 documentation QLayout.getContentsMargins()

    4
    0 Votes
    4 Posts
    2k Views
    raven-worxR
    ye...seems like the python binding doesn't take arguments for getContentsMargins() and returns a list with 4 elements.
  • [SLOVED]How to achieve this effect!

    8
    0 Votes
    8 Posts
    2k Views
    H
    it‘s good,thank you! [quote author="JKSH" date="1375170518"]Qt provides some "graphical effects":http://qt-project.org/doc/qt-5.1/qtgraphicaleffects/graphicaleffects.html Examples: http://qt-project.org/doc/qt-5.1/qtgraphicaleffects/qml-qtgraphicaleffects1-colorize.html http://qt-project.org/doc/qt-5.1/qtgraphicaleffects/qml-qtgraphicaleffects1-coloroverlay.html[/quote]
  • DEPENDPATH in .pro file

    5
    0 Votes
    5 Posts
    4k Views
    A
    Maybe the files are not found. Files and Headers are always searched relative to the position of the .pro-File, NOT the position of the .pri file. So if you use relative path names, you need to be aware of that.
  • Version Confusion

    2
    0 Votes
    2 Posts
    792 Views
    sierdzioS
    Probably some stale Makefile or configuration. Try a clean rebuild.
  • Colliding: mapToScene seems not to work

    1
    0 Votes
    1 Posts
    611 Views
    No one has replied
  • How disable copy and paste on QLineEdit

    2
    0 Votes
    2 Posts
    7k Views
    jazzycamelJ
    Generally speaking I would discourage this kind of thing as it can be incredibly annoying for the user. Saying that, I have been in a situation where I had no choice so developed the following simple class: #include <QtGui/QLineEdit> #include <QtGui/QKeyEvent> class LineEdit : public QLineEdit { Q_OBJECT public: LineEdit(QWidget *parent=0) : QLineEdit(parent){ init(); } LineEdit(const QString &contents, QWidget *parent=0) : QLineEdit(contents,parent){ init(); } private: void init(){ setAcceptDrops(false); setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showMenu(QPoint))); } protected: void keyPressEvent(QKeyEvent *event){ if(event->matches(QKeySequence::Copy) || event->matches(QKeySequence::Cut) || event->matches(QKeySequence::Paste)) event->ignore(); else return QLineEdit::keyPressEvent(event); } private slots: void showMenu(QPoint position){} }; It basically works by: Catching the "QKeyEvent":http://qt-project.org/doc/qt-4.8/qkeyevent.html for the copy, cut and paste "QKeySequences":http://qt-project.org/doc/qt-4.8/qkeysequence.html and preventing there propagation, Preventing the user from dragging and dropping data ("setAcceptDrops":http://qt-project.org/doc/qt-4.8/qwidget.html#acceptDrops-prop), and Redirecting a request for a context menu to a custom slot to prevent the system menu being shown with the cut, copy and paste actions and allowing for the implementation of a custom menu. Hope this helps ;o)
  • Adding item to beginning of QListWidget doesn't work for me [Solved]

    3
    0 Votes
    3 Posts
    4k Views
    J
    Aha! It works! You're right, the doc for QListWidgetItem's constructor says that the item is added if it has a parent. May thanks! :-)
  • Qt d-bus don't receive signal form udisks

    1
    0 Votes
    1 Posts
    868 Views
    No one has replied
  • Select the appropriate MySQL Server version

    3
    0 Votes
    3 Posts
    924 Views
    G
    I remember reading about some restrictions based on the 32bit architecture, required by the MinGW.
  • SOLVED: Application crashes when removing tableWidget

    2
    0 Votes
    2 Posts
    1k Views
    D
    call delete directly is not a good, give a try to QObject::deleteLater() Change you code to @ ui->widget->findChildren<QWidget *>(QString(), Qt::FindDirectChildOnly) @ if they have sub children.
  • [SOLVED]Linker error for custom QListModel

    4
    0 Votes
    4 Posts
    3k Views
    W
    Oh, it is looking like Im not so good in OOP :) And know a little about virtual methods Thank you!
  • Deleting an object on the heap that is stored in QList<T>

    7
    0 Votes
    7 Posts
    4k Views
    P
    thanks guys for the detailed explanation. i guess i will try to modify the architecture that it will be possible to work with @nodeList.append(Node(...));@ like SGaist said. that way i'm saver concerning memory leaks :-) bq. Robot Herder wrote: Hi, I wonder how did you get to this conclusion? actually, i'm quite new to Qt and even to C++ and in the begining i was going crazy with pointers so a friend told me this solution, but i think it's possible i got it wrong... thanks again,
  • 0 Votes
    8 Posts
    5k Views
    R
    @butterface: Good Idea for relative path. I used it and fixed the problem. On the other hand, my source code is exactly same in debug/release mode. Only the design mode macro i turn it ON/OFF. Also while designing I do it in release mode by design mode ON. So from UI side, developed and tested part are same. Just this makes the development fastest (as of my knowledge). Not sure if there are even options.