|Subject:||Re: [Discuss-gnuradio] QT graphical sink: how set dimension?|
|Date:||Thu, 31 Mar 2016 15:11:41 +0200|
On 31.03.2016 14:57, Marcus Müller wrote:
> I know there's the Qt Tab widget (look under "GUI widgets"), but I
> haven't played around with that.
I sent that and realized that typing that took me as long as it would
have taken me to play around :)
So, yeah, it's pretty simple: You add a QT GUI Tab widget, give it an ID
(instead of the default qtgui_tab_widget_0) that you can easily
remember, eg "tabber", and then in your graphical blocks, use
address@hidden, address@hidden and so on for different tabs.
If you want to have the widgets grid-layouted inside the tabs, just
combine the two syntaxes; for example:
> Regarding protected python code:
> Well, the problem is that the python code Generator class re-generates
> the python code from scratch each time and doesn't even try to read
> what's there already. That really makes debugging the code generation
> easier; there's no chance some modification might damage the "stub" code.
> However, it means that modifications don't survive, indeed.
> In many circumstances, there might be an elegant workaround: If you've
> got a relatively recent GNU Radio, your GRC will contain "Python
> Module", which you can use to have python code that gets automatically
> written to a different .py file when the Python code is generated; that
> way, you can have your own functions that you can call e.g. in your
> block properties.
> But I think your idea is pretty interesting, anyway. Maybe there's
> already thoughts on that or similar concepts; I just don't know :)
> Best regards,
> On 31.03.2016 14:18, Vitt Benv wrote:
>> Tnx Marcus, you are right, I'm speaking about "graphical" properties.
>> I was aware about "GUI Hint" and I tried this but only to put widgets
>> in rows x columns positions.... but now I know about the subsequent
>> parameter: I'll test those.
>> Now I miss only Tabs as Notebook was used, but never mind, I'll try
>> another way!
>> About GRC I think it's a good "starting point" but then some extra
>> code does the job.
>> A useful feature in GRC could be to have some kind of protection on
>> added code between builds... if I recall right there was an IDE
>> (WxGlade... maybe...) who understood a simple tag as:
>> ### PROTECTED CODE ###
>> ... added code
>> so that in subsequent build that wasn't overwritten ( actually it
>> happened several times, sgrunt!).
>> Tnx again, ciao ^__^
>> 2016-03-31 13:40 GMT+02:00 Marcus Müller <address@hidden>:
>>> Hi Victor,
>>> what specifically are you referring to when you say "dimension" of your
>>> graphical sinks; do you mean the "logical" size (in points of the FFT)
>>> or the "graphical" size (in pixels of the widget, or the window)?
>>> You can specify the heights of the widgets manually, but that would
>>> require you to interfere with Qt taking care of window layout (and is
>>> not a good idea most of the time); if possible, prefer to use a relative
>>> grid layout as explained below.
>>> The equivalent to WX' Notebook, there's the QT "GUI Hint" property. It's
>>> pretty awesome, if you want to have a grid kind of layout; its format is
>>> row,column, row_span, column_span
>>> So, if you want something like
>>> | Time | Freq |
>>> | Plot | Plot |
>>> | Slider |
>>> The GUI hints would be
>>> time plot: 0,0, 1,1 (first (=0.) row, first column, one row high x one
>>> column wide)
>>> freq plot: 0,1, 1,1 (first row, second column, 1x1 )
>>> slider: 1,0,1,2 (second row, first column, 1 high x 2 wide)
>>> Generally, it's possible (though not directly from GRC without writing
>>> your own Python) to embed your Visualization into your own Qt
>>> Application; there's a few projects out there that do that, but I don't
>>> think we really have a best practice guide for that just yet :)
>>> On 31.03.2016 12:45, Vitt Benv wrote:
>>>> Good morning,
>>>> I'm exploring QT graphical, to begin lo leave WX widget....
>>>> I'm looking for good infos about resizing / fix the dimensions of my
>>>> two graphical sinks ( frequency / spectrogram), Googled around but no
>>>> clear infos :-(
>>>> Moreover in WX there's a Notebook container, very useful with crowded
>>>> GUI.... there's an equivalent in QT?
>>>> Tnx in advance for any answer.
>>>> Victor, I3VFJ
>>>> Discuss-gnuradio mailing list
>>> Discuss-gnuradio mailing list
>> Discuss-gnuradio mailing list
Discuss-gnuradio mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|