Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Class Constructor

    Solved
    4
    0 Votes
    4 Posts
    4k Views
    Chris KawaC
    Simple example : @ class A { A() { ... } A(Type param) { ... } }; class B : public A { B(Type param) {} //this will call A() implicitly B(Type param) : A(param) {} //this will call A(param) }; @ So it's needed to pass the parent pointer to the base class QObject so that it can do its magic with it. Otherwise the parent parameter would be ignored.
  • Using splitter with stretch factor

    3
    0 Votes
    3 Posts
    4k Views
    M
    Exactly,that's what i found it,minutes before :D thank you
  • My QGraphicsView will not resize

    2
    0 Votes
    2 Posts
    2k Views
    Chris KawaC
    You need to put the graphics view in a layout. After you drag the graphics view to the main window select main window and click one of the layout icons on the top toolbar (the blue dots or bars icons) or use a shortcut (CTRL+L). Setting a size policy only works when a widget is inside a layout, but for a single element it does nothing. It only matters if there are more widgets in the same layout. Then the policy defines how much space each widget gets in relation to others.
  • Problem using QtCreator as a general C/C++ IDE (finding symbols)

    1
    0 Votes
    1 Posts
    573 Views
    No one has replied
  • Qt Layout doesn't work with plain widget

    3
    0 Votes
    3 Posts
    844 Views
    X
    Thanks, that worked! I was able to do it with from Qt Creator itself, place widget and label inside another widget and setting the grid layout. If someone else is doing similar thing, another nice thing I did to to set the layout nice is for QLabel, I set the vertical sizePolicy to maximum and horizental sizePolicy to 'ignored'. This created the perfect layout that I wanted otherwise the QLabel will take more space in the division.
  • How to do a PyQt VTK application in Python26

    3
    0 Votes
    3 Posts
    1k Views
    J
    Dear SGaist, Apologise to delay sending my response!! Thanks a lot for replying, of course I am trying to find the best forum for PyQt, may be I can do with "pyqt@riverbankcomputing.com mailing list" but it is not user friendly help system My subscription of this mail list is still not approved by them, hopefully it will be active in coming days but my doubt not yet solved!!! Thanks for helping.
  • Debug problem

    3
    0 Votes
    3 Posts
    1k Views
    A
    Hi, thank you so much for your quickly answer. I've checked all that you said me and i have all fine. I can debug but when the debug starts a little screen show me this "errors". I don't know if it is a problem. Many thanks
  • How to naming av started process to distinguish from others

    1
    0 Votes
    1 Posts
    332 Views
    No one has replied
  • Newby - how to observer changes in FIFO pipe

    6
    0 Votes
    6 Posts
    2k Views
    A
    Hi all, I found a solution for my problem. Using inotify does the trick. Found help here: http://www.thegeekstuff.com/2010/04/inotify-c-program-example/ The glitch I see now is QFileDialog that doesn't show hidden files/folders, however hardcoding the hidden name and passing it to inotify works This can be closed now, from my point of veiw
  • QString::toStdString memory leak

    5
    0 Votes
    5 Posts
    2k Views
    T
    Great! :)
  • Using QLockFile

    3
    0 Votes
    3 Posts
    2k Views
    G
    Hi thanks for the reply I appreciate why I get the compile warnings, but this is the only version that works. The incoming filePath argument has unix notation but the call to tryLock fails This is confusing
  • Can I show QMessageBox that can be resized like in layouts?

    3
    0 Votes
    3 Posts
    905 Views
    T
    Hello xalam, I think that creating a class that inherits from QDialog is the best solution
  • QFont fixed width numbers with Windows Arial font

    2
    0 Votes
    2 Posts
    2k Views
    M
    I tested different programs with Windows "Arial" font: Microsoft Windows 7 "Wordpad": Numbers are fixed width Microsoft C++ MFC program via GDI+: Numbers are fixed width. Libre Office: Numbers are not fixed width Qt via QPainter: Numbers are not fixed width But with "Microsoft Sans Serif" all above programs are showing numbers with fixed width - strange. So I stay with "Microsoft Sans Serif" - problem solved.
  • Printing QGraphicsScene with normalized coordinate system

    1
    0 Votes
    1 Posts
    805 Views
    No one has replied
  • QT Ruler Application for selecting and coloring text

    3
    0 Votes
    3 Posts
    1k Views
    S
    Please take alook to understand what i am trying to build. !http://i.stack.imgur.com/NxnUG.png(This is what I am trying to achive.)!
  • Draggable Bezier curve points with QPainterPath in QGraphicsView

    2
    0 Votes
    2 Posts
    2k Views
    E
    Maybe this is kind of what you want. http://qt-project.org/doc/qt-4.8/demos-pathstroke.html
  • Fixing the layout size

    2
    0 Votes
    2 Posts
    683 Views
    E
    Try using : @layout.setContentsMargins(0,0,0,0);@
  • QX11EmbedContainer not painting properly

    1
    0 Votes
    1 Posts
    449 Views
    No one has replied
  • Toplaintext returns escape sequence preceeding the required characters

    1
    0 Votes
    1 Posts
    427 Views
    No one has replied
  • How can i get the text written in the QTextEdit during run time?

    9
    0 Votes
    9 Posts
    31k Views
    D
    hello, i have used toplaintext method to get the text entered by the user and i save it in a file through wostream, but i get the commas and new lines entered by the user as , and \n etc which is not what i want..a relevant part of my code is below: key=ui->textEdit->toPlainText().toStdWString(); json->AsObject()[L"guards"] = new JSONValue(key); std::wstring st = json->Stringify(); myfile1 << st; myfile1.close(); Please help as I am relatively new in C++ and need urgent help..