Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • Qmake and white spaces in TARGET, DESTDIR, etc...

    2
    0 Votes
    2 Posts
    7k Views
    F
    Spaces in qmake are (at least in my experience) handled differently per setting. I've had the most luck with good old trial and error. Oftentimes you have to multiple escape characters. Like for example: @\\ @ Or @\\\ @ I've also had luck with quoting "\\ " and other techniques. It has often proved useful to have a look at the generated Makefile and at the actual command produced at the command line. Check if it is what you would have typed in in that case, then add or remove backslashes or quotes as necessary. If that all doesn't work, I'm afraid you'll have to stick to the "No spaces" mantra.
  • [SOLVED] ssh connection

    3
    0 Votes
    3 Posts
    7k Views
    A
    Hi All, I fixed my problem temporarily. I had to make sure that i have access to both client/server via passkeys. And then all the we have to do is something simple as this : QProcess *proc = new QProcess(); proc->start("ssh server_name /path/to/shell/script"); proc->waitForFinished(); QString result=proc->readAllStandardOutput(); ui->textBrowser->setText(result); //writing the result to my text browser Thanks, Hope this helps.
  • StyleSheet issues with MainWindow, Menu

    2
    0 Votes
    2 Posts
    3k Views
    K
    OK, I've found a solution. You need to select the menu item explicitly. Here's an example that leads to the desired style: @ import PyQt4.QtGui as QtGui class MyMainWindow(QtGui.QMainWindow): def __init__(self, parent=None): super(MyMainWindow, self).__init__(parent) self.menu_bar = self.menuBar() print self.menu_bar.isNativeMenuBar() self.menu_bar.setNativeMenuBar(False) print self.menu_bar.isNativeMenuBar() self.session_menu = self.menu_bar.addMenu("&Session") button = QtGui.QPushButton("Testomat") self.setCentralWidget(button) self.setStyleSheet(""" * { background-color: blue; } QMenuBar::item { background-color: blue; } """) if name == "main": import sys app = QtGui.QApplication(sys.argv) main_window = MyMainWindow() main_window.show() app.exec_() @
  • Second use of a QSqlDatabase instance in a QSqlQuery fails.

    5
    0 Votes
    5 Posts
    5k Views
    E
    Ahhh, that is so much easier to read when it's formated :o). Thank you for your insights. I suspect that the problem lies somewhere in there. I appreciate your help.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] display greyscale image with label and QPixmap

    7
    0 Votes
    7 Posts
    8k Views
    J
    Thanks a lot this has solved my problem
  • Dock button on Menu bar

    6
    0 Votes
    6 Posts
    7k Views
    A
    Ok I am going to design a widget for my title bar. In the first place I wanted to be able to dock a floating Dockwidget with a simple click.
  • Create Qt image pointer

    9
    0 Votes
    9 Posts
    10k Views
    L
    [quote author="jk_mk" date="1308227262"]Well, I have made the following code. But when I debug the code I get this message QImage::setPixel: coordinate () out of range , for all the coordinates and also I cannot get the result in my QGraphicsView.[/quote] Because you have to specify the size of the image at its creation, see the "various constructors":http://doc.qt.nokia.com/latest/qimage.html#QImage of QImage. In addition, copying the image pixel per pixel using QImage::setPixel() is extremely expensive. You do not need an external library to read the image from a file. Just load the file using QImage and then manipulate the QImage directly. You will find all the neccessary information in the "documentation":http://doc.qt.nokia.com/latest/qimage.html. And again - prerequisite of using Qt is basic knowledge of C++ and the willingness to read documentation.
  • Better QPalette Documentation.

    8
    0 Votes
    8 Posts
    4k Views
    S
    I just went with what i was told and presumed that seen as the parser functions to support html formatting in labels have been removed that the parsing for stylesheets has also been removed I never tested this but size is a big issue on our setup and given we use alot of custom widgets palettes work well in our situation anyway.
  • Help document broken in qtcreator

    5
    0 Votes
    5 Posts
    11k Views
    D
    The link goes to the whitepaper in the Qt Developer Network Wiki, which fails for some reason. I'll take a look at the current documentation to see what we should do to fix this, but I suspect that we'll just change the link to something else.
  • Playing audio file at different pitches. Phonon? Qt Multimedia?

    8
    0 Votes
    8 Posts
    7k Views
    J
    Hi, It looks like I'll have to work it the way you mention abov (jim_kaiser)e. Get the raw data, transofrm with external library and try to put it back in data that Phonon understands. Or maybe if I have to use an external library I could do all the job inside it, meaning, reading the audio file, transformation of pitch with constant duration and then playback using the particular external library capabilities. I'll report back if I make it work in any of this two ways. Thank you all for your interest and replies. Juan
  • Where can I find QtWinForms Solution

    Locked
    3
    0 Votes
    3 Posts
    5k Views
    G
    nearly the same discussion is going on here "Can Qt host WPF controls?":http://developer.qt.nokia.com/forums/viewthread/6796/ --> closes this issue
  • How to get wid by the pid?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QMenu incorrect setting of palette

    2
    0 Votes
    2 Posts
    2k Views
    S
    I've found a work around this seems to be linked to styles while i wouldn't mark this as a solution it will work for me. I have set my application's style to plastique this seems to give the ability to set all the colors correctly and will work in my case. I am still open to better ideas.
  • Where are the widget objects placed?

    4
    0 Votes
    4 Posts
    3k Views
    A
    Indeed. The widget object names end up in the header file that you include in the header file for the class implementation. It is, as SimonL mentioned, named ui_<Name Of .ui File>.h, but it only exists after building. It is educational to have a look at it once.
  • About QtService don't start on Mac OS X 10.6

    3
    0 Votes
    3 Posts
    4k Views
    Y
    I test on virtual machine, it works well. Thanks
  • Reinvent the wheel? Alternative view for text editing

    2
    0 Votes
    2 Posts
    3k Views
    F
    Maybe you would like a view at the okteta source code. It's KDE's hex editor and pretty complete.
  • Debugging symbols : Profiling on Windows

    2
    0 Votes
    2 Posts
    3k Views
    G
    I know no free profiler for windows that works really good. If the profiler you use uses microsoft format, you have no chance, as mingw uses a different format for debugging stuff.
  • QProcess messaging and hidden?

    7
    0 Votes
    7 Posts
    5k Views
    M
    Jim: Thanks for the suggestion. I have seen this before and from the looks of it the widgets are still being drawn to the 2D screen as an overlay to the 3D engine, maybe I am wrong here? Ultimately however I need pixel access to the app in question. Lukas: Thanks, I am aware of winId() however I need to get that from a QProcess which gives me the process handle as opposed to the window handle. As Gerolf suggests I will most likely need to branch platform specific code at this point which is ok; was hoping to avoid it if possible however. Thanks. -=ben
  • TextStream special characters

    2
    0 Votes
    2 Posts
    3k Views
    F
    Set the proper encodings for incoming and outgoing files. Have a look at "QTextStream::setCodec()":http://doc.trolltech.com/latest/qtextstream.html#setCodec.