Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • [SOLVED] - Get in trouble with resource file

    7
    0 Votes
    7 Posts
    4k Views
    EddyE
    You're welcome. If your issue is solved please add [solved] to the title of this topic by editing your first post. Thanks.
  • Overriding function from QGraphicsItemGroup without inheritance

    2
    0 Votes
    2 Posts
    2k Views
    W
    Hello. Possible solution is to reimplement QGraphicsView's mousePressEvent. There you may use something like this: @ QGraphicsItemGroup *clicked_group; if (clicked_goup = qgraphicsitem_cast<QGraphicsItemGroup>(scene() ->itemAt(mapToScene (event ->pos())))) { // Code for making different items of group (in)visible. I don't know how actualy you prefer to do it. } @
  • Class cannot be changed

    4
    0 Votes
    4 Posts
    2k Views
    A
    Hi, @#include "Starters.h" #include "Classes.h" #include <QPoint> class Map { private: bool Empty; bool Saved; public: Map(int w = iWIDTH, int h = iHEIGHT); ~Map(); int WIDTH; int HEIGHT; int IslNum; MapA*** All; Island** Isls; void Generate(); bool isEmpty() {return Empty;} void Build(QPoint& pos, const QString bt); QString s; // this is the line that doesn't works };@ if i try to compile this, i get an error when creating a second instance of the class. Without this ****** line everything works fine. I already tried clean and stuff... BTW: Debug does not even work without line, only Release is possible. MfG akonshi
  • Deleted

    5
    0 Votes
    5 Posts
    2k Views
    G
    #2 and #5 are correct. The amount of blanks between the += and the quotation mark doesn't matter. Also, please use proper @-tags for code formatting, otherwise the tags will show up as part of your code :-)
  • Code completion doesnt read time() function

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    G
    Closed. Please don't "double post":/forums/viewthread/17901/ your questions.
  • How to use QtConcurrent::run

    2
    0 Votes
    2 Posts
    3k Views
    M
    If I use @QtConcurrent::run(*this, &MyThread::asyncFunction, x);@ Compiler error: c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\include\QtCore\qthread.h:137: error: C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject' If I use @QtConcurrent::run(this, &MyThread::asyncFunction, x);@ Compiler error: c:\qtsdk\desktop\qt\4.8.0\msvc2010\include\qtcore\qtconcurrentrun.h:123: error: C2064: term does not evaluate to a function taking 2 arguments
  • GraphicsView and scene

    4
    0 Votes
    4 Posts
    4k Views
    M
    In addition to what Mariø™ said: You need to include the header for the item you are using. So if you want to use QGraphicsRectItem you should @ #include <QGraphicsRectItem> @
  • Opacity with custom QGraphicsItem

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • MPX Support in Qt/X11

    2
    0 Votes
    2 Posts
    2k Views
    A
    No change. Multiple pointers are not supported. Qt 5 is likely to have some level of XInput2 support but that is only for Wacom tablets and possibly touchscreens. MPX is not in scope.
  • 0 Votes
    3 Posts
    2k Views
    D
    this thread takes me in a problem that do i need to check my project on each platform
  • 0 Votes
    3 Posts
    8k Views
    G
    Solved it, actually, the delegate is not the problem, when painting the current selection selection QCombobox uses a re-implantation of @ void paintEvent(QPaintEvent *e) @ so here is what I did: I created a class derived from QCombobox and re-implantation that func.: @ void MyCombo::paintEvent(QPaintEvent *e) { //this part is a copy of the orgonal Q_UNUSED(e) QStylePainter painter(this); painter.setPen(palette().color(QPalette::Text)); // draw the combobox frame, focusrect and selected etc. QStyleOptionComboBox opt; initStyleOption(&opt); painter.drawComplexControl(QStyle::CC_ComboBox, opt); //here is where the customization start!!! QRect rect = opt.rect.adjusted(1,1, -20, -2); //compensate for frame and arrow ... } @ I might totally redo this func.... and get some nice results. this is what I like about Qt!
  • Problem with QFtp

    6
    0 Votes
    6 Posts
    3k Views
    C
    At first sight (I'm too tired now) you have some errors in code: connect ftp signals to your slots before you call ftp get function ( or better just after initialize "ftp" member variable ) why do you need two slots connected to QFtp::commandFinished signal ? you'll have memory leaks if don't delete "nomefile" pointer. ( i. e. delete it in one slot connected to QFtp::commandFinished signal )
  • MS SQL Server 2008 with Qt

    3
    0 Votes
    3 Posts
    10k Views
    M
    really thanks :) Used the code you suggest and works :D
  • 0 Votes
    5 Posts
    2k Views
    F
    Still no one...
  • How could I deploy the project “Kadu” on my windows?

    6
    0 Votes
    6 Posts
    2k Views
    M
    I don't know much about kadu, but if there's a .pro file, just opening it in Qt Creator should load the project. Edit: I merged your two very similar threads.
  • Qt: QVBoxLayout - hitting height limitations?

    2
    0 Votes
    2 Posts
    2k Views
    R
    Yes, I was hitting a limit: @this->container->setMaximumHeight(myNewLimit);@ where container is the widget the QVBoxLayout applies to. The container is also managed by a QScrollArea. This took care of the sudden hight condensation problem when reaching a threshold of x widgets in the layout.
  • Profiling in Windows with QtCreator?

    7
    0 Votes
    7 Posts
    16k Views
    T
    Thanks for the info, buddy!
  • Deleted

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

    18
    0 Votes
    18 Posts
    8k Views
    C
    Deleted
  • Qmake

    5
    0 Votes
    5 Posts
    4k Views
    L
    You are always using Makefile, which contains a debug and release target and invokes Makefile.Debug and Makefile.Release respectively. Depending on the selected mkspec (either using the -spec parameter or QMAKESPEC environment variable) the configuration (from $QTDIR/mkspecs/<mkspec>/qmake.conf) is read, and the QMAKE_ variables are set.